]> git.michaelhowe.org Git - packages/o/openafs.git/commit
DAFS: Fix demand-salvages of attached volumes
authorAndrew Deason <adeason@sinenomine.net>
Fri, 2 Jul 2010 21:57:42 +0000 (16:57 -0500)
committerDerrick Brashear <shadow@dementia.org>
Wed, 3 Nov 2010 10:47:41 +0000 (03:47 -0700)
commitccc14955235dbf7d8f1244f6204aa34ba99a2d53
treee2c166f5626ac024ee79dce5f93da75293a10f94
parentcab87d3f7b6686de7072eb166ccc7c5fe0f6536c
DAFS: Fix demand-salvages of attached volumes

Currently, when an error is encountered for an attached volume, we
call VRequestSalvage_r, which makes the volume go into the
VOL_STATE_SALVAGING state. This state implies that the volume is
offline, however, which is not necessarily the case if we're calling
VRequestSalvage_r from, for example, VAllocVnode_r or VUpdateVolume_r.

So now, make a new state called VOL_STATE_SALVAGE_REQ to indicate when
a salvage has been requested but the volume is not offline yet (and
thus is not yet ready to give to the salvager). If VCheckSalvage finds
a volume in this state, it offlines the volume first. The FSSYNC
VOL_OFF handler now checks for this state, and if we're giving the
volume to the salvager, we wait for the volume to exit that state.

VRequestSalvage_r also gains a new flag, VOL_SALVAGE_NO_OFFLINE. This
is to ensure that the existing salvaging code paths for unattached
volumes does not change (for when VRequesetSalvage_r is called from
attach2). If this flag is passed, we do what we used to do, which is
just salvage the volume without offlining it.

Reviewed-on: http://gerrit.openafs.org/2329
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0aa7fac246ce044c757530ebe96d3a05c2f33894)
Change-Id: I76db861c862789801d74578c4965a2bc41c2047b
Reviewed-on: http://gerrit.openafs.org/3223
src/vol/fssync-debug.c
src/vol/fssync-server.c
src/vol/volume.c
src/vol/volume.h
src/vol/volume_inline.h