xfs
[Top] [All Lists]

Re: Again: xfsrestore assertion failure

To: Juergen Hasch <Hasch@xxxxxxxxxxx>
Subject: Re: Again: xfsrestore assertion failure
From: Timothy Shimmin <tes@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Dec 2001 11:16:46 +1100
Cc: ivanr@xxxxxxx, linux-xfs@xxxxxxxxxxx
In-reply-to: <16DXYD-0KkusyC@xxxxxxxxxxxxxxxxxxxxxx>; from Hasch@xxxxxxxxxxx on Mon, Dec 10, 2001 at 10:01:59PM +0100
References: <Pine.SGI.4.40.0111201041340.221674-100000@xxxxxxxxxxxxxxxxxxxxxx> <16AFxD-1LpiRkC@xxxxxxxxxxxxxxxxxxxxxx> <20011210163957.Q61575@xxxxxxxxxxxxxxxxxxxxxxx> <16DXYD-0KkusyC@xxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi Juergen,

On Mon, Dec 10, 2001 at 10:01:59PM +0100, Juergen Hasch wrote:
> Am Montag, 10. Dezember 2001 06:39 schrieb Timothy Shimmin:
> > On Sat, Dec 01, 2001 at 08:37:27PM +0100, Juergen Hasch wrote:
> > > Am Friday 30 November 2001 20:12 schrieb Juergen Hasch:
> > > > In line 1508 of drive_scsitape.c I find the following values:
> > > > first_mark_offset = 206e460000000000
> > > > file_offset = 400000
> > > > tape_recsz = 809efa800100000
BTW, recsz is a 32 bit quantity, so a hex value of: 00100000,
which is correct - the value above concerned me at first :)

> > >
> > > Ivan, things go wrong in xfsdump.
> > > When do_set_mark() sets first_mark_offset in the rec_hdr_t struct
> > > it doesn't endian convert it. It is also not endian converted later
> > > The following patch solves this, however you could also do the
> > > endian conversion later in do_write().
> > > ...Juergen
> > >
> > > --- cmd/xfsdump/common/drive_scsitape.c.orig    Fri Nov 30 19:43:48 2001
> > > +++ cmd/xfsdump/common/drive_scsitape.c Sat Dec  1 20:25:35 2001
> > > @@ -1940,7 +1940,7 @@
> > >         rechdrp = ( rec_hdr_t * )contextp->dc_recp;
> > >         if ( rechdrp->first_mark_offset == -1LL ) {
> > >                 ASSERT( nextoff != -1LL );
> > > -               rechdrp->first_mark_offset = nextoff;
> > > +               rechdrp->first_mark_offset =
> > > INT_GET(nextoff,ARCH_CONVERT); }
> > >
> > >         /* put the mark on the tail of the queue.
> >
> > Thanks muchly for the patch, Juergen,  - I see the problem.
> >
> > However, I've changed the code so that all the endian-conversion for the
> > rechdr is done in the one place just prior to the write call (in
> > write_record()). (My fix seems a bit clearer and safer.)
> that's fine with me.  I would say it is a good to make things clearer 
> in drive_scsitape.c ;-)
No comment :)

> 
> > I'll check it into our src tree as soon as it becomes unlocked (from some
> > internal cloning which is going on).
> I'll try it ASAP. However I wonder why almost nobody ever complained about
> this. XFSRESTORE always fails for me with this bug.
I've wondered this myself. It doesn't fail our xfsdump qa here.
The endian conversion on first_mark_offset was clearly wrong but I
haven't looked into how it is used.

Cheers,
Tim.


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