From f5349051abebd15fc2f2d77ff5b6dc81e09bdf47 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. Change-Id: Id5df08fe31073485e4d733c42310b42090ee8e7b Reviewed-on: http://gerrit.openafs.org/4874 Tested-by: BuildBot Reviewed-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 b075e9775..f15aaca90 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -4028,6 +4028,11 @@ GetVolume(Error * ec, Error * client_ec, VolId volumeId, Volume * hint, } 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