[PATCH 3/4] btrfs/280: also verify that fiemap reports extents as encoded

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



From: Filipe Manana <fdmanana@xxxxxxxx>

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.

Signed-off-by: Filipe Manana <fdmanana@xxxxxxxx>
---
 tests/btrfs/280     |  4 ++--
 tests/btrfs/280.out | 12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

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
-- 
2.35.1




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux