]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: out of date version not in current chunk
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 28 Oct 2011 15:36:10 +0000 (11:36 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 28 Oct 2011 21:42:11 +0000 (14:42 -0700)
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.

Change-Id: Id8ca0a897a0a65efc1cabbe39107ca210b48bd4e
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>
src/WINNT/afsd/cm_buf.c

index d34281e5c79d177dac1ccc93b3d99cfdaf63e893..b45263ae26b4278d9b1b72b4cbee6f5782276954 100644 (file)
@@ -1333,9 +1333,10 @@ long buf_GetNewLocked(struct cm_scache *scp, osi_hyper_t *offsetp, cm_req_t *req
              */
 
             /* 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))) {
                 n_own++;
                 continue;
             }