@@ -106,7 +106,8 @@ _scratch_pool_mkfs $mkfs_opts >>$seqres.full 2>&1
# chunk
_scratch_mount -o nospace_cache,nodatasum
-$XFS_IO_PROG -f -d -c "pwrite -S 0xaa -b 128K 0 128K" "$SCRATCH_MNT/foobar" | _filter_xfs_io
+$XFS_IO_PROG -f -d -c "pwrite -S 0xaa -b 128K 0 128K" "$SCRATCH_MNT/foobar" |\
+ _filter_xfs_io | _filter_xfs_io_offset
# step 2, corrupt the first 64k of one copy (on SCRATCH_DEV which is the first
# one in $SCRATCH_DEV_POOL
@@ -117,7 +118,8 @@ logical_in_btrfs=`${FILEFRAG_PROG} -v $SCRATCH_MNT/foobar | _filter_filefrag | c
physical_on_scratch=`get_physical ${logical_in_btrfs}`
_scratch_unmount
-$XFS_IO_PROG -d -c "pwrite -S 0xbb -b 64K $physical_on_scratch 64K" $SCRATCH_DEV | _filter_xfs_io
+$XFS_IO_PROG -d -c "pwrite -S 0xbb -b 64K $physical_on_scratch 64K" $SCRATCH_DEV |\
+ _filter_xfs_io | _filter_xfs_io_offset
_scratch_mount -o nospace_cache
@@ -142,7 +144,8 @@ done
_scratch_unmount
# check if the repair works
-$XFS_IO_PROG -c "pread -v -b 512 $physical_on_scratch 512" $SCRATCH_DEV | _filter_xfs_io
+$XFS_IO_PROG -c "pread -v -b 512 $physical_on_scratch 512" $SCRATCH_DEV |\
+ _filter_xfs_io | _filter_xfs_io_offset
_scratch_dev_pool_put
# success, all done
@@ -1,39 +1,39 @@
QA output created by 143
-wrote 131072/131072 bytes at offset 0
+wrote 131072/131072 bytes
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 65536/65536 bytes at offset 136708096
+wrote 65536/65536 bytes
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-08260000: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260010: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260020: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260030: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260040: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260050: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260060: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260070: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260080: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260090: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-082600a0: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-082600b0: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-082600c0: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-082600d0: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-082600e0: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-082600f0: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260100: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260110: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260120: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260130: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260140: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260150: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260160: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260170: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260180: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-08260190: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-082601a0: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-082601b0: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-082601c0: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-082601d0: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-082601e0: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-082601f0: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
-read 512/512 bytes at offset 136708096
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................
+read 512/512 bytes
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Due to recent mkfs.btrfs chunk layout change, offset in golden output is not flex to handle different mkfs chunk layout. So use _filter_xfs_io_offset to filter out offset so golden output can handle any chunk layout. Signed-off-by: Qu Wenruo <wqu@suse.com> --- tests/btrfs/143 | 9 ++++--- tests/btrfs/143.out | 70 ++++++++++++++++++++++++++--------------------------- 2 files changed, 41 insertions(+), 38 deletions(-)