]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: Remove Fcb.Specific.File.LazyWriterThread
authorJeffrey Altman <jaltman@your-file-system.com>
Tue, 16 Oct 2012 13:08:37 +0000 (09:08 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 19 Oct 2012 09:50:06 +0000 (02:50 -0700)
The LazyWriterThread should not be recorded in the FCB.  It is
possible for multiple lazy writes to occur on a file in parallel
in separate threads.  The value is not used for anything in any
case.  AFSCommonWrite() tests the LazyWriterThread value but only
if 'bMapped' is FALSE.  Since 'bMapped' is always TRUE, the
comparison is never performed.   Remove the test and the value.

Change-Id: Iddbb65d2125f39f0362aba72ae20ab2666944367
Reviewed-on: http://gerrit.openafs.org/8241
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/common/AFSRedirCommonStructs.h
src/WINNT/afsrdr/kernel/fs/AFSGeneric.cpp
src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp

index 217ecc739f45cf12f3a56e51a90a4f6998f0d35c..1303ec83897b633ff5c414f3b7dafb77f3397431 100644 (file)
@@ -376,12 +376,6 @@ typedef struct AFS_FCB
 
             LONG                ExtentCount;
 
-            //
-            // The Lazy writer thread
-            //
-
-            PETHREAD            LazyWriterThread;
-
             //
             // Current count of queued flush items for the file
             //
index 0ec1ed66fdc0655ca54d34483ef893760cf2eb64..3b867371ead867e90f6da8b8233ecfb30fe665e6 100644 (file)
@@ -1553,10 +1553,6 @@ AFSAcquireFcbForLazyWrite( IN PVOID Fcb,
                   "AFSAcquireFcbForLazyWrite Acquiring Fcb %08lX\n",
                   Fcb);
 
-    ASSERT( NULL == pFcb->Specific.File.LazyWriterThread);
-
-    pFcb->Specific.File.LazyWriterThread = PsGetCurrentThread();
-
     AFSDbgLogMsg( AFS_SUBSYSTEM_LOCK_PROCESSING,
                   AFS_TRACE_LEVEL_VERBOSE,
                   "AFSAcquireFcbForLazyWrite Attempt to acquire Fcb lock %08lX SHARED %08lX\n",
@@ -1639,11 +1635,6 @@ AFSReleaseFcbFromLazyWrite( IN PVOID Fcb)
 
     IoSetTopLevelIrp( NULL);
 
-    ASSERT( PsGetCurrentThread() == pFcb->Specific.File.LazyWriterThread);
-
-    pFcb->Specific.File.LazyWriterThread = NULL;
-
-
     AFSReleaseResource( &pFcb->NPFcb->PagingResource);
 
     AFSReleaseResource( &pFcb->NPFcb->Resource);
index b774a521de246025892550a27ca10b4276916a5e..6f528b4580d19d895207573bb43e44973c57c80a 100644 (file)
@@ -112,7 +112,6 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject,
     BOOLEAN            bExtendingWrite = FALSE;
     BOOLEAN            bCompleteIrp = TRUE;
     BOOLEAN            bLockOK;
-    BOOLEAN            bMapped = TRUE;
     HANDLE             hCallingUser = OnBehalfOf;
     ULONG              ulExtensionLength = 0;
     BOOLEAN            bRetry = FALSE;
@@ -439,21 +438,6 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject,
         }
         */
 
-        //
-        // If they are not mapped and we are the Lazy Writer then just
-        // say "not now"
-        //
-        if (!bMapped && pFcb->Specific.File.LazyWriterThread == PsGetCurrentThread())
-        {
-
-            AFSDbgLogMsg( AFS_SUBSYSTEM_IO_PROCESSING,
-                          AFS_TRACE_LEVEL_VERBOSE,
-                          "AFSCommonWrite (%08lX) Failing lazy writer for unmapped request\n",
-                          Irp);
-
-            try_return ( ntStatus = STATUS_FILE_LOCK_CONFLICT);
-        }
-
         //
         // Take locks
         //