[OpenAFS] Re: Change in volume status during vos dump in OpenAFS 1.6.x

Andrew Deason adeason@sinenomine.net
Fri, 15 Mar 2013 11:18:03 -0500


This is a multi-part message in MIME format.

--Multipart=_Fri__15_Mar_2013_11_18_03_-0500_TSl.S==cKa=36YXP
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Fri, 15 Mar 2013 08:43:48 -0400 (EDT)
Andy Malato <andym@njit.edu> wrote:

> We applied the above patch, but are still seeing the same issue when
> performing a 'vos dump' on a volume, a 'vos listvol' shows the volume
> as not being able to be attached as opposed to the old expected
> behavior of being busy.

Yes, sorry, it just looked similar; this is a completely different area
of code than the patch I suggested. I thought the problem was with us
trying to look at a volume that's "offline" on disk, but the relevant
scenario is that we're returning an error because of a conflicting
volser transaction for the volume. It has nothing to do with what's on
disk; you're just only allowed one volume transaction at a time.

At first glance, the error handling here is pretty screwed up and is
different in many respects than what we had in 1.4. We'll need to check
how much of that is a mistake vs if any was intentional, but for now,
please try the attached patch. This should fix the specific case you're
talking about, but there are many other cases that need to be looked
at...

-- 
Andrew Deason
adeason@sinenomine.net

--Multipart=_Fri__15_Mar_2013_11_18_03_-0500_TSl.S==cKa=36YXP
Content-Type: text/x-diff;
 name="malato-vbusy-not-enodev.diff"
Content-Disposition: attachment;
 filename="malato-vbusy-not-enodev.diff"
Content-Transfer-Encoding: 7bit

diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c
index d8b965c..732fc94 100644
--- a/src/volser/volprocs.c
+++ b/src/volser/volprocs.c
@@ -2219,8 +2219,8 @@ GetVolInfo(afs_uint32 partId,
 
     ttc = NewTrans(volumeId, partId);
     if (!ttc) {
-	code = -3;
-	VOLINT_INFO_STORE(handle, status, VOLSERVOLBUSY);
+	code = 0;
+	VOLINT_INFO_STORE(handle, status, VBUSY);
 	VOLINT_INFO_STORE(handle, volid, volumeId);
 	goto drop;
     }

--Multipart=_Fri__15_Mar_2013_11_18_03_-0500_TSl.S==cKa=36YXP--