]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-buf-invalidate-on-vnovnode-20080507
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 8 May 2008 06:27:14 +0000 (06:27 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 8 May 2008 06:27:14 +0000 (06:27 +0000)
LICENSE MIT

Once we know that an attempt to stablize a buffer has failed due to
VNOVNODE, stop trying to Stablize future buffers and just invalidate
all of them belonging to the same FID.

(cherry picked from commit ef619db804d471fda3bf3f77d55e8cd4e4699b29)

src/WINNT/afsd/cm_buf.c

index 4229aa93931d56f513ddab8fa97e6a0ce20a71c7..584ede068dbcca789f80794400151672411f179e 100644 (file)
@@ -1602,10 +1602,16 @@ long buf_FlushCleanPages(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp)
             buf_WaitIO(scp, bp);
             lock_ReleaseMutex(&bp->mx);
 
-            code = (*cm_buf_opsp->Stabilizep)(scp, userp, reqp);
-            if (code && code != CM_ERROR_BADFD) 
-                goto skip;
-
+            /* 
+             * if the error for the previous buffer was BADFD
+             * then all buffers for the FID are bad.  Do not
+             * attempt to stabalize.
+             */
+            if (code != CM_ERROR_BADFD) {
+                code = (*cm_buf_opsp->Stabilizep)(scp, userp, reqp);
+                if (code && code != CM_ERROR_BADFD) 
+                    goto skip;
+            }
             if (code == CM_ERROR_BADFD) {
                 /* if the scp's FID is bad its because we received VNOVNODE 
                  * when attempting to FetchStatus before the write.  This