Windows: dir buffers out of date - mark them as such

if cm_CheckForSingleDirChange() fails, mark the cm_scache_t
bufDataVersionLow as the current data version so that old directory
buffers are discarded.

Change-Id: I8d587a024027e74e66190fdc993564b640993b4c
Reviewed-on: http://gerrit.openafs.org/6498
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
Jeffrey Altman 2012-01-03 21:10:32 -05:00 committed by Jeffrey Altman
parent 7a25010a6e
commit e77b6858ee

View File

@ -1169,14 +1169,23 @@ cm_CheckDirOpForSingleChange(cm_dirOp_t * op)
code = cm_DirCheckStatus(op, 1);
if (code == 0 &&
op->dataVersion == op->scp->dataVersion - 1) {
/* only one set of changes happened between cm_BeginDirOp()
and this function. It is safe for us to perform local
changes. */
op->dataVersion == op->scp->dataVersion - 1)
{
/*
* only one set of changes happened between cm_BeginDirOp()
* and this function. It is safe for us to perform local
* changes. */
op->newDataVersion = op->scp->dataVersion;
op->newLength = op->scp->serverLength;
rc = 1;
} else {
/*
* The directory buffers are no longer up to date.
*/
op->scp->bufDataVersionLow = op->scp->dataVersion;
rc = 0;
}
if (rc)