]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
bozo: increase salvage instance poll rate
authorMichael Meffie <mmeffie@sinenomine.net>
Tue, 17 Apr 2012 02:29:24 +0000 (22:29 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 11 Sep 2013 21:42:25 +0000 (14:42 -0700)
Increase the bos client poll rate of the salvager temporary bnode
instance status, from every 5 seconds to 1 second.  This reduces the
minimum time bos salvage takes, from 5 seconds to 1 second, which
can add up when doing a large number of volume salvages.

Reviewed-on: http://gerrit.openafs.org/7231
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 2460e132a9ed63714754745fe24f6f3a5712c81d)

Change-Id: Ic86d3f3ed5791f880b41533edcd405a8fec24c0b
Reviewed-on: http://gerrit.openafs.org/9476
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/bozo/bos.c

index 852e7ac71255ba0140b934d69864fb55b07c273c..f4d8bfaf453e2d770e15f22f8bd3603f80025f03 100644 (file)
@@ -1160,6 +1160,7 @@ DoSalvage(struct rx_connection * aconn, char * aparm1, char * aparm2,
     char pbuffer[PARMBUFFERSSIZE];
     afs_int32 partNumber;
     char *notifier = NONOTIFIER;
+    int count;
 
     /* if a partition was specified, canonicalize the name, since
      * the salvager has a stupid partition ID parser */
@@ -1330,13 +1331,15 @@ DoSalvage(struct rx_connection * aconn, char * aparm1, char * aparm2,
        goto done;
     }
     /* now wait for bnode to disappear */
+    count = 0;
     while (1) {
-       IOMGR_Sleep(5);
+       IOMGR_Sleep(1);
        tp = tbuffer;
        code = BOZO_GetInstanceInfo(aconn, "salvage-tmp", &tp, &istatus);
        if (code)
            break;
-       printf("bos: waiting for salvage to complete.\n");
+       if ((count++ % 5) == 0)
+           printf("bos: waiting for salvage to complete.\n");
     }
     if (code != BZNOENT) {
        printf("bos: salvage failed (%s)\n", em(code));