vol-salvage: Unlock volumes before exiting
authorAndrew Deason <adeason@sinenomine.net>
Thu, 31 May 2012 21:15:33 +0000 (16:15 -0500)
committerDerrick Brashear <shadow@dementix.org>
Mon, 11 Jun 2012 22:25:15 +0000 (15:25 -0700)
commitfff80cb1983a8cf7ccf1c1dc4f69e232785700c5
tree766fc868565be1ce820bfa1f90c4a484b962981b
parent80359f562a459ef1dba2cdf53ee486578b50752d
vol-salvage: Unlock volumes before exiting

Normally, volume locks acquired by an exiting salvaging process would
be automatically given up when the process exits, since our FDs are
closed. However, if we exit by calling Exit() or Abort(), we
gracefully shutdown our SYNC channels before exiting. For FSSYNC, this
can result in the fileserver trying to online the volumes we had
checked out but had not yet checked back in, so the fileserver may try
to online a volume we have locked, before the locks have been
released.

To avoid this, unlock all volume locks for all partitions before we
shutdown SYNC channels on exit.

Change-Id: Idcda5fcf4639da7d4b951bea36606ea8daf68f3c
Reviewed-on: http://gerrit.openafs.org/7514
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
src/vol/vol-salvage.c