]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: RDR_CleanupFileEntry restrict extent claw back
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 22 Dec 2011 02:08:59 +0000 (21:08 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 22 Dec 2011 15:09:57 +0000 (07:09 -0800)
Only demand that extents be returned by the afs redirector
if this cleanup is the last open handle or the redirector has
requested that the file be flushed to the file server.

Change-Id: I03ddcd153d2ded5fc805148a192234742d20b29e
Reviewed-on: http://gerrit.openafs.org/6394
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsrdr/user/RDRFunction.c

index d822abf709c5e4d830da1c8f749add814d8fda6e..89f0478b3a928dd864e0d93698fca7c40f890e4f 100644 (file)
@@ -1734,7 +1734,9 @@ RDR_CleanupFileEntry( IN cm_user_t *userp,
     }
     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
 
-    if (scp->redirBufCount > 0) {
+    if ((bLastHandle || bFlushFile) &&
+        scp->redirBufCount > 0)
+    {
         LARGE_INTEGER heldExtents;
         AFSFileExtentCB extentList[1024];
         DWORD extentCount = 0;