Windows: Add trace to track setting VERIFY flag
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 2 Sep 2013 18:34:32 +0000 (14:34 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Tue, 3 Sep 2013 19:20:20 +0000 (12:20 -0700)
Add trace statements at each location the VERIFY flag is set or
cleared.

Change-Id: I108d3d44947bc92f147afb66f746af3262435104
Reviewed-on: http://gerrit.openafs.org/10216
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp
src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp

index 470aefa..b0f8f53 100644 (file)
@@ -109,6 +109,14 @@ AFSQueryFileInfo( IN PDEVICE_OBJECT LibDeviceObject,
             if ( NT_SUCCESS( ntStatus))
             {
 
+               AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
+                             AFS_TRACE_LEVEL_VERBOSE,
+                             "AFSQueryFileInfo FID %08lX-%08lX-%08lX-%08lX Clearing Verify Flag\n",
+                             pFcb->ObjectInformation->FileId.Cell,
+                             pFcb->ObjectInformation->FileId.Volume,
+                             pFcb->ObjectInformation->FileId.Vnode,
+                             pFcb->ObjectInformation->FileId.Unique));
+
                 ClearFlag( pFcb->ObjectInformation->Flags, AFS_OBJECT_FLAGS_VERIFY);
             }
             else
index 94fb9e1..a9f298b 100644 (file)
@@ -1146,10 +1146,18 @@ AFSInitDirEntry( IN AFSObjectInfoCB *ParentObjectInfo,
 
             pObjectInfoCB->Expiration = DirEnumEntry->Expiration;
 
-            pObjectInfoCB->DataVersion = DirEnumEntry->DataVersion;
+           pObjectInfoCB->DataVersion = DirEnumEntry->DataVersion;
 
-            ClearFlag( pObjectInfoCB->Flags, AFS_OBJECT_FLAGS_VERIFY);
-        }
+           AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
+                         AFS_TRACE_LEVEL_VERBOSE,
+                         "AFSInitDirEntry FID %08lX-%08lX-%08lX-%08lX Clearing Verify Flag\n",
+                         pObjectInfoCB->FileId.Cell,
+                         pObjectInfoCB->FileId.Volume,
+                         pObjectInfoCB->FileId.Vnode,
+                         pObjectInfoCB->FileId.Unique));
+
+           ClearFlag( pObjectInfoCB->Flags, AFS_OBJECT_FLAGS_VERIFY);
+       }
 
         //
         // This reference count is either stored into the return DirectoryCB
@@ -2970,7 +2978,7 @@ AFSVerifyEntry( IN GUID *AuthGroup,
 
            AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
                          AFS_TRACE_LEVEL_VERBOSE,
-                         "AFSVerifyEntry No DV change %I64X for Fcb %wZ FID %08lX-%08lX-%08lX-%08lX\n",
+                         "AFSVerifyEntry No DV change %I64X for Fcb %wZ FID %08lX-%08lX-%08lX-%08lX Clearing Verify Flag\n",
                          pObjectInfo->DataVersion.QuadPart,
                          &DirEntry->NameInformation.FileName,
                          pObjectInfo->FileId.Cell,
@@ -3017,6 +3025,14 @@ AFSVerifyEntry( IN GUID *AuthGroup,
                 if( NT_SUCCESS( ntStatus))
                 {
 
+                   AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                 AFS_TRACE_LEVEL_VERBOSE,
+                                 "AFSVerifyEntry MountPoint FID %08lX-%08lX-%08lX-%08lX Clearing Verify Flag\n",
+                                 pObjectInfo->FileId.Cell,
+                                 pObjectInfo->FileId.Volume,
+                                 pObjectInfo->FileId.Vnode,
+                                 pObjectInfo->FileId.Unique));
+
                     ClearFlag( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY);
                 }
 
@@ -3036,6 +3052,14 @@ AFSVerifyEntry( IN GUID *AuthGroup,
                 if( NT_SUCCESS( ntStatus))
                 {
 
+                   AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                 AFS_TRACE_LEVEL_VERBOSE,
+                                 "AFSVerifyEntry Symlink FID %08lX-%08lX-%08lX-%08lX Clearing Verify Flag\n",
+                                 pObjectInfo->FileId.Cell,
+                                 pObjectInfo->FileId.Volume,
+                                 pObjectInfo->FileId.Vnode,
+                                 pObjectInfo->FileId.Unique));
+
                     ClearFlag( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY);
                 }
 
@@ -3314,6 +3338,14 @@ AFSVerifyEntry( IN GUID *AuthGroup,
                if ( NT_SUCCESS( ntStatus))
                {
 
+                   AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                 AFS_TRACE_LEVEL_VERBOSE,
+                                 "AFSVerifyEntry File FID %08lX-%08lX-%08lX-%08lX Clearing Verify Flag\n",
+                                 pObjectInfo->FileId.Cell,
+                                 pObjectInfo->FileId.Volume,
+                                 pObjectInfo->FileId.Vnode,
+                                 pObjectInfo->FileId.Unique));
+
                    ClearFlag( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY);
                }
                 break;
@@ -3364,6 +3396,14 @@ AFSVerifyEntry( IN GUID *AuthGroup,
                 if( NT_SUCCESS( ntStatus))
                 {
 
+                   AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                 AFS_TRACE_LEVEL_VERBOSE,
+                                 "AFSVerifyEntry Directory FID %08lX-%08lX-%08lX-%08lX Clearing Verify Flag\n",
+                                 pObjectInfo->FileId.Cell,
+                                 pObjectInfo->FileId.Volume,
+                                 pObjectInfo->FileId.Vnode,
+                                 pObjectInfo->FileId.Unique));
+
                     ClearFlag( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY);
                 }
 
@@ -3424,6 +3464,14 @@ AFSVerifyEntry( IN GUID *AuthGroup,
                 if( NT_SUCCESS( ntStatus))
                 {
 
+                   AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                 AFS_TRACE_LEVEL_VERBOSE,
+                                 "AFSVerifyEntry DFSLink FID %08lX-%08lX-%08lX-%08lX Clearing Verify Flag\n",
+                                 pObjectInfo->FileId.Cell,
+                                 pObjectInfo->FileId.Volume,
+                                 pObjectInfo->FileId.Vnode,
+                                 pObjectInfo->FileId.Unique));
+
                     ClearFlag( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY);
                 }
 
@@ -4146,6 +4194,14 @@ AFSValidateEntry( IN AFSDirectoryCB *DirEntry,
                 if( NT_SUCCESS( ntStatus))
                 {
 
+                   AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                 AFS_TRACE_LEVEL_VERBOSE,
+                                 "AFSValidateEntry MountPoint FID %08lX-%08lX-%08lX-%08lX Clearing Verify Flag\n",
+                                 pObjectInfo->FileId.Cell,
+                                 pObjectInfo->FileId.Volume,
+                                 pObjectInfo->FileId.Vnode,
+                                 pObjectInfo->FileId.Unique));
+
                     ClearFlag( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY | AFS_OBJECT_FLAGS_NOT_EVALUATED);
                 }
 
@@ -4166,6 +4222,14 @@ AFSValidateEntry( IN AFSDirectoryCB *DirEntry,
                 if( NT_SUCCESS( ntStatus))
                 {
 
+                   AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                 AFS_TRACE_LEVEL_VERBOSE,
+                                 "AFSValidateEntry Symlink FID %08lX-%08lX-%08lX-%08lX Clearing Verify Flag\n",
+                                 pObjectInfo->FileId.Cell,
+                                 pObjectInfo->FileId.Volume,
+                                 pObjectInfo->FileId.Vnode,
+                                 pObjectInfo->FileId.Unique));
+
                     ClearFlag( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY | AFS_OBJECT_FLAGS_NOT_EVALUATED);
                 }
 
@@ -4394,6 +4458,14 @@ AFSValidateEntry( IN AFSDirectoryCB *DirEntry,
                         break;
                     }
 
+                   AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                 AFS_TRACE_LEVEL_VERBOSE,
+                                 "AFSValidateEntry File FID %08lX-%08lX-%08lX-%08lX No Purge Clearing Verify Flag\n",
+                                 pObjectInfo->FileId.Cell,
+                                 pObjectInfo->FileId.Volume,
+                                 pObjectInfo->FileId.Vnode,
+                                 pObjectInfo->FileId.Unique));
+
                     ClearFlag( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY | AFS_OBJECT_FLAGS_NOT_EVALUATED);
 
                     //
@@ -4520,6 +4592,14 @@ AFSValidateEntry( IN AFSDirectoryCB *DirEntry,
                 if( NT_SUCCESS( ntStatus))
                 {
 
+                   AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                 AFS_TRACE_LEVEL_VERBOSE,
+                                 "AFSValidateEntry Directory FID %08lX-%08lX-%08lX-%08lX Clearing Verify Flag\n",
+                                 pObjectInfo->FileId.Cell,
+                                 pObjectInfo->FileId.Volume,
+                                 pObjectInfo->FileId.Vnode,
+                                 pObjectInfo->FileId.Unique));
+
                     ClearFlag( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY | AFS_OBJECT_FLAGS_NOT_EVALUATED);
                 }
 
@@ -9203,6 +9283,16 @@ AFSPerformObjectInvalidate( IN AFSObjectInfoCB *ObjectInfo,
                     ObjectInfo->Fcb != NULL)
                 {
 
+                   AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                 AFS_TRACE_LEVEL_VERBOSE,
+                                 "AFSPerformObjectInvalidation on node type %d for FID %08lX-%08lX-%08lX-%08lX Reason DATA_VERSION FCB %0p\n",
+                                 ObjectInfo->FileType,
+                                 ObjectInfo->FileId.Cell,
+                                 ObjectInfo->FileId.Volume,
+                                 ObjectInfo->FileId.Vnode,
+                                 ObjectInfo->FileId.Unique,
+                                 ObjectInfo->Fcb));
+
                     if( BooleanFlagOn( pRDRDevExt->DeviceFlags, AFS_DEVICE_FLAG_DIRECT_SERVICE_IO))
                     {
 
@@ -9683,7 +9773,7 @@ AFSPerformObjectInvalidate( IN AFSObjectInfoCB *ObjectInfo,
 
                 break;
             }
-        }
+       }
 
         //
         // Destroy the reference passed in by the caller to AFSInvalidateObject