From: Filipe Manana Date: Mon, 28 Nov 2022 12:07:23 +0000 (+0000) Subject: btrfs/280: also verify that fiemap reports extents as encoded X-Git-Tag: v2022.12.11~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6f6559a88eb2b3be2270700eac915c7322dc4fb7;p=xfstests-dev.git btrfs/280: also verify that fiemap reports extents as encoded Now that _filter_fiemap_flags() optionally reports the encoded flag and since btrfs/280 explicitly uses and tests compression, make it check that fiemap reports the compressed extents with the encoded flag set. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: Zorro Lang --- diff --git a/tests/btrfs/280 b/tests/btrfs/280 index 06ef221e..fc049adb 100755 --- a/tests/btrfs/280 +++ b/tests/btrfs/280 @@ -42,7 +42,7 @@ $BTRFS_UTIL_PROG subvolume snapshot $SCRATCH_MNT $SCRATCH_MNT/snap | _filter_scr echo echo "File foo fiemap before COWing extent:" echo -$XFS_IO_PROG -c "fiemap -v" $SCRATCH_MNT/foo | _filter_fiemap_flags +$XFS_IO_PROG -c "fiemap -v" $SCRATCH_MNT/foo | _filter_fiemap_flags 1 echo echo "Overwriting file range [120M, 120M + 128K) in the snapshot" @@ -57,7 +57,7 @@ echo "File foo fiemap after COWing extent in the snapshot:" echo # Now we should have all extents marked as shared except the 128K extent in the # file range [120M, 120M + 128K). -$XFS_IO_PROG -c "fiemap -v" $SCRATCH_MNT/foo | _filter_fiemap_flags +$XFS_IO_PROG -c "fiemap -v" $SCRATCH_MNT/foo | _filter_fiemap_flags 1 # success, all done status=0 diff --git a/tests/btrfs/280.out b/tests/btrfs/280.out index c3f82966..5371f3b0 100644 --- a/tests/btrfs/280.out +++ b/tests/btrfs/280.out @@ -5,8 +5,8 @@ Create a snapshot of 'SCRATCH_MNT' in 'SCRATCH_MNT/snap' File foo fiemap before COWing extent: -0: [0..261887]: shared -1: [261888..262143]: shared|last +0: [0..261887]: shared|encoded +1: [261888..262143]: shared|encoded|last Overwriting file range [120M, 120M + 128K) in the snapshot @@ -15,7 +15,7 @@ XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) File foo fiemap after COWing extent in the snapshot: -0: [0..245759]: shared -1: [245760..246015]: none -2: [246016..261887]: shared -3: [261888..262143]: shared|last +0: [0..245759]: shared|encoded +1: [245760..246015]: encoded +2: [246016..261887]: shared|encoded +3: [261888..262143]: shared|encoded|last