]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
vos offline: Bring volume back online for -busy
authorAndrew Deason <adeason@sinenomine.net>
Fri, 14 Oct 2011 16:32:34 +0000 (11:32 -0500)
committerDerrick Brashear <shadow@dementix.org>
Wed, 26 Oct 2011 22:55:06 +0000 (15:55 -0700)
vos offline is supposed to bring a volume back online from "busy"
status before exiting, as volumes should not be in "busy" status for
extended periods of time. This was being enforced by required that
-sleep be specified; however, -sleep only results in the volume being
brought back online if a non-zero sleep time was specified. So, make
sure the volume is brought back online if -busy was specified.

Reviewed-on: http://gerrit.openafs.org/5620
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 8c7202fb9ea9cf5e5c888000ec84fd9b7478068d)

Change-Id: I64aa6f297b787ca666959ff4f35d17aced6e41a7
Reviewed-on: http://gerrit.openafs.org/5718
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
src/volser/vos.c

index 1f95d855397481ba08ddc0adf1ad9b60db53feac..50e2c00851ca0e26af9a7c33c77ce4695dcc3915 100644 (file)
@@ -1901,7 +1901,7 @@ volOffline(struct cmd_syndesc *as, void *arock)
 
     transflag = (as->parms[4].items ? ITBusy : ITOffline);
     sleeptime = (as->parms[3].items ? atol(as->parms[3].items->data) : 0);
-    transdone = (sleeptime ? 0 /*online */ : VTOutOfService);
+    transdone = ((sleeptime || as->parms[4].items) ? 0 /*online */ : VTOutOfService);
     if (as->parms[4].items && !as->parms[3].items) {
        fprintf(STDERR, "-sleep option must be used with -busy flag\n");
        return -1;