]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-viced-allow-hinting-of-all-new-clients-for-vbusy-vrestarting-handling-20030215
authorDerrick Brashear <shadow@dementia.org>
Fri, 28 Mar 2003 09:17:18 +0000 (09:17 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 28 Mar 2003 09:17:18 +0000 (09:17 +0000)
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.

(cherry picked from commit 214c2e7b19333380cb7f3aa5c997f35543bd3d15)

src/viced/afsfileprocs.c
src/viced/viced.c
src/viced/viced.h

index a0e63aed76dceaa45094b92c7ae680ee91921d48..2e92218c8fe3140ab588caf3dda0fef773b4bdbc 100644 (file)
@@ -6146,13 +6146,13 @@ CheckVnode(fid, volptr, vptr, 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);
index 8a39d70e2c80948cd6d1e9a6f3043940573d292f..a619631dde1149843854aa6338774113d3131566 100644 (file)
@@ -133,6 +133,7 @@ struct afs_PerfStats afs_perfstats;
 extern int     LogLevel;
 extern int     Statistics;
 
+int     busyonrst = 1;
 int     timeout = 30;
 int    SawSpare;
 int    SawPctSpare;
@@ -960,6 +961,7 @@ static FlagMsg()
     strcat(buffer, "[-implicit <admin mode bits: rlidwka>] ");
     strcat(buffer, "[-hr <number of hours between refreshing the host cps>] ");
     strcat(buffer, "[-busyat <redirect clients when queue > n>] ");
+    strcat(buffer, "[-nobusy <no VBUSY before a volume is attached>] ");
     strcat(buffer, "[-rxpck <number of rx extra packets>] ");
     strcat(buffer, "[-rxdbg (enable rx debugging)] ");
     strcat(buffer, "[-rxdbge (enable rxevent debugging)] ");
@@ -1189,7 +1191,10 @@ static ParseArgs(argc, argv)
                           busy_threshold);
                    Sawbusy = 0;
                }
-           }
+             }
+           else
+             if (!strcmp(argv[i], "-nobusy")) 
+               busyonrst=0;
 #ifdef AFS_AIX32_ENV
        else
            if (!strcmp(argv[i], "-m")) {
index 4109c81477e698db326ab1fb11b67466959c62b2..8a5b51af058aa1366d43bf00e911eaaa4770b76f 100644 (file)
@@ -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