Windows: afsredirlib log messages
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 29 Dec 2011 17:45:16 +0000 (12:45 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 31 Dec 2011 21:17:46 +0000 (13:17 -0800)
Improve or correct a number of log messages.  Report the correct
FID or NT Status value, etc.

Change-Id: I434b47e1350767f868170323280298f77e1a840a
Reviewed-on: http://gerrit.openafs.org/6442
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/WINNT/afsrdr/kernel/lib/AFSBTreeSupport.cpp
src/WINNT/afsrdr/kernel/lib/AFSClose.cpp
src/WINNT/afsrdr/kernel/lib/AFSCommSupport.cpp
src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp
src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp

index 0e4331d..c09f8c5 100644 (file)
@@ -483,7 +483,7 @@ AFSInsertCaseInsensitiveDirEntry( IN AFSDirectoryCB *RootNode,
             {
 
                 //
-                // Inser the the entry at the end of the insensitive list
+                // Insert the the entry at the end of the insensitive list
                 //
 
                 while( pCurrentEntry->CaseInsensitiveList.fLink != NULL)
index eb48449..a757bb2 100644 (file)
@@ -377,10 +377,14 @@ AFSClose( IN PDEVICE_OBJECT LibDeviceObject,
 
                         AFSDbgLogMsg( AFS_SUBSYSTEM_CLEANUP_PROCESSING,
                                       AFS_TRACE_LEVEL_VERBOSE,
-                                      "AFSClose Deleting dir entry %08lX (%08lX) for %wZ\n",
+                                      "AFSClose Deleting dir entry %08lX (%08lX) for %wZ  FID %08lX-%08lX-%08lX-%08lX\n",
                                       pDirCB,
                                       pObjectInfo,
-                                      &pDirCB->NameInformation.FileName);
+                                      &pDirCB->NameInformation.FileName,
+                                      pObjectInfo->FileId.Cell,
+                                      pObjectInfo->FileId.Volume,
+                                      pObjectInfo->FileId.Vnode,
+                                      pObjectInfo->FileId.Unique);
 
                         //
                         // Remove and delete the directory entry from the parent list
index f8fa9f8..4c18cc6 100644 (file)
@@ -832,10 +832,10 @@ AFSVerifyDirectoryContent( IN AFSObjectInfoCB *ObjectInfoCB,
                                                   AFS_TRACE_LEVEL_VERBOSE,
                                                   "AFSVerifyDirectoryContent Setting VERIFY on entry %wZ for FID %08lX-%08lX-%08lX-%08lX\n",
                                                   &uniDirName,
-                                                  ObjectInfoCB->FileId.Cell,
-                                                  ObjectInfoCB->FileId.Volume,
-                                                  ObjectInfoCB->FileId.Vnode,
-                                                  ObjectInfoCB->FileId.Unique);
+                                                  pObjectInfo->FileId.Cell,
+                                                  pObjectInfo->FileId.Volume,
+                                                  pObjectInfo->FileId.Vnode,
+                                                  pObjectInfo->FileId.Unique);
 
                                     SetFlag( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY);
                                     pObjectInfo->DataVersion.QuadPart = (ULONGLONG)-1;
@@ -884,10 +884,10 @@ AFSVerifyDirectoryContent( IN AFSObjectInfoCB *ObjectInfoCB,
                                       "AFSVerifyDirectoryContent Different FIDs - Deleting DE %p for %wZ Old FID %08lX-%08lX-%08lX-%08lX New FID %08lX-%08lX-%08lX-%08lX\n",
                                       pDirNode,
                                       &pDirNode->NameInformation.FileName,
-                                      ObjectInfoCB->FileId.Cell,
-                                      ObjectInfoCB->FileId.Volume,
-                                      ObjectInfoCB->FileId.Vnode,
-                                      ObjectInfoCB->FileId.Unique,
+                                      pDirNode->ObjectInformation->FileId.Cell,
+                                      pDirNode->ObjectInformation->FileId.Volume,
+                                      pDirNode->ObjectInformation->FileId.Vnode,
+                                      pDirNode->ObjectInformation->FileId.Unique,
                                       pCurrentDirEntry->FileId.Cell,
                                       pCurrentDirEntry->FileId.Volume,
                                       pCurrentDirEntry->FileId.Vnode,
@@ -906,10 +906,10 @@ AFSVerifyDirectoryContent( IN AFSObjectInfoCB *ObjectInfoCB,
                                       "AFSVerifyDirectoryContent Different FIDs - removing DE %p for %wZ Old FID %08lX-%08lX-%08lX-%08lX New FID %08lX-%08lX-%08lX-%08lX\n",
                                       pDirNode,
                                       &pDirNode->NameInformation.FileName,
-                                      ObjectInfoCB->FileId.Cell,
-                                      ObjectInfoCB->FileId.Volume,
-                                      ObjectInfoCB->FileId.Vnode,
-                                      ObjectInfoCB->FileId.Unique,
+                                      pDirNode->ObjectInformation->FileId.Cell,
+                                      pDirNode->ObjectInformation->FileId.Volume,
+                                      pDirNode->ObjectInformation->FileId.Vnode,
+                                      pDirNode->ObjectInformation->FileId.Unique,
                                       pCurrentDirEntry->FileId.Cell,
                                       pCurrentDirEntry->FileId.Volume,
                                       pCurrentDirEntry->FileId.Vnode,
@@ -1023,7 +1023,7 @@ AFSVerifyDirectoryContent( IN AFSObjectInfoCB *ObjectInfoCB,
                     {
                         AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                                       AFS_TRACE_LEVEL_VERBOSE,
-                                      "AFSVerifyDirectoryContent Failed to nsert DE %p to case sensitive tree for %wZ\n",
+                                      "AFSVerifyDirectoryContent Failed to insert DE %p to case sensitive tree for %wZ\n",
                                       pDirNode,
                                       &pDirNode->NameInformation.FileName);
 
index e8d7356..1b9c5f7 100644 (file)
@@ -694,15 +694,15 @@ AFSCommonCreate( IN PDEVICE_OBJECT DeviceObject,
                 // fail with collision
                 //
 
-                AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
-                              AFS_TRACE_LEVEL_VERBOSE,
-                              "AFSCommonCreate Object name collision on create of %wZ Status %08lX\n",
-                              &pDirectoryCB->NameInformation.FileName,
-                              ntStatus);
-
                 if( pDirectoryCB != NULL)
                 {
 
+                    AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                  AFS_TRACE_LEVEL_VERBOSE,
+                                  "AFSCommonCreate Object name collision on create of %wZ Status %08lX\n",
+                                  &pDirectoryCB->NameInformation.FileName,
+                                  ntStatus);
+
                     InterlockedDecrement( &pDirectoryCB->OpenReferenceCount);
 
                     AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING,
@@ -716,6 +716,11 @@ AFSCommonCreate( IN PDEVICE_OBJECT DeviceObject,
                 else
                 {
 
+                    AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+                                  AFS_TRACE_LEVEL_VERBOSE,
+                                  "AFSCommonCreate Object name collision on create Status %08lX\n",
+                                  ntStatus);
+
                     InterlockedDecrement( &pParentDirectoryCB->OpenReferenceCount);
 
                     AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING,
@@ -1941,8 +1946,8 @@ AFSProcessCreate( IN PIRP               Irp,
 
             AFSFsRtlNotifyFullReportChange( pParentObjectInfo,
                                             *Ccb,
-                                                                               (ULONG)FILE_NOTIFY_CHANGE_FILE_NAME,
-                                                                               (ULONG)FILE_ACTION_ADDED);
+                                            (ULONG)FILE_NOTIFY_CHANGE_FILE_NAME,
+                                            (ULONG)FILE_ACTION_ADDED);
 
             (*Fcb)->NPFcb->Specific.File.ExtentsRequestStatus = STATUS_SUCCESS;
         }
@@ -1967,8 +1972,8 @@ AFSProcessCreate( IN PIRP               Irp,
 
             AFSFsRtlNotifyFullReportChange( pParentObjectInfo,
                                             *Ccb,
-                                                                               (ULONG)FILE_NOTIFY_CHANGE_DIR_NAME,
-                                                                               (ULONG)FILE_ACTION_ADDED);
+                                            (ULONG)FILE_NOTIFY_CHANGE_DIR_NAME,
+                                            (ULONG)FILE_ACTION_ADDED);
         }
         else if( (*Fcb)->Header.NodeTypeCode == AFS_MOUNT_POINT_FCB ||
                  (*Fcb)->Header.NodeTypeCode == AFS_SYMBOLIC_LINK_FCB ||
@@ -1987,8 +1992,8 @@ AFSProcessCreate( IN PIRP               Irp,
 
             AFSFsRtlNotifyFullReportChange( pParentObjectInfo,
                                             *Ccb,
-                                                                               (ULONG)FILE_NOTIFY_CHANGE_DIR_NAME,
-                                                                               (ULONG)FILE_ACTION_ADDED);
+                                            (ULONG)FILE_NOTIFY_CHANGE_DIR_NAME,
+                                            (ULONG)FILE_ACTION_ADDED);
         }
 
         //
index 258e671..dff36d2 100644 (file)
@@ -154,7 +154,7 @@ AFSLocateNameEntry( IN GUID *AuthGroup,
                               pCurrentObject->FileId.Volume,
                               pCurrentObject->FileId.Vnode,
                               pCurrentObject->FileId.Unique,
-                              ntStatus);
+                              STATUS_FILE_DELETED);
 
                 try_return( ntStatus = STATUS_FILE_DELETED);
             }
@@ -171,7 +171,7 @@ AFSLocateNameEntry( IN GUID *AuthGroup,
                               pCurrentObject->FileId.Volume,
                               pCurrentObject->FileId.Vnode,
                               pCurrentObject->FileId.Unique,
-                              ntStatus);
+                              STATUS_DELETE_PENDING);
 
                 try_return( ntStatus = STATUS_DELETE_PENDING);
             }
@@ -1557,7 +1557,7 @@ AFSLocateNameEntry( IN GUID *AuthGroup,
 
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                               AFS_TRACE_LEVEL_ERROR,
-                              "AFSLocateNameEntry (FO: %08lX) Deleted parent %wZ FID %08lX-%08lX-%08lX-%08lX\n",
+                              "AFSLocateNameEntry (FO: %08lX) Deleted entry %wZ FID %08lX-%08lX-%08lX-%08lX\n",
                               FileObject,
                               &pDirEntry->NameInformation.FileName,
                               pCurrentObject->FileId.Cell,
@@ -1581,7 +1581,7 @@ AFSLocateNameEntry( IN GUID *AuthGroup,
                 if( InterlockedDecrement( &pDirEntry->OpenReferenceCount) == 0)
                 {
 
-                    AFSDbgLogMsg( AFS_SUBSYSTEM_CLEANUP_PROCESSING,
+                    AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING|AFS_SUBSYSTEM_CLEANUP_PROCESSING,
                                   AFS_TRACE_LEVEL_VERBOSE,
                                   "AFSLocateNameEntry Deleting dir entry %08lX (%08lX) for %wZ\n",
                                   pDirEntry,