From 42c527deab19bb936e4f5f191ee05d1be7142b6c Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Thu, 6 Mar 2008 16:55:46 +0000 Subject: [PATCH] DEVEL15-dafs-restarting-error-change-20080306 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 (cherry picked from commit 2137631fb44d934d51979850ebfcb6a50076b095) --- src/viced/afsfileprocs.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 6c72723916..09385c5acd 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -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); } } }