xfs
[Top] [All Lists]

Re: xfsdump safe?

To: Andi Kleen <ak@xxxxxxx>
Subject: Re: xfsdump safe?
From: ivanr@xxxxxxxxxxxxxxxxx (Ivan Rayner)
Date: Sat, 12 May 2001 13:04:53 +1000
Cc: <linux-xfs@xxxxxxxxxxx>
In-reply-to: <20010511145453.A10184@xxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Fri, 11 May 2001, Andi Kleen wrote:

> On Fri, May 11, 2001 at 10:31:46PM +1000, Ivan Rayner wrote:
> > On Fri, 11 May 2001, Andi Kleen wrote:
> >
> > > Regarding xfsdump:
> > >
> > > The qlock functions seem to be dummied out (inside #ifdef HIDDEN), but
> > > it still seems to create threads in some circumstances, which probably 
> > > need
> > > locking. Is it really safe to use?
> >
> > I think you'll find that the linux version of xfsdump runs in single
> > threaded mode.  This is controlled by the 'miniroot' flag which is set to
> > true on Linux - the key bits are around line 604 in 
> > cmd/xfsdump/common/main.c.
>
> As far as I can see common/drive_{scsitape,minrmt}.c do not check that
> flag before calling cldmgr_create()

Looking at drive_scsitape.c (should be the same for minrmt)
cldmgr_create() is called from ring_thread() which is called by
ring_create() as a callback. ring_create() should not be called in
singlethreaded mode - see the lines around 658 in drive_scsitape.c.

(You'll note that the miniroot flag I mentioned earlier becomes the
'singlethreaded' flag in the drive*.c files.)

Ivan

-- 
Ivan Rayner
ivanr@xxxxxxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>