]> git.michaelhowe.org Git - packages/o/openafs.git/commit
dafs: preattach should wait for exclusive states
authorMark Vitale <mvitale@sinenomine.net>
Fri, 21 Dec 2012 22:56:14 +0000 (17:56 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 28 Aug 2013 12:06:24 +0000 (05:06 -0700)
commitac750113f34bcd03df3350ec9863b7b3c67efa25
treea4ccd54d8e30097681668240b1d0f2c20f592d55
parentfa085d0b3c53b94cb3d582269ee7a568bfbc7ccf
dafs: preattach should wait for exclusive states

In rare circumstances an FSYNC_VOL_ON operation may fail silently,
leaving the volume in its previous state.  The only clue is a FileLog
message "volume <nnnn> not in quiescent state".

This is caused by a race condition in the volume package: an
FSYNC_VOL_ON operation is attempting to preattach a volume
(in VPreAttachVolumeByVp_r()) at the same time a fileserver RPC
(e.g. FetchStatus) is detaching the volume (in VReleaseVolumeHandles_r())
at the conclusion of attach2() logic.

The fix calls VWaitExclusiveState_r() before calling
VPreAttachVolumeByVp_r().

Change-Id: Ib66859381d29311fda3e08984dcb740eadafb340
Reviewed-on: http://gerrit.openafs.org/8814
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 1f891b622e9b32a068082087eae9d787057f7f00)
Reviewed-on: http://gerrit.openafs.org/9070
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/vol/volume.c