]> git.michaelhowe.org Git - packages/o/openafs.git/commit
vol-salvage: Unlock volumes before exiting
authorAndrew Deason <adeason@sinenomine.net>
Thu, 31 May 2012 21:15:33 +0000 (16:15 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 11 Sep 2013 21:52:28 +0000 (14:52 -0700)
commit0dbe0a8dc7306b17a05685fc5e224b0a4eb0223d
tree56359b558c040b7fa48e2ccd0dffd3769b92344a
parentc94a12c9a759d8fb4558dd878a6299ca77b35eb1
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.

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>
(cherry picked from commit fff80cb1983a8cf7ccf1c1dc4f69e232785700c5)

Change-Id: I08f0ac2c4fb803cf7553a03beaa30439abab4e61
Reviewed-on: http://gerrit.openafs.org/9480
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/vol/vol-salvage.c