]> git.michaelhowe.org Git - packages/o/openafs.git/commit
vol: Do not give back not-checked-out vols
authorAndrew Deason <adeason@sinenomine.net>
Fri, 5 Nov 2010 21:48:28 +0000 (16:48 -0500)
committerDerrick Brashear <shadow@dementia.org>
Wed, 8 Dec 2010 00:03:38 +0000 (16:03 -0800)
commitb11f35353a19d760820dad80441aead7594408d3
treebf50cecdcba01f12443fc508754ad9a8336353ea
parenta2a096547d341b3475c13ff9a2845284f973990f
vol: Do not give back not-checked-out vols

VAttachVolumeByName_r has logic to give back a volume over FSSYNC if
we checked out a volume but failed to attach it for whatever reason.
However, the logic used for determining if the volume was checked out
or not is a bit inaccurate (even moreso than the comments imply),
potentially causing us to VOL_ON volumes that don't exist at all.

Instead of trying to guess based on various conditions whether or not
we checked out the volume, keep track of a variable that is only set
when we actually checkout the volume from the fileserver. Then only
give back the volume if it is set.

Reviewed-on: http://gerrit.openafs.org/3274
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e890f090e11d09b6e6b929642cbd92a56fb6e66e)
Change-Id: I3f42b2c0f54f30989f7a1a3fd18171deb4b814f1
Reviewed-on: http://gerrit.openafs.org/3480
src/vol/volume.c