xfs
[Top] [All Lists]

Re: [BULK] Re: [problem] xfstests generic/311 unreliable...

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [BULK] Re: [problem] xfstests generic/311 unreliable...
From: Josef Bacik <jbacik@xxxxxxxxxxxx>
Date: Tue, 7 May 2013 09:28:07 -0400
Cc: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>, Josef Bacik <JBacik@xxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fusionio.com; s=default; t=1367933290; bh=ymNOcVPXuH+xdwCQW+ru8tgd/GIX3pZA+orzm3d2rOM=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=myKT+XbLy5/5Ib13eMa6ESWRqjQxEjbIhhWaA34zFb0vb4wxf/RjOQHcxQ59BnESo h5gXE2IjTZ2GZ7/9J3hqcZ8ZTYuIcX1R1pJ4V1sucKoKQXOkMK6LHGtab62i6DFK/8 CcWiv5ZIgMtj21YU+IglRghULJFn0wxaXm2ap/+g=
In-reply-to: <20130507073717.GB24635@dastard>
References: <20130507071102.GA24635@dastard> <20130507073717.GB24635@dastard>
User-agent: Mutt/1.5.21 (2011-07-01)
On Tue, May 07, 2013 at 01:37:17AM -0600, Dave Chinner wrote:
> Argh, add the cc to Josef...
> 
> On Tue, May 07, 2013 at 05:11:02PM +1000, Dave Chinner wrote:
> > Hi Josef,
> > 
> > I was just looking at a generic/311, and I think there's something
> > fundamentally wrong with the way it is checking the scratch device.
> > 
> > You reported it was failing for internal test 19 on XFS, but I'm
> > seeing is fail after the first test or 2, randomly. It has never
> > made it past test 3. So I had a little bit of a closer look at it's
> > structure. Essentially it is doing this (and the contents seen by
> > each step:
> > 
> > scratch dev + mkfs
> >     +-------------------------------+
> > overlay dm-flakey
> >     D-------------------------------D
> > mount/write/kill/unmount dm-flakey
> >     Dx-x-x-x-x-x-x------------------D
> > 
> > All good up to here. Now, you can _check_scratch_fs which sees:
> > 
> > scratch dev + check
> >     +-------------------------------+
> > 
> > i.e. it's not seeing all the changes written to dm-flakey and so
> > xfs-check it seeing corruption.
> > 
> > After I realised this was stacking block devices and checking the
> > underlying block device, the cause was pretty obvious: scratch-dev
> > and dm-flakey have different address spaces, so changes written
> > throughone address space will not be seen through the other address
> > space if there is stale cached data in the original address space.
> > 
> > And that's exactly what is happening. This patch:
> > 
> > --- a/tests/generic/311
> > +++ b/tests/generic/311
> > @@ -79,6 +79,7 @@ _mount_flakey()
> >  _unmount_flakey()
> >  {
> >         $UMOUNT_PROG $SCRATCH_MNT
> > +       echo 3 > /proc/sys/vm/drop_caches
> >  }
> >  
> >  _load_flakey_table()
> > 
> > Makes the problem go away for xfs_check. But really, I don't like
> > the assumption that the test is built on - that writes through one
> > block device are visible through another. It's just asking for weird
> > problems.
> > 
> > Is there some way that you can restructure this test so it doesn't
> > have this problem (e.g. do everything on dm-flakey)?

Yup I can do that, honestly the only reason I was doing it this way was because
my original script which this test is based on did this all to a raw disk with
a real reboot in there.  I'll fix it up and send a patch.  Thanks,

Josef

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