From eb2d0d9d48f2f1e372ad438ad6ed0cb6516dbcc8 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Tue, 21 Jun 2011 16:25:14 -0500 Subject: [PATCH] DAFS: Do not attach a specialStatus'd vol 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 Reviewed-by: Derrick Brashear (cherry picked from commit f5349051abebd15fc2f2d77ff5b6dc81e09bdf47) Change-Id: I3593a50b5867c671fe462abd40b50dcbbd2c5204 Reviewed-on: http://gerrit.openafs.org/4945 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/vol/volume.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vol/volume.c b/src/vol/volume.c index e330b1026..bd347a936 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -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) { -- 2.39.5