From 229131ab12d3c62a650ebff8c97acd5778f5bca1 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 24 Apr 2012 15:41:39 -0400 Subject: [PATCH] Windows: AFSValidateEntry CcPurge on DV change The variable bPurgeExtents was not being set when a DV change was detected in AFSValidateEntry(). This resulted in the purge being skipped and old data being left in the cache. Change-Id: I6f5a35e5c7a51d28267e0ff25318782a766771ac Reviewed-on: http://gerrit.openafs.org/7280 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp b/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp index ea260f7f8b..0dca9fdd60 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp @@ -3967,6 +3967,24 @@ AFSValidateEntry( IN AFSDirectoryCB *DirEntry, pObjectInfo->FileId.Vnode, pObjectInfo->FileId.Unique); + if ( pObjectInfo->DataVersion.QuadPart != pDirEnumEntry->DataVersion.QuadPart) + { + + AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING, + AFS_TRACE_LEVEL_VERBOSE, + "AFSValidateEntry DV Change %wZ FID %08lX-%08lX-%08lX-%08lX (%08lX != %08lX)\n", + &DirEntry->NameInformation.FileName, + pObjectInfo->FileId.Cell, + pObjectInfo->FileId.Volume, + pObjectInfo->FileId.Vnode, + pObjectInfo->FileId.Unique, + pObjectInfo->DataVersion.LowPart, + pDirEnumEntry->DataVersion.LowPart + ); + + bPurgeExtents = TRUE; + } + if ( BooleanFlagOn( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY_DATA)) { bPurgeExtents = TRUE;