On Wed, Mar 04, 2020 at 10:51:32AM +0800, Eryu Guan wrote: > On Tue, Mar 03, 2020 at 10:06:26AM -0800, Darrick J. Wong wrote: > > On Mon, Mar 02, 2020 at 12:00:52AM +0800, Eryu Guan wrote: > > > On Tue, Feb 04, 2020 at 04:02:23PM -0800, Darrick J. Wong wrote: > > > > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > > > > > > > Add new helpers to dmerror to provide for marking selected ranges > > > > totally bad -- both reads and writes will fail. Create a new test for > > > > xfs_scrub to check that it reports media errors correctly. > > > > > > > > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > > > > > So is this expected to fail with latest xfsprogs for-next branch? I got > > > failures like: > > > > > > QA output created by 515 > > > Scrub for injected media error > > > -Corruption: disk offset NNN: media error in inodes. (!) > > > -SCRATCH_MNT: Unmount and run xfs_repair. > > > > The test should pass ... and I can't reproduce it all here. What are > > you MKFS_OPTIONS and MOUNT_OPTIONS and kernel? Here's mine: > > FSTYP -- xfs (debug) > PLATFORM -- Linux/x86_64 fedoravm 5.6.0-rc2 #46 SMP Mon Feb 17 11:37:03 CST 2020 > MKFS_OPTIONS -- -f -f -b size=4k -m reflink=1,rmapbt=1 /dev/mapper/testvg-lv2 > MOUNT_OPTIONS -- /dev/mapper/testvg-lv2 /mnt/scratch > > xfs/515 - output mismatch (see /root/workspace/xfstests/results//xfs_4k_reflink/xfs/515.out.bad) > --- tests/xfs/515.out 2020-03-01 22:42:19.569613781 +0800 > +++ /root/workspace/xfstests/results//xfs_4k_reflink/xfs/515.out.bad 2020-03-01 23:06:33.546230712 +0800 > @@ -1,5 +1,3 @@ > QA output created by 515 > Scrub for injected media error > -Corruption: disk offset NNN: media error in inodes. (!) > -SCRATCH_MNT: Unmount and run xfs_repair. > Scrub after removing injected media error > > And I'm using xfsprogs for-next branch, HEAD is > > commit fbbb184b189c62beed2a694d14e83bd316fd4140 > Author: Eric Sandeen <sandeen@xxxxxxxxxx> > Date: Thu Feb 27 23:20:42 2020 -0500 > > xfs_repair: join realtime inodes to transaction only once Hmm, that's really odd. Can you please send me a metadump of the scratch fs after the test runs? I tried your exact mkfs/mount options and it ran just fine here: FSTYP -- xfs (debug) PLATFORM -- Linux/x86_64 magnolia-mtr00 5.6.0-rc4-xfsx #rc4 SMP PREEMPT Mon Mar 2 21:02:17 PST 2020 MKFS_OPTIONS -- -f -f -b size=4k -m reflink=1,rmapbt=1 /dev/sdf MOUNT_OPTIONS -- /dev/sdf /opt xfs/747 3s Ran: xfs/747 Passed all 1 tests --D > > --D > > > > FSTYP -- xfs (debug) > > PLATFORM -- Linux/x86_64 magnolia-mtr00 5.6.0-rc4-xfsx #rc4 SMP PREEMPT Mon Mar 2 21:02:17 PST 2020 > > MKFS_OPTIONS -- -f -m reflink=1,rmapbt=1, -i sparse=1, /dev/sdf > > MOUNT_OPTIONS -- -o usrquota,grpquota,prjquota, /dev/sdf /opt > > I think the problem is the mount option, adding the quota related > options to my config then test passed as well. > > Thanks, > Eryu > > > > > xfs/747 3s > > Ran: xfs/747 > > Passed all 1 tests > > > > ------------------- > > > > FSTYP -- xfs (debug) > > PLATFORM -- Linux/x86_64 magnolia-mtr00 5.6.0-rc4-xfsx #rc4 SMP PREEMPT Mon Mar 2 21:02:17 PST 2020 > > MKFS_OPTIONS -- -f -m crc=0,reflink=0,rmapbt=0, -i sparse=0, /dev/sdf > > MOUNT_OPTIONS -- -o usrquota,grpquota, /dev/sdf /opt > > > > xfs/747 [not run] crc feature not supported by this filesystem > > Ran: xfs/747 > > Not run: xfs/747 > > Passed all 1 tests > > > > ------------------- > > > > FSTYP -- xfs (debug) > > PLATFORM -- Linux/x86_64 magnolia-mtr00 5.6.0-rc4-xfsx #rc4 SMP PREEMPT Mon Mar 2 21:02:17 PST 2020 > > MKFS_OPTIONS -- -f -m reflink=1,rmapbt=0, -i sparse=1, /dev/sdf > > MOUNT_OPTIONS -- -o usrquota,grpquota,prjquota, /dev/sdf /opt > > > > xfs/747 2s > > Ran: xfs/747 > > Passed all 1 tests > > > > -------------------- > > > > FSTYP -- xfs (debug) > > PLATFORM -- Linux/x86_64 magnolia-mtr00 5.6.0-rc4-xfsx #rc4 SMP PREEMPT Mon Mar 2 21:02:17 PST 2020 > > MKFS_OPTIONS -- -f -m reflink=0,rmapbt=0, -i sparse=1, /dev/sdf > > MOUNT_OPTIONS -- -o usrquota,grpquota,prjquota, /dev/sdf /opt > > > > xfs/747 3s > > Ran: xfs/747 > > Passed all 1 tests > > > > --D