From 214c2e7b19333380cb7f3aa5c997f35543bd3d15 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Sat, 15 Feb 2003 14:17:15 +0000 Subject: [PATCH] viced-allow-hinting-of-all-new-clients-for-vbusy-vrestarting-handling-20030215 For sites with only new (>3.4) clients (or who decide to not care about older clients) and want to force VRESTARTING instead of VBUSY. --- src/viced/afsfileprocs.c | 4 ++-- src/viced/viced.c | 7 ++++++- src/viced/viced.h | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 5cc2e11..076cc75 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -462,13 +462,13 @@ CheckVnode(AFSFid *fid, Volume **volptr, Vnode **vptr, int lock) /* I'm not really worried about when we restarted, I'm */ /* just worried about when the first VBUSY was returned. */ TM_GetTimeOfDay(&restartedat, 0); - return(VBUSY); + return(busyonrst?VBUSY:VRESTARTING); } else { struct timeval now; TM_GetTimeOfDay(&now, 0); if ((now.tv_sec - restartedat.tv_sec) < (11*60)) { - return(VBUSY); + return(busyonrst?VBUSY:VRESTARTING); } else { return (VRESTARTING); diff --git a/src/viced/viced.c b/src/viced/viced.c index b71e92c..3384a5a 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -147,6 +147,7 @@ struct afs_PerfStats afs_perfstats; extern int LogLevel; extern int Statistics; +int busyonrst = 1; int timeout = 30; int SawSpare; int SawPctSpare; @@ -646,6 +647,7 @@ static void FlagMsg() strcat(buffer, "[-readonly (read-only file server)] "); strcat(buffer, "[-hr ] "); strcat(buffer, "[-busyat n>] "); + strcat(buffer, "[-nobusy ] "); strcat(buffer, "[-rxpck ] "); strcat(buffer, "[-rxdbg (enable rx debugging)] "); strcat(buffer, "[-rxdbge (enable rxevent debugging)] "); @@ -875,7 +877,10 @@ static int ParseArgs(int argc, char *argv[]) busy_threshold); Sawbusy = 0; } - } + } + else + if (!strcmp(argv[i], "-nobusy")) + busyonrst=0; #ifdef AFS_AIX32_ENV else if (!strcmp(argv[i], "-m")) { diff --git a/src/viced/viced.h b/src/viced/viced.h index 570c6b5..d862314 100644 --- a/src/viced/viced.h +++ b/src/viced/viced.h @@ -189,6 +189,8 @@ struct AFSStatistics struct AFSDisk Disks[AFS_MSTATDISKS]; }; +extern int busyonrst; + #define RESTART_ORDINARY 1 #define RESTART_FAST 2 #define RESTART_SAFE 3 -- 1.9.4