Windows: introduce Section Object Resource Trace Subsystem
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 22 Aug 2013 21:46:19 +0000 (17:46 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 30 Aug 2013 19:10:00 +0000 (12:10 -0700)
Section Object Resource acquires and releases are lost in the
noise of all of the rest of the locks.  Introduce a dedicated
subsystem just for Section Objects.

Add missing entries at the same time.

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

src/WINNT/afsrdr/common/AFSUserDefines.h
src/WINNT/afsrdr/kernel/lib/AFSCleanup.cpp
src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp
src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp
src/WINNT/afsrdr/kernel/lib/AFSFlushBuffers.cpp
src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp
src/WINNT/afsrdr/kernel/lib/AFSLockControl.cpp
src/WINNT/afsrdr/kernel/lib/AFSRead.cpp
src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp

index 421fe2c..9aa40e0 100644 (file)
 #define AFS_SUBSYSTEM_INIT_PROCESSING       0x00080000  // Redirector Initialization
 #define AFS_SUBSYSTEM_NAME_ARRAY_PROCESSING 0x00100000  // Name Array Processing
 #define AFS_SUBSYSTEM_NAME_ARRAY_REF_COUNTING 0x00200000  // Name Array DirectoryCB refcnts
+#define AFS_SUBSYSTEM_SECTION_OBJECT        0x00400000  // Section Object Resource
 #define AFS_SUBSYSTEM_FCB_ALLOCATION        0x01000000  // AFSFileCB Allocation
 #define AFS_SUBSYSTEM_DIRENTRY_ALLOCATION   0x02000000  // AFSDirectoryCB Allocation
 #define AFS_SUBSYSTEM_OBJINFO_ALLOCATION    0x04000000  // AFSObjectInformationCB Allocation
index af150ca..493fefe 100644 (file)
@@ -234,7 +234,7 @@ AFSCleanup( IN PDEVICE_OBJECT LibDeviceObject,
                 // We may be performing some cleanup on the Fcb so grab it exclusive to ensure no collisions
                 //
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSCleanup Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                               &pFcb->NPFcb->SectionObjectResource,
@@ -335,7 +335,7 @@ AFSCleanup( IN PDEVICE_OBJECT LibDeviceObject,
                    SetFlag( pObjectInfo->Fcb->Flags, AFS_FCB_FLAG_PURGE_ON_CLOSE);
                 }
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSCleanup Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                               &pFcb->NPFcb->SectionObjectResource,
index 8ec3d8b..3df5646 100644 (file)
@@ -3018,7 +3018,7 @@ AFSProcessOpen( IN PIRP Irp,
 
                 BOOLEAN bMmFlushed;
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSProcessOpen Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                               &pObjectInfo->Fcb->NPFcb->SectionObjectResource,
@@ -3050,7 +3050,7 @@ AFSProcessOpen( IN PIRP Irp,
                                  ntStatus));
                }
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSProcessOpen Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                               &pObjectInfo->Fcb->NPFcb->SectionObjectResource,
@@ -3517,7 +3517,7 @@ AFSProcessOverwriteSupersede( IN PDEVICE_OBJECT DeviceObject,
             }
         }
 
-        AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+       AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                       AFS_TRACE_LEVEL_VERBOSE,
                       "AFSProcessOverwriteSupercede Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                       &pObjectInfo->Fcb->NPFcb->SectionObjectResource,
@@ -3554,7 +3554,7 @@ AFSProcessOverwriteSupersede( IN PDEVICE_OBJECT DeviceObject,
                          ntStatus));
        }
 
-        AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+       AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                       AFS_TRACE_LEVEL_VERBOSE,
                       "AFSProcessOverwriteSupercede Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                       &pObjectInfo->Fcb->NPFcb->SectionObjectResource,
index 91633ee..cbbfe63 100644 (file)
@@ -2201,7 +2201,7 @@ AFSSetDispositionInfo( IN PIRP Irp,
             {
                 BOOLEAN bMmFlushed;
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSSetDispositionInfo Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                               &pFcb->NPFcb->SectionObjectResource,
@@ -2272,7 +2272,7 @@ AFSSetDispositionInfo( IN PIRP Irp,
                                  ntStatus));
                }
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSSetDispositionInfo Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                               &pFcb->NPFcb->SectionObjectResource,
@@ -3453,7 +3453,7 @@ AFSSetRenameInfo( IN PIRP Irp)
                 // permit the locks to be obtained out of order risking a deadlock.
                 //
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSSetRenameInfo Acquiring Fcb lock %p EXCL %08lX\n",
                               &pTargetFcb->NPFcb->Resource,
@@ -3462,7 +3462,7 @@ AFSSetRenameInfo( IN PIRP Irp)
                 AFSAcquireExcl( &pTargetFcb->NPFcb->Resource,
                                 TRUE);
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSSetRenameInfo Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                               &pTargetFcb->NPFcb->SectionObjectResource,
@@ -3503,7 +3503,7 @@ AFSSetRenameInfo( IN PIRP Irp)
                                  ntStatus));
                 }
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSSetRenameInfo Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                               &pTargetFcb->NPFcb->SectionObjectResource,
@@ -3645,7 +3645,7 @@ AFSSetAllocationInfo( IN PIRP Irp,
     if( pFcb->Header.AllocationSize.QuadPart > pBuffer->AllocationSize.QuadPart)
     {
 
-        AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+       AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                       AFS_TRACE_LEVEL_VERBOSE,
                       "AFSSetAllocationInfo Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                       &pFcb->NPFcb->SectionObjectResource,
@@ -3677,7 +3677,7 @@ AFSSetAllocationInfo( IN PIRP Irp,
                          ntStatus));
        }
 
-        AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+       AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                       AFS_TRACE_LEVEL_VERBOSE,
                       "AFSSetAllocationInfo Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                       &pFcb->NPFcb->SectionObjectResource,
@@ -3871,7 +3871,7 @@ AFSSetEndOfFileInfo( IN PIRP Irp,
         if( pBuffer->EndOfFile.QuadPart < pFcb->Header.FileSize.QuadPart)
         {
 
-            AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+           AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                           AFS_TRACE_LEVEL_VERBOSE,
                           "AFSSetEndOfFileInfo Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                           &pFcb->NPFcb->SectionObjectResource,
@@ -3903,7 +3903,7 @@ AFSSetEndOfFileInfo( IN PIRP Irp,
                              ntStatus));
            }
 
-            AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+           AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                           AFS_TRACE_LEVEL_VERBOSE,
                           "AFSSetEndOfFileInfo Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                           &pFcb->NPFcb->SectionObjectResource,
index 2803f85..0e58603 100644 (file)
@@ -87,7 +87,7 @@ AFSFlushBuffers( IN PDEVICE_OBJECT LibDeviceObject,
             try_return( ntStatus = STATUS_INVALID_PARAMETER);
         }
 
-        AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+       AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                       AFS_TRACE_LEVEL_VERBOSE,
                       "AFSFlushBuffers Acquiring Fcb SectionObject lock %p SHARED %08lX\n",
                       &pFcb->NPFcb->SectionObjectResource,
@@ -130,7 +130,7 @@ AFSFlushBuffers( IN PDEVICE_OBJECT LibDeviceObject,
             try_return( ntStatus = GetExceptionCode());
         }
 
-        AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+       AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                       AFS_TRACE_LEVEL_VERBOSE,
                       "AFSFlushBuffers Releasing Fcb SectionObject lock %p SHARED %08lX\n",
                       &pFcb->NPFcb->SectionObjectResource,
@@ -162,7 +162,7 @@ try_exit:
         if ( bReleaseSectionObject)
         {
 
-            AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+           AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                           AFS_TRACE_LEVEL_VERBOSE,
                           "AFSFlushBuffers Releasing Fcb SectionObject lock %p SHARED %08lX\n",
                           &pFcb->NPFcb->SectionObjectResource,
index 88f6db7..8ae2def 100644 (file)
@@ -1870,6 +1870,12 @@ AFSInvalidateObject( IN OUT AFSObjectInfoCB **ppObjectInfo,
                               (*ppObjectInfo)->FileId.Vnode,
                               (*ppObjectInfo)->FileId.Unique));
 
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
+                             AFS_TRACE_LEVEL_VERBOSE,
+                             "AFSInvalidateObject Flush/purge Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
+                             &(*ppObjectInfo)->Fcb->NPFcb->SectionObjectResource,
+                             PsGetCurrentThread()));
+
                 AFSAcquireExcl( &(*ppObjectInfo)->Fcb->NPFcb->SectionObjectResource,
                                 TRUE);
 
@@ -1936,6 +1942,12 @@ AFSInvalidateObject( IN OUT AFSObjectInfoCB **ppObjectInfo,
                     SetFlag( (*ppObjectInfo)->Fcb->Flags, AFS_FCB_FLAG_PURGE_ON_CLOSE);
                 }
 
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
+                             AFS_TRACE_LEVEL_VERBOSE,
+                             "AFSInvalidateObject Flush/purge Releasing Fcb SectionObject lock %p EXCL %08lX\n",
+                             &(*ppObjectInfo)->Fcb->NPFcb->SectionObjectResource,
+                             PsGetCurrentThread()));
+
                 AFSReleaseResource( &(*ppObjectInfo)->Fcb->NPFcb->SectionObjectResource);
 
                 //
@@ -3060,6 +3072,12 @@ AFSVerifyEntry( IN GUID *AuthGroup,
                                   pObjectInfo->FileId.Vnode,
                                   pObjectInfo->FileId.Unique));
 
+                   AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
+                                 AFS_TRACE_LEVEL_VERBOSE,
+                                 "AFSVerifyEntry Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
+                                 &pObjectInfo->Fcb->NPFcb->SectionObjectResource,
+                                 PsGetCurrentThread()));
+
                     AFSAcquireExcl( &pObjectInfo->Fcb->NPFcb->SectionObjectResource,
                                     TRUE);
 
@@ -3128,6 +3146,12 @@ AFSVerifyEntry( IN GUID *AuthGroup,
                         SetFlag( pObjectInfo->Fcb->Flags, AFS_FCB_FLAG_PURGE_ON_CLOSE);
                     }
 
+                   AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
+                                 AFS_TRACE_LEVEL_VERBOSE,
+                                 "AFSVerifyEntry Releasing Fcb SectionObject lock %p EXCL %08lX\n",
+                                 &pObjectInfo->Fcb->NPFcb->SectionObjectResource,
+                                 PsGetCurrentThread()));
+
                     AFSReleaseResource( &pObjectInfo->Fcb->NPFcb->SectionObjectResource);
 
                     if ( bPurgeExtents)
@@ -3137,7 +3161,7 @@ AFSVerifyEntry( IN GUID *AuthGroup,
                     }
 
                     //
-                    // Reacquire the Fcb to purge the cache
+                   // Acquire the Fcb to purge the cache
                     //
 
                     AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
@@ -4357,7 +4381,7 @@ AFSValidateEntry( IN AFSDirectoryCB *DirEntry,
                     {
                         FILE_OBJECT *pCCFileObject;
 
-                        AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+                       AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                                       AFS_TRACE_LEVEL_VERBOSE,
                                       "AFSValidateEntry Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                                       &pObjectInfo->Fcb->NPFcb->SectionObjectResource,
@@ -4396,7 +4420,7 @@ AFSValidateEntry( IN AFSDirectoryCB *DirEntry,
                                          ntStatus));
                         }
 
-                        AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+                       AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                                       AFS_TRACE_LEVEL_VERBOSE,
                                       "AFSValidateEntry Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                                       &pObjectInfo->Fcb->NPFcb->SectionObjectResource,
@@ -6872,7 +6896,7 @@ AFSCleanupFcb( IN AFSFcb *Fcb,
                 if( Fcb->OpenReferenceCount > 0)
                 {
 
-                    AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+                   AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                                   AFS_TRACE_LEVEL_VERBOSE,
                                   "AFSCleanupEntry Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                                   &Fcb->NPFcb->SectionObjectResource,
@@ -6943,7 +6967,7 @@ AFSCleanupFcb( IN AFSFcb *Fcb,
                         SetFlag( Fcb->Flags, AFS_FCB_FLAG_PURGE_ON_CLOSE);
                     }
 
-                    AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+                   AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                                   AFS_TRACE_LEVEL_VERBOSE,
                                   "AFSCleanupFcb Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                                   &Fcb->NPFcb->SectionObjectResource,
@@ -7038,7 +7062,7 @@ AFSCleanupFcb( IN AFSFcb *Fcb,
                                         (AFS_SERVER_PURGE_SLEEP * pControlDeviceExt->Specific.Control.FcbPurgeTimeCount.QuadPart))))
         {
 
-            AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+           AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                           AFS_TRACE_LEVEL_VERBOSE,
                           "AFSCleanupFcb Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                           &Fcb->NPFcb->SectionObjectResource,
@@ -7108,7 +7132,7 @@ AFSCleanupFcb( IN AFSFcb *Fcb,
                                   ntStatus));
                 }
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSCleanupFcb Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                               &Fcb->NPFcb->SectionObjectResource,
@@ -7130,6 +7154,12 @@ AFSCleanupFcb( IN AFSFcb *Fcb,
             else
             {
 
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
+                             AFS_TRACE_LEVEL_VERBOSE,
+                             "AFSCleanupFcb Failed to Acquire Fcb SectionObject lock %p EXCL %08lX\n",
+                             &Fcb->NPFcb->SectionObjectResource,
+                             PsGetCurrentThread()));
+
                 ntStatus = STATUS_RETRY;
             }
         }
@@ -9107,7 +9137,7 @@ AFSPerformObjectInvalidate( IN AFSObjectInfoCB *ObjectInfo,
                     if( BooleanFlagOn( pRDRDevExt->DeviceFlags, AFS_DEVICE_FLAG_DIRECT_SERVICE_IO))
                     {
 
-                        AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+                       AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                                       AFS_TRACE_LEVEL_VERBOSE,
                                       "AFSPerformObjectInvalidation DirectIO Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                                       &ObjectInfo->Fcb->NPFcb->SectionObjectResource,
@@ -9163,7 +9193,7 @@ AFSPerformObjectInvalidate( IN AFSObjectInfoCB *ObjectInfo,
                             SetFlag( ObjectInfo->Fcb->Flags, AFS_FCB_FLAG_PURGE_ON_CLOSE);
                         }
 
-                        AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+                       AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                                       AFS_TRACE_LEVEL_VERBOSE,
                                       "AFSPerformObjectInvalidation DirectIO Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                                       &ObjectInfo->Fcb->NPFcb->SectionObjectResource,
@@ -9226,7 +9256,7 @@ AFSPerformObjectInvalidate( IN AFSObjectInfoCB *ObjectInfo,
                                 else
                                 {
 
-                                    AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+                                   AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                                                   AFS_TRACE_LEVEL_VERBOSE,
                                                   "AFSPerformObjectInvalidation Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                                                   &ObjectInfo->Fcb->NPFcb->SectionObjectResource,
@@ -9282,7 +9312,7 @@ AFSPerformObjectInvalidate( IN AFSObjectInfoCB *ObjectInfo,
                                         SetFlag( ObjectInfo->Fcb->Flags, AFS_FCB_FLAG_PURGE_ON_CLOSE);
                                     }
 
-                                    AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+                                   AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                                                   AFS_TRACE_LEVEL_VERBOSE,
                                                   "AFSPerformObjectInvalidation Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                                                   &ObjectInfo->Fcb->NPFcb->SectionObjectResource,
@@ -9298,7 +9328,7 @@ AFSPerformObjectInvalidate( IN AFSObjectInfoCB *ObjectInfo,
 
                                 bExtentsLocked = FALSE;
 
-                                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+                               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                                               AFS_TRACE_LEVEL_VERBOSE,
                                               "AFSPerformObjectInvalidation Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                                               &ObjectInfo->Fcb->NPFcb->SectionObjectResource,
@@ -9522,7 +9552,7 @@ AFSPerformObjectInvalidate( IN AFSObjectInfoCB *ObjectInfo,
                                                   ntStatus));
                                 }
 
-                                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+                               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                                               AFS_TRACE_LEVEL_VERBOSE,
                                               "AFSPerformObjectInvalidation Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                                               &ObjectInfo->Fcb->NPFcb->SectionObjectResource,
index 05ff81c..a844da4 100644 (file)
@@ -168,7 +168,7 @@ AFSLockControl( IN PDEVICE_OBJECT LibDeviceObject,
                 // Flush data and then release the locks on the file server
                 //
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSLockControl Acquiring Fcb SectionObject lock %p SHARED %08lX\n",
                               &pFcb->NPFcb->SectionObjectResource,
@@ -216,7 +216,7 @@ AFSLockControl( IN PDEVICE_OBJECT LibDeviceObject,
                     ntStatus = stIoStatus.Status;
                 }
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSLockControl Releasing Fcb SectionObject lock %p SHARED %08lX\n",
                               &pFcb->NPFcb->SectionObjectResource,
@@ -254,7 +254,7 @@ AFSLockControl( IN PDEVICE_OBJECT LibDeviceObject,
                 // Flush the data and then release the file server locks
                 //
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSLockControl Acquiring Fcb SectionObject lock %p SHARED %08lX\n",
                               &pFcb->NPFcb->SectionObjectResource,
@@ -286,7 +286,7 @@ AFSLockControl( IN PDEVICE_OBJECT LibDeviceObject,
                                  ntStatus));
                }
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSLockControl Releasing Fcb SectionObject lock %p SHARED %08lX\n",
                               &pFcb->NPFcb->SectionObjectResource,
index ed0b180..723429d 100644 (file)
@@ -1126,7 +1126,7 @@ AFSCommonRead( IN PDEVICE_OBJECT DeviceObject,
         if ( FlagOn(pIrpSp->MinorFunction, IRP_MN_COMPLETE) )
         {
 
-            AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+           AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                           AFS_TRACE_LEVEL_VERBOSE,
                           "AFSCommonRead Acquiring Fcb SectionObject lock %p SHARED %08lX\n",
                           &pFcb->NPFcb->SectionObjectResource,
@@ -1202,7 +1202,7 @@ AFSCommonRead( IN PDEVICE_OBJECT DeviceObject,
 
             bReleasePaging = TRUE;
 
-            AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+           AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                           AFS_TRACE_LEVEL_VERBOSE,
                           "AFSCommonRead Acquiring Fcb SectionObject lock %p SHARED %08lX\n",
                           &pFcb->NPFcb->SectionObjectResource,
@@ -1217,7 +1217,7 @@ AFSCommonRead( IN PDEVICE_OBJECT DeviceObject,
         else
         {
 
-            AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+           AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                           AFS_TRACE_LEVEL_VERBOSE,
                           "AFSCommonRead Acquiring Fcb SectionObject lock %p SHARED %08lX\n",
                           &pFcb->NPFcb->SectionObjectResource,
@@ -1446,6 +1446,12 @@ AFSCommonRead( IN PDEVICE_OBJECT DeviceObject,
             if( bReleaseSectionObject)
             {
 
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
+                             AFS_TRACE_LEVEL_VERBOSE,
+                             "AFSCommonRead Releasing Fcb SectionObject lock %p SHARED %08lX\n",
+                             &pFcb->NPFcb->SectionObjectResource,
+                             PsGetCurrentThread()));
+
                 AFSReleaseResource( &pFcb->NPFcb->SectionObjectResource);
 
                 bReleaseSectionObject = FALSE;
@@ -1494,6 +1500,12 @@ try_exit:
         if( bReleaseSectionObject)
         {
 
+           AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
+                         AFS_TRACE_LEVEL_VERBOSE,
+                         "AFSCommonRead (exit) Releasing Fcb SectionObject lock %p SHARED %08lX\n",
+                         &pFcb->NPFcb->SectionObjectResource,
+                         PsGetCurrentThread()));
+
             AFSReleaseResource( &pFcb->NPFcb->SectionObjectResource);
         }
 
index 4729f7f..8b3c404 100644 (file)
@@ -354,7 +354,7 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject,
             if( pFileObject->PrivateCacheMap == NULL)
             {
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSCommonWrite Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                               &pNPFcb->SectionObjectResource,
@@ -398,7 +398,7 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject,
                                   ntStatus));
                 }
 
-                AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+               AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                               AFS_TRACE_LEVEL_VERBOSE,
                               "AFSCommonWrite Releasing Fcb SectionObject lock %p EXCL %08lX\n",
                               &pNPFcb->SectionObjectResource,
@@ -535,7 +535,7 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject,
 
                     bReleaseMain = TRUE;
 
-                    AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+                   AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                                   AFS_TRACE_LEVEL_VERBOSE,
                                   "AFSCommonWrite Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
                                   &pNPFcb->SectionObjectResource,
@@ -579,7 +579,7 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject,
 
                     bReleaseMain = TRUE;
 
-                    AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
+                   AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
                                   AFS_TRACE_LEVEL_VERBOSE,
                                   "AFSCommonWrite Acquiring Fcb SectionObject lock %p SHARED %08lX\n",
                                   &pNPFcb->SectionObjectResource,
@@ -598,6 +598,12 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject,
                     if (!bLockOK)
                     {
 
+                       AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
+                                     AFS_TRACE_LEVEL_VERBOSE,
+                                     "AFSCommonWrite Releasing Fcb SectionObject lock %p SHARED %08lX\n",
+                                     &pNPFcb->SectionObjectResource,
+                                     PsGetCurrentThread()));
+
                        AFSReleaseResource( &pNPFcb->SectionObjectResource);
 
                        bReleaseSectionObject = FALSE;
@@ -802,6 +808,12 @@ try_exit:
         if( bReleaseSectionObject)
         {
 
+           AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING|AFS_SUBSYSTEM_SECTION_OBJECT,
+                         AFS_TRACE_LEVEL_VERBOSE,
+                         "AFSCommonWrite Releasing Fcb SectionObject lock %p EXCL/SHARED %08lX\n",
+                         &pNPFcb->SectionObjectResource,
+                         PsGetCurrentThread()));
+
             AFSReleaseResource( &pNPFcb->SectionObjectResource);
         }