dafs-restarting-error-change-20080306
authorDerrick Brashear <shadow@dementia.org>
Thu, 6 Mar 2008 16:54:33 +0000 (16:54 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 6 Mar 2008 16:54:33 +0000 (16:54 +0000)
LICENSE IPL10

on VSALVAGE the client will correctly resort its list and fail over to
other replicas, but only for RO where there is more than one replica,
obviously; since in dafs we expect to only delay on salvage this is the most
useful course of action

src/viced/afsfileprocs.c

index 6c72723..09385c5 100644 (file)
@@ -469,6 +469,14 @@ CheckVnode(AFSFid * fid, Volume ** volptr, Vnode ** vptr, int lock)
        extern int VInit;
 
        while (1) {
+           int restarting = 
+#ifdef AFS_DEMAND_ATTACH_FS
+               VSALVAGE
+#else
+               VRESTARTING
+#endif
+               ;
+
            errorCode = 0;
            *volptr = VGetVolume(&local_errorCode, &errorCode, (afs_int32) fid->Volume);
            if (!errorCode) {
@@ -531,7 +539,7 @@ CheckVnode(AFSFid * fid, Volume ** volptr, Vnode ** vptr, int lock)
                        afs_perfstats.fs_nBusies++;
                        FS_UNLOCK;
                    }
-                   return (busyonrst ? VBUSY : VRESTARTING);
+                   return (busyonrst ? VBUSY : restarting);
                } else {
                    struct timeval now;
                    TM_GetTimeOfDay(&now, 0);
@@ -541,9 +549,9 @@ CheckVnode(AFSFid * fid, Volume ** volptr, Vnode ** vptr, int lock)
                            afs_perfstats.fs_nBusies++;
                            FS_UNLOCK;
                        }
-                       return (busyonrst ? VBUSY : VRESTARTING);
+                       return (busyonrst ? VBUSY : restarting);
                    } else {
-                       return (VRESTARTING);
+                       return (restarting);
                    }
                }
            }