vos offline: Bring volume back online for -busy

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.

Change-Id: I6e605771fcfcabbb09f6dcfd0576c062f64ad93f
Reviewed-on: http://gerrit.openafs.org/5620
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Andrew Deason 2011-10-14 11:32:34 -05:00 committed by Derrick Brashear
parent 547d94edd3
commit 8c7202fb9e

View File

@ -1881,7 +1881,7 @@ volOffline(struct cmd_syndesc *as, void *arock)
transflag = (as->parms[4].items ? ITBusy : ITOffline); transflag = (as->parms[4].items ? ITBusy : ITOffline);
sleeptime = (as->parms[3].items ? atol(as->parms[3].items->data) : 0); 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) { if (as->parms[4].items && !as->parms[3].items) {
fprintf(STDERR, "-sleep option must be used with -busy flag\n"); fprintf(STDERR, "-sleep option must be used with -busy flag\n");
return -1; return -1;