Revert "Windows: Treat all cached writes as write-through"
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 7 Dec 2012 04:28:56 +0000 (23:28 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Tue, 12 Mar 2013 13:52:55 +0000 (06:52 -0700)
This reverts commit 5130681fa2d4a35d3f0b578d92c5db1892fdfb18.

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

src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp

index 4b9eec9..ac1f289 100644 (file)
@@ -121,6 +121,7 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject,
     BOOLEAN            bReleasePaging = FALSE;
     BOOLEAN            bExtendingWrite = FALSE;
     BOOLEAN            bCompleteIrp = TRUE;
+    BOOLEAN            bForceFlush = FALSE;
     BOOLEAN            bLockOK;
     HANDLE             hCallingUser = OnBehalfOf;
     ULONGLONG          ullProcessId = (ULONGLONG)PsGetCurrentProcessId();
@@ -342,6 +343,7 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject,
         if( NULL != pFileObject->SectionObjectPointer->DataSectionObject && !bPagingIo && bNonCachedIo)
         {
             bNonCachedIo = FALSE;
+            bForceFlush = TRUE;
         }
 
         if ( !bNonCachedIo && !bPagingIo)
@@ -661,7 +663,7 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject,
                           ulByteCount,
                           bRetry ? " RETRY" : "");
 
-            ntStatus = AFSCachedWrite( DeviceObject, Irp, liStartingByte, ulByteCount, TRUE);
+            ntStatus = AFSCachedWrite( DeviceObject, Irp, liStartingByte, ulByteCount, bForceFlush);
 
         }
         else