]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DAFS: Do not attach a specialStatus'd vol
authorAndrew Deason <adeason@sinenomine.net>
Tue, 21 Jun 2011 21:25:14 +0000 (16:25 -0500)
committerDerrick Brashear <shadow@dementia.org>
Sat, 9 Jul 2011 05:07:44 +0000 (22:07 -0700)
If we encounter a preattached volume during GetVolume, we currently
ignore vp->specialStatus before trying to attach. However, we will
generally always fail to attach due to a conflicting vol op, but even
if we don't, GetVolume always returns an error later on if
vp->specialStatus is set. So, same some processing and attempted
attachments by bailing out sooner if vp->specialStatus is set.

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

Change-Id: I3593a50b5867c671fe462abd40b50dcbbd2c5204
Reviewed-on: http://gerrit.openafs.org/4945
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/vol/volume.c

index e330b1026ddd93c0e8340d82b1bfd6ba1a878fea..bd347a936c791e538e7e32caecbc27e115c2bfd9 100644 (file)
@@ -3750,6 +3750,11 @@ GetVolume(Error * ec, Error * client_ec, VolId volumeId, Volume * hint, int nowa
        }
 
        if (V_attachState(vp) == VOL_STATE_PREATTACHED) {
+           if (vp->specialStatus) {
+               *ec = vp->specialStatus;
+               vp = NULL;
+               break;
+           }
            avp = VAttachVolumeByVp_r(ec, vp, 0);
            if (avp) {
                if (vp != avp) {