In buf_GetNewLocked(), the comparision to decide whether a
cm_buf_t is a member of the current chunk must take the data
version into account. If the data version is out of date, it
is not part of the current chunk and is an object that can be
safely recycled.
Reviewed-on: http://gerrit.openafs.org/5734
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit
1dad690fc34fdd8d9df8a3be6d580441b7cae8bb)
Change-Id: I626562d2189182b434f8da0f4f0a6213c5b695fe
Reviewed-on: http://gerrit.openafs.org/6042
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
continue;
/* don't recycle someone in our own chunk */
- if (!cm_FidCmp(&bp->fid, &scp->fid)
- && (bp->offset.LowPart & (-cm_chunkSize))
- == (offsetp->LowPart & (-cm_chunkSize)))
+ if (!cm_FidCmp(&bp->fid, &scp->fid) &&
+ bp->dataVersion >= scp->bufDataVersionLow &&
+ bp->dataVersion <= scp->dataVersion &&
+ (bp->offset.LowPart & (-cm_chunkSize)) == (offsetp->LowPart & (-cm_chunkSize))) {
continue;
+ }
/* if this page is being filled (!) or cleaned, see if
* the I/O has completed. If not, skip it, otherwise