]> git.michaelhowe.org Git - packages/o/openafs.git/commit
salvager: Do not require MaybeZapVolume fileName
authorAndrew Deason <adeason@sinenomine.net>
Tue, 21 Feb 2012 23:46:41 +0000 (17:46 -0600)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 11 Sep 2013 21:36:54 +0000 (14:36 -0700)
commit3648401e204a9d447766ff0999d747b24aebdc55
tree02a427772ecdb62b4a2e3d475b6a9043755cf3de
parent98222fb3b0b9adebb734195c7c21f646fc7c9b70
salvager: Do not require MaybeZapVolume fileName

In MaybeZapVolume, currently we do not remove the volume header if the
given isp->volSummary->fileName is not set. This effectively means
that we only actually "zap" volumes for which we have just created the
header, or which are not referenced by any inodes.

For readonly volumes that have errors, we want to delete the volumes
instead of salvaging. Readonly volumes with valid headers will have
fileName as NULL, though (set back in SalvageFileSys1), so
MaybeZapVolume will refuse to remove them. What ends up happening is
that the headers will stay around, but since we do not finish checking
the volume, all of the inodes for the data in the volume will be
dec'd. This results in a volume whose header exists, but none of its
inodes (including special inodes) exist, so the volume will need to be
salvaged again, and during that salvage will be deleted (because there
are no inodes for the volume).

Avoid all this, and just delete volume headers for volumes that lack a
valid fileName. Instead try to avoid deleting headers with
volSummary->deleted set, just so we don't try to delete the same
headers twice.

Related issue reported by Åsa Andersson.

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

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