[Top] [All Lists]

Re: [PATCH] snapshot, defragment and raid test cases for btrfs

To: Amir Goldstein <amir73il@xxxxxxxxx>
Subject: Re: [PATCH] snapshot, defragment and raid test cases for btrfs
From: Greg Freemyer <greg.freemyer@xxxxxxxxx>
Date: Fri, 5 Aug 2011 11:40:42 -0400
Cc: Anand Jain <Anand.Jain@xxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, Chris Mason <chris.mason@xxxxxxxxxx>, Aditya Dani <aditya.dani@xxxxxxxxx>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=wYerfOwuR38hditBtSOdksyo4RZRRbZbvcv1PoD39jg=; b=xnO5aJmptdGM0oJRSC0cveb/1IwXVyY8oSqd7AZPdDYYXS23JQJj8az1mjDAvGz73W xJJ/COE7wN6dxiCCiN7NFYAAEUclSoCUTxaGTDSuusOUNjilkpjCdw1Xa646v4IRQ/x1 937ogyYLnPTUkQehYeGuQ3txknyZPtShdx5XI=
In-reply-to: <CAOQ4uxjVPJmXAFDmWM4K6n5b36PutV1JOkRMzLqeipZkY8AhAg@xxxxxxxxxxxxxx>
References: <4E3BA2F7.4080500@xxxxxxxxxx> <CAOQ4uxjVPJmXAFDmWM4K6n5b36PutV1JOkRMzLqeipZkY8AhAg@xxxxxxxxxxxxxx>
On Fri, Aug 5, 2011 at 9:53 AM, Amir Goldstein <amir73il@xxxxxxxxx> wrote:
> Hi Anand,
> Can you please post the patch in the body of the message so we can
> comment on it inline.
> Aditya is also working on a btrfs snapshots xfstest (currently named
> 257) as part of
> his Google summer of code project.
> It would be great if you guys can cooperate your efforts.
> BTW, while running Aditya's test, Greg has stumbled upon a btrfs OOPS.
> Greg can provide more details about it.
> Cheers,
> Amir.
> On Fri, Aug 5, 2011 at 10:59 AM, Anand Jain <Anand.Jain@xxxxxxxxxx> wrote:
>> Hi,
>>  Attached is the patch for the xfstests, which adds snapshot,
>>  defragment and volume management test cases for the btrfs
>>  (257, 258 and 259 respectively).
>>  This introduces a new user variable 'DISK_POOL' which should
>>  be set to disks for the raid tests.
>>  An example of usage of these tests is as below.
>> ------------
>> [root@localhost xfstests]# cat local.config
>> TEST_DEV="/dev/sdd"
>> TEST_DIR=/btrfs
>> SCRATCH_DEV="/dev/sde"
>> SCRATCH_MNT=/btrfs1
>> DISK_POOL="/dev/sdf /dev/sdg"
>> [root@localhost xfstests]#
>> [root@localhost xfstests]# ./check 257 258 259
>> FSTYP -- btrfs
>> PLATFORM -- Linux/i686 localhost 3.0.0-rc6+
>> MKFS_OPTIONS -- /dev/sde
>> MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 /dev/sde /btrfs1
>> 257 8s
>> 258 3s
>> 259 33s
>> Ran: 257 258 259
>> Passed all 3 tests
>> ----------------
>>  Thank you.
>> Anand


I've only reproduced the oops in 2.6.39 and older using openSUSE 11.4 userspace.

I have not tried with 3.0 or newer nor with newer userspace, so it may
or may not have been fixed.

It happened with a openSUSE kernel, so I put it in their bugzilla.


Just yesterday, I put the actual full recreate details in the
bugzilla.  They are:

I was working the xfstests git tree cloned via:

git clone https://github.com/adityadani/xfstests

# Then, get an older commit that apparently has a userspace bug that
triggers a kernel oops.

git checkout 1b712a4512d63502fab6

# Then prep for the test

export TEST_DEV=/dev/sda3
export TEST_DIR=/xfstests_mnt
export SCRATCH_DEV=/dev/sda1
export SCRATCH_MNT=/xfstests_mnt_scratch
export FSTYP=btrfs

umount $TEST_DIR

mkfs.btrfs $TEST_DEV
mkfs.btrfs $SCRATCH_DEV


# Then run the test

./check 255

I didn't keep the oops, but it seems reproducible enough.

The oops was also put into the kde-oops catcher.

I don't know what aspect of that test triggers the oops.  But the
latest version of test does not trigger it.

The latest version of that test in Aditya's tree has been changed to
test 256.  Sounds like that will change to at least 260 before it gets

Hope that helps,

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