Skip to contentSkip to conversation

fstests: btrfs: fix test failure when running with compression or nodatasum

PATCH Superseded [email protected] 5 participants 31 messages Feb 12, 2025 – Feb 14, 2025 Btrfs file system

lore
Share & tools
lore
#0 lore raw

cover fstests: btrfs: fix test failure when running with compression or nodatasum

From: Filipe Manana <[email protected]>

Several tests fail when running with the compression or nodatasum mount options. This patchset fixes that by either skipping the tests when those mount options are present or adapting the tests to able to run. Details in the changelogs.

Filipe Manana (8):
btrfs: skip tests incompatible with compression when compression is enabled btrfs/290: skip test if we are running with nodatacow mount option common/btrfs: add a _require_btrfs_no_nodatasum helper btrfs/333: skip the test when running with nodatacow or nodatasum btrfs/205: avoid test failure when running with nodatasum mount option
btrfs: skip tests exercising data corruption and repair when using nodatasum btrfs/281: skip test when running with nodatasum mount option
btrfs: skip tests that exercise compression property when using nodatasum

 common/btrfs    |  7 +++++++
 tests/btrfs/048 |  3 +++
 tests/btrfs/059 |  3 +++
 tests/btrfs/140 |  4 +++-
 tests/btrfs/141 |  4 +++-
 tests/btrfs/157 |  4 +++-
 tests/btrfs/158 |  4 +++-
 tests/btrfs/205 |  2 --
 tests/btrfs/215 |  8 +++++++-
 tests/btrfs/265 |  7 ++++++-
 tests/btrfs/266 |  7 ++++++-
 tests/btrfs/267 |  7 ++++++-
 tests/btrfs/268 |  7 ++++++-
 tests/btrfs/269 |  7 ++++++-
 tests/btrfs/281 |  2 ++
 tests/btrfs/289 |  8 ++++++--
 tests/btrfs/290 | 12 ++++++++++++
 tests/btrfs/297 |  4 ++++
 tests/btrfs/333 |  5 +++++
 19 files changed, 91 insertions(+), 14 deletions(-)
Signature · 1 line
2.45.2
#1 lore raw

PATCH 1/8 btrfs: skip tests incompatible with compression when compression is enabled

From: Filipe Manana <[email protected]>

We have several tests that fail when compression is enabled (MOUNT_OPTIONS has "-o compress" or "-o compress-force"") because they expect a fixed extent size and they trigger corruption by writing directly to a device, therefore making them incompatible with compression.

So add a _require_no_compress call to them.

---
 tests/btrfs/215 | 4 ++++
 tests/btrfs/265 | 3 +++
 tests/btrfs/266 | 3 +++
 tests/btrfs/267 | 3 +++
 tests/btrfs/268 | 3 +++
 tests/btrfs/269 | 3 +++
 tests/btrfs/289 | 4 +++-
 tests/btrfs/297 | 4 ++++
 8 files changed, 26 insertions(+), 1 deletion(-)
tests/btrfs/215 +4 -0
index b63ebff6..2418cc90 100755
@@ -25,6 +25,10 @@ _require_scratch
 _require_btrfs_no_nodatacow
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device $SCRATCH_DEV
+# We need to ensure a fixed amount of written blocks to trigger a specific
+# number of read errors and we corrupt by writing directly to the device, so
+# skip if compression is enabled.
+_require_no_compress
 
 _scratch_mkfs > /dev/null
 # disable freespace inode to ensure file is the first thing in the data
tests/btrfs/265 +3 -0
index 0fa55a7f..5640e714 100755
@@ -20,6 +20,9 @@ _require_btrfs_no_nodatacow
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 
 _scratch_dev_pool_get 3
 # step 1, create a raid1 btrfs which contains one 128k file.
tests/btrfs/266 +3 -0
index 0788ba94..681cefda 100755
@@ -21,6 +21,9 @@ _require_scratch_dev_pool 3
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 
 _scratch_dev_pool_get 3
 # step 1, create a raid1 btrfs which contains one 128k file.
tests/btrfs/267 +3 -0
index 151ccdae..ceba974d 100755
@@ -21,6 +21,9 @@ _require_btrfs_no_nodatacow
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 
 _scratch_dev_pool_get 3
 # step 1, create a raid1 btrfs which contains one 128k file.
tests/btrfs/268 +3 -0
index dce5cb95..99e1ee4a 100755
@@ -20,6 +20,9 @@ _require_btrfs_no_nodatacow
 _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices
 _require_scratch_dev_pool 2
 _scratch_dev_pool_get 2
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 
 echo "step 1......mkfs.btrfs"
 
tests/btrfs/269 +3 -0
index 129a4a41..183aeb73 100755
@@ -22,6 +22,9 @@ _require_odirect
 # No data checksums for NOCOW case, so can't detect corruption and repair data.
 _require_btrfs_no_nodatacow
 _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 _require_scratch_dev_pool 4
 _scratch_dev_pool_get 4
 
tests/btrfs/289 +3 -1
index 86e91021..b340b97d 100755
@@ -18,7 +18,9 @@ _require_btrfs_no_nodatacow
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
-
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 # The errors reported would be in the unit of sector, thus the number
 # is dependent on the sectorsize.
 _require_btrfs_support_sectorsize 4096
tests/btrfs/297 +4 -0
index eb4f365e..1f3f7c08 100755
@@ -14,6 +14,10 @@ _begin_fstest auto quick raid scrub
 _require_odirect
 _require_non_zoned_device "${SCRATCH_DEV}"
 _require_scratch_dev_pool 3
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
+
 _fixed_by_kernel_commit 486c737f7fdc \
 	"btrfs: raid56: always verify the P/Q contents for scrub"
 
Signature · 1 line
2.45.2
#3 lore raw

PATCH 2/8 btrfs/290: skip test if we are running with nodatacow mount option

In reply to [email protected]

From: Filipe Manana <[email protected]>

We exercise corrupting an inline extent and inline extents can't be created with nodatacow, we get instead a regular file extent item and if we attempt to corrupt its disk_bytenr field with btrfs-corrupt-block we fail tree-checker validation at mount time resulting in failure to mount and the following in dmesg:

[514127.759739] BTRFS critical (device sdc): corrupt leaf: root=5 \
        block=30408704 slot=8 ino=257 file_offset=0, invalid disk_bytenr for \
        file extent, have 7416089308958521981, should be aligned to 4096
[514127.762715] BTRFS error (device sdc): read time tree block corruption \
        detected on logical 30408704 mirror 1

So add a _require_btrfs_no_nodatacow call to the test.

---
 tests/btrfs/290 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tests/btrfs/290 +12 -0
index 1a5e267b..04563dfe 100755
@@ -30,6 +30,18 @@ _require_xfs_io_command "pread"
 _require_xfs_io_command "pwrite"
 _require_btrfs_corrupt_block "value"
 _require_btrfs_corrupt_block "offset"
+# We exercise corrupting an inline extent and inline extents can't be created
+# with nodatacow, we get instead a regular file extent item and if we attempt
+# to corrupt its disk_bytenr field with btrfs-corrupt-block we fail tree-checker
+# validation at mount time resulting in failure to mount and the following in
+# dmesg:
+#
+# [514127.759739] BTRFS critical (device sdc): corrupt leaf: root=5 \
+#         block=30408704 slot=8 ino=257 file_offset=0, invalid disk_bytenr for \
+#         file extent, have 7416089308958521981, should be aligned to 4096
+# [514127.762715] BTRFS error (device sdc): read time tree block corruption \
+#         detected on logical 30408704 mirror 1
+_require_btrfs_no_nodatacow
 _disable_fsverity_signatures
 
 get_ino() {
Signature · 1 line
2.45.2
#5 lore raw

PATCH 3/8 common/btrfs: add a _require_btrfs_no_nodatasum helper

In reply to [email protected]

From: Filipe Manana <[email protected]>

Add a _require_btrfs_no_nodatasum helper to skip a test if the nodatasum mount option is give, as we do have several tests that fail, for several reasons, when that mount option is passed.

---
 common/btrfs | 7 +++++++
 1 file changed, 7 insertions(+)
common/btrfs +7 -0
index 5d69ddd8..a3b9c12f 100644
@@ -134,6 +134,13 @@ _require_btrfs_no_nodatacow()
 	fi
 }
 
+_require_btrfs_no_nodatasum()
+{
+	if _normalize_mount_options "$MOUNT_OPTIONS" | grep -q "nodatasum"; then
+		_notrun "This test requires no nodatasum enabled"
+	fi
+}
+
 _require_btrfs_free_space_tree()
 {
 	_scratch_mkfs > /dev/null 2>&1
Signature · 1 line
2.45.2
#7 lore raw

PATCH 4/8 btrfs/333: skip the test when running with nodatacow or nodatasum

In reply to [email protected]

From: Filipe Manana <[email protected]>

Encoded writes are reject for inodes with the NODATASUM flag, so we must skip the test if running with either the nodatasum or nodatacow (which implies nodatasum) mount options.

So skip the test when under nodatacow and nodatasum mount options.

---
 tests/btrfs/333 | 5 +++++
 1 file changed, 5 insertions(+)
tests/btrfs/333 +5 -0
index 14cecdbc..6214d7c5 100755
@@ -14,6 +14,11 @@ _begin_fstest auto quick compress rw io_uring ioctl
 _require_command src/btrfs_encoded_read
 _require_command src/btrfs_encoded_write
 _require_btrfs_iouring_encoded_read
+# Encoded writes are reject for inodes with the NODATASUM flag, so we must skip
+# the test if running with either the nodatasum or nodatacow (which implies
+# nodatasum) mount options.
+_require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 
 do_encoded_read()
 {
Signature · 1 line
2.45.2
#9 lore raw

PATCH 5/8 btrfs/205: avoid test failure when running with nodatasum mount option

In reply to [email protected]

From: Filipe Manana <[email protected]>

Currently the test fails when we pass "-o nodatasum" in MOUNT_OPTIONS and the reason is because we enable compression, with "chattr +c", on a file and then try to clone from it to a file with nodatasum inherited from the mount options, which results in the clone ioctl to fail with -EINVAL since it's not possible to clone from datasum to nodatasum and vice-versa.

Fix this by removing the "chattr +c", as it's not needed and we already exercise the compression scenario by explicitly cycle mounting the scratch device with "-o compress". This also allows us to exercise cloning the "foo1" file without compression. I originally added the "chattr +c" call but this was probably an oversight while debugging something.

---
 tests/btrfs/205 | 2 --
 1 file changed, 2 deletions(-)
tests/btrfs/205 +0 -2
index 13a1df8b..71522492 100755
@@ -21,7 +21,6 @@ _begin_fstest auto quick clone compress prealloc
 
 _require_scratch_reflink
 _require_xfs_io_command "falloc" "-k"
-_require_command "$CHATTR_PROG" chattr
 _require_btrfs_fs_feature "no_holes"
 _require_btrfs_mkfs_feature "no-holes"
 
@@ -33,7 +32,6 @@ run_tests()
     # extent. It has a file size of 128K.
     echo "Creating file foo1"
     touch $SCRATCH_MNT/foo1
-    $CHATTR_PROG +c $SCRATCH_MNT/foo1 > /dev/null 2>&1
     $XFS_IO_PROG -c "pwrite -S 0xab 0 4K" \
 		 -c "fsync" \
 		 -c "pwrite -S 0xab 4K 124K" \
Signature · 1 line
2.45.2
#11 lore raw

PATCH 6/8 btrfs: skip tests exercising data corruption and repair when using nodatasum

In reply to [email protected]

From: Filipe Manana <[email protected]>

Several tests exercise corrupting data and then checking that on read the data is repaired, but this requires using checksums, so the tests fail when running with the nodatasum mount option.

So add a _require_btrfs_no_nodatasum call to these tests.

---
 tests/btrfs/140 | 4 +++-
 tests/btrfs/141 | 4 +++-
 tests/btrfs/157 | 4 +++-
 tests/btrfs/158 | 4 +++-
 tests/btrfs/215 | 4 +++-
 tests/btrfs/265 | 4 +++-
 tests/btrfs/266 | 4 +++-
 tests/btrfs/267 | 4 +++-
 tests/btrfs/268 | 4 +++-
 tests/btrfs/269 | 4 +++-
 tests/btrfs/289 | 4 +++-
 11 files changed, 33 insertions(+), 11 deletions(-)
tests/btrfs/140 +3 -1
index b2c8451d..cb70f967 100755
@@ -17,8 +17,10 @@ _begin_fstest auto quick read_repair fiemap
 . ./common/filter
 
 _require_scratch_dev_pool 2
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_btrfs_command inspect-internal dump-tree
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
tests/btrfs/141 +3 -1
index 3d48dff3..4afd3304 100755
@@ -17,8 +17,10 @@ _begin_fstest auto quick read_repair
 
 . ./common/filter
 
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_scratch_dev_pool 2
 
 _require_btrfs_command inspect-internal dump-tree
tests/btrfs/157 +3 -1
index c49229f0..00393fc8 100755
@@ -25,8 +25,10 @@ _begin_fstest auto quick raid read_repair
 
 . ./common/filter
 
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_scratch_dev_pool 4
 _require_btrfs_command inspect-internal dump-tree
 _require_btrfs_raid_type raid6
tests/btrfs/158 +3 -1
index ff28defe..87d16cdf 100755
@@ -17,8 +17,10 @@ _begin_fstest auto quick raid scrub
 
 . ./common/filter
 
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_scratch_dev_pool 4
 _require_btrfs_command inspect-internal dump-tree
 _require_btrfs_raid_type raid5
tests/btrfs/215 +3 -1
index 2418cc90..bd82fb79 100755
@@ -21,8 +21,10 @@ get_physical()
 }
 
 _require_scratch
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device $SCRATCH_DEV
 # We need to ensure a fixed amount of written blocks to trigger a specific
tests/btrfs/265 +3 -1
index 5640e714..823d4d96 100755
@@ -15,8 +15,10 @@ _begin_fstest auto quick read_repair
 
 _require_scratch_dev_pool 3
 
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
tests/btrfs/266 +3 -1
index 681cefda..bffcec27 100755
@@ -14,8 +14,10 @@ _begin_fstest auto quick read_repair
 
 . ./common/filter
 
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_scratch_dev_pool 3
 
 _require_odirect
tests/btrfs/267 +3 -1
index ceba974d..b4ea3106 100755
@@ -16,8 +16,10 @@ _begin_fstest auto quick read_repair
 
 _require_scratch_dev_pool 3
 
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
tests/btrfs/268 +3 -1
index 99e1ee4a..7681b1a5 100755
@@ -15,8 +15,10 @@ _begin_fstest auto quick read_repair
 
 _require_scratch
 _require_odirect
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices
 _require_scratch_dev_pool 2
 _scratch_dev_pool_get 2
tests/btrfs/269 +3 -1
index 183aeb73..c048da44 100755
@@ -19,8 +19,10 @@ _begin_fstest auto quick read_repair
 
 _require_scratch
 _require_odirect
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices
 # We need to ensure a fixed extent size and we corrupt by writing directly to
 # the device, so skip if compression is enabled.
tests/btrfs/289 +3 -1
index b340b97d..1e8336a7 100755
@@ -12,8 +12,10 @@ _begin_fstest auto quick scrub repair
 . ./common/filter
 
 _require_scratch
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
Signature · 1 line
2.45.2
#12 lore raw

PATCH 7/8 btrfs/281: skip test when running with nodatasum mount option

In reply to [email protected]

From: Filipe Manana <[email protected]>

The test exercises compression and compression doesn't happen on inodes with checksums disabled (nodatasum), making the test fail the expectations if getting compressed extents. So skip the test if nodatasum is present.

---
 tests/btrfs/281 | 2 ++
 1 file changed, 2 insertions(+)
tests/btrfs/281 +2 -0
index 855dd824..8fb7158a 100755
@@ -25,6 +25,8 @@ _require_btrfs_send_version 2
 _require_xfs_io_command "fiemap"
 _require_fssum
 _require_btrfs_no_nodatacow
+# Compression can't happen with nodatasum, so skip the test.
+_require_btrfs_no_nodatasum
 
 _fixed_by_kernel_commit a11452a3709e \
 	"btrfs: send: avoid unaligned encoded writes when attempting to clone range"
Signature · 1 line
2.45.2
#14 lore raw

PATCH 8/8 btrfs: skip tests that exercise compression property when using nodatasum

In reply to [email protected]

From: Filipe Manana <[email protected]>

A couple tests exercise the compression property and that fails when an inode has the nodatasum flag set. So skip the tests when running under the nodatasum mount option.

---
 tests/btrfs/048 | 3 +++
 tests/btrfs/059 | 3 +++
 2 files changed, 6 insertions(+)
tests/btrfs/048 +3 -0
index a38c3951..3676debe 100755
@@ -28,6 +28,9 @@ _require_scratch
 _require_btrfs_command "property"
 _require_btrfs_command inspect-internal dump-super
 _require_btrfs_no_nodatacow
+# We exercise setting compression through properties, and that fails on inodes
+# with nodatasum, so skip when mounting with nodatasum.
+_require_btrfs_no_nodatasum
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
tests/btrfs/059 +3 -0
index 227ebb14..3da6a5a9 100755
@@ -26,6 +26,9 @@ _require_test
 _require_scratch
 _require_btrfs_command "property"
 _require_btrfs_no_nodatacow
+# We exercise setting compression through properties, and that fails on inodes
+# with nodatasum, so skip when mounting with nodatasum.
+_require_btrfs_no_nodatasum
 
 _scratch_mkfs >> $seqres.full 2>&1
 _scratch_mount
Signature · 1 line
2.45.2
Reviewed-by on v1 5/8
#10 lore raw

Re: [PATCH 5/8] btrfs/205: avoid test failure when running with nodatasum mount option

In reply to [email protected]
Quoted 8 lines · On Wed, Feb 12, 2025 at 05:01:53PM +0000, [email protected] wrote:

From: Filipe Manana <[email protected]>

Currently the test fails when we pass "-o nodatasum" in MOUNT_OPTIONS and the reason is because we enable compression, with "chattr +c", on a file and then try to clone from it to a file with nodatasum inherited from the mount options, which results in the clone ioctl to fail with -EINVAL since it's not possible to clone from datasum to nodatasum and vice-versa.

Quoted 7 lines

Fix this by removing the "chattr +c", as it's not needed and we already exercise the compression scenario by explicitly cycle mounting the scratch device with "-o compress". This also allows us to exercise cloning the "foo1" file without compression. I originally added the "chattr +c" call but this was probably an oversight while debugging something.

Reviewed-by on v1 7/8
#13 lore raw

Re: [PATCH 7/8] btrfs/281: skip test when running with nodatasum mount option

In reply to [email protected]
Quoted 7 lines · On Wed, Feb 12, 2025 at 05:01:55PM +0000, [email protected] wrote:

From: Filipe Manana <[email protected]>

The test exercises compression and compression doesn't happen on inodes with checksums disabled (nodatasum), making the test fail the expectations if getting compressed extents. So skip the test if nodatasum is present.

Reviewed-by on v1 8/8
#15 lore raw

Re: [PATCH 8/8] btrfs: skip tests that exercise compression property when using nodatasum

In reply to [email protected]
Quoted 7 lines · On Wed, Feb 12, 2025 at 05:01:56PM +0000, [email protected] wrote:

From: Filipe Manana <[email protected]>

A couple tests exercise the compression property and that fails when an inode has the nodatasum flag set. So skip the tests when running under the nodatasum mount option.

#16 lore raw

v2 cover fstests: btrfs: fix test failures when running with compression or nodatasum

In reply to [email protected]

From: Filipe Manana <[email protected]>

Several tests fail when running with the compression or nodatasum mount options. This patchset fixes that by either skipping the tests when those mount options are present or adapting the tests to able to run. Details in the changelogs.

V2: Updated patch 5/8, the chattr must stay as we really want to create
an inline compressed extent, otherwise it wouldn't be exercising cloning of an inline extent. So skip the test instead of nodatasum is present and add a comment about it.

Added some collect review tags.

Filipe Manana (8):
btrfs: skip tests incompatible with compression when compression is enabled btrfs/290: skip test if we are running with nodatacow mount option common/btrfs: add a _require_btrfs_no_nodatasum helper btrfs/333: skip the test when running with nodatacow or nodatasum btrfs/205: skip test when running with nodatasum mount option
btrfs: skip tests exercising data corruption and repair when using nodatasum btrfs/281: skip test when running with nodatasum mount option
btrfs: skip tests that exercise compression property when using nodatasum

 common/btrfs    |  7 +++++++
 tests/btrfs/048 |  3 +++
 tests/btrfs/059 |  3 +++
 tests/btrfs/140 |  4 +++-
 tests/btrfs/141 |  4 +++-
 tests/btrfs/157 |  4 +++-
 tests/btrfs/158 |  4 +++-
 tests/btrfs/205 |  5 +++++
 tests/btrfs/215 |  8 +++++++-
 tests/btrfs/265 |  7 ++++++-
 tests/btrfs/266 |  7 ++++++-
 tests/btrfs/267 |  7 ++++++-
 tests/btrfs/268 |  7 ++++++-
 tests/btrfs/269 |  7 ++++++-
 tests/btrfs/281 |  2 ++
 tests/btrfs/289 |  8 ++++++--
 tests/btrfs/290 | 12 ++++++++++++
 tests/btrfs/297 |  4 ++++
 tests/btrfs/333 |  5 +++++
 19 files changed, 96 insertions(+), 12 deletions(-)
Signature · 1 line
2.45.2
#17 lore raw

PATCH v2 1/8 btrfs: skip tests incompatible with compression when compression is enabled

From: Filipe Manana <[email protected]>

We have several tests that fail when compression is enabled (MOUNT_OPTIONS has "-o compress" or "-o compress-force"") because they expect a fixed extent size and they trigger corruption by writing directly to a device, therefore making them incompatible with compression.

So add a _require_no_compress call to them.

---
 tests/btrfs/215 | 4 ++++
 tests/btrfs/265 | 3 +++
 tests/btrfs/266 | 3 +++
 tests/btrfs/267 | 3 +++
 tests/btrfs/268 | 3 +++
 tests/btrfs/269 | 3 +++
 tests/btrfs/289 | 4 +++-
 tests/btrfs/297 | 4 ++++
 8 files changed, 26 insertions(+), 1 deletion(-)
tests/btrfs/215 +4 -0
index b63ebff6..2418cc90 100755
@@ -25,6 +25,10 @@ _require_scratch
 _require_btrfs_no_nodatacow
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device $SCRATCH_DEV
+# We need to ensure a fixed amount of written blocks to trigger a specific
+# number of read errors and we corrupt by writing directly to the device, so
+# skip if compression is enabled.
+_require_no_compress
 
 _scratch_mkfs > /dev/null
 # disable freespace inode to ensure file is the first thing in the data
tests/btrfs/265 +3 -0
index 0fa55a7f..5640e714 100755
@@ -20,6 +20,9 @@ _require_btrfs_no_nodatacow
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 
 _scratch_dev_pool_get 3
 # step 1, create a raid1 btrfs which contains one 128k file.
tests/btrfs/266 +3 -0
index 0788ba94..681cefda 100755
@@ -21,6 +21,9 @@ _require_scratch_dev_pool 3
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 
 _scratch_dev_pool_get 3
 # step 1, create a raid1 btrfs which contains one 128k file.
tests/btrfs/267 +3 -0
index 151ccdae..ceba974d 100755
@@ -21,6 +21,9 @@ _require_btrfs_no_nodatacow
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 
 _scratch_dev_pool_get 3
 # step 1, create a raid1 btrfs which contains one 128k file.
tests/btrfs/268 +3 -0
index dce5cb95..99e1ee4a 100755
@@ -20,6 +20,9 @@ _require_btrfs_no_nodatacow
 _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices
 _require_scratch_dev_pool 2
 _scratch_dev_pool_get 2
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 
 echo "step 1......mkfs.btrfs"
 
tests/btrfs/269 +3 -0
index 129a4a41..183aeb73 100755
@@ -22,6 +22,9 @@ _require_odirect
 # No data checksums for NOCOW case, so can't detect corruption and repair data.
 _require_btrfs_no_nodatacow
 _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 _require_scratch_dev_pool 4
 _scratch_dev_pool_get 4
 
tests/btrfs/289 +3 -1
index 86e91021..b340b97d 100755
@@ -18,7 +18,9 @@ _require_btrfs_no_nodatacow
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
-
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 # The errors reported would be in the unit of sector, thus the number
 # is dependent on the sectorsize.
 _require_btrfs_support_sectorsize 4096
tests/btrfs/297 +4 -0
index eb4f365e..1f3f7c08 100755
@@ -14,6 +14,10 @@ _begin_fstest auto quick raid scrub
 _require_odirect
 _require_non_zoned_device "${SCRATCH_DEV}"
 _require_scratch_dev_pool 3
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
+
 _fixed_by_kernel_commit 486c737f7fdc \
 	"btrfs: raid56: always verify the P/Q contents for scrub"
 
Signature · 1 line
2.45.2
#18 lore raw

PATCH v2 2/8 btrfs/290: skip test if we are running with nodatacow mount option

In reply to [email protected]

From: Filipe Manana <[email protected]>

We exercise corrupting an inline extent and inline extents can't be created with nodatacow, we get instead a regular file extent item and if we attempt to corrupt its disk_bytenr field with btrfs-corrupt-block we fail tree-checker validation at mount time resulting in failure to mount and the following in dmesg:

[514127.759739] BTRFS critical (device sdc): corrupt leaf: root=5 \
        block=30408704 slot=8 ino=257 file_offset=0, invalid disk_bytenr for \
        file extent, have 7416089308958521981, should be aligned to 4096
[514127.762715] BTRFS error (device sdc): read time tree block corruption \
        detected on logical 30408704 mirror 1

So add a _require_btrfs_no_nodatacow call to the test.

---
 tests/btrfs/290 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tests/btrfs/290 +12 -0
index 1a5e267b..04563dfe 100755
@@ -30,6 +30,18 @@ _require_xfs_io_command "pread"
 _require_xfs_io_command "pwrite"
 _require_btrfs_corrupt_block "value"
 _require_btrfs_corrupt_block "offset"
+# We exercise corrupting an inline extent and inline extents can't be created
+# with nodatacow, we get instead a regular file extent item and if we attempt
+# to corrupt its disk_bytenr field with btrfs-corrupt-block we fail tree-checker
+# validation at mount time resulting in failure to mount and the following in
+# dmesg:
+#
+# [514127.759739] BTRFS critical (device sdc): corrupt leaf: root=5 \
+#         block=30408704 slot=8 ino=257 file_offset=0, invalid disk_bytenr for \
+#         file extent, have 7416089308958521981, should be aligned to 4096
+# [514127.762715] BTRFS error (device sdc): read time tree block corruption \
+#         detected on logical 30408704 mirror 1
+_require_btrfs_no_nodatacow
 _disable_fsverity_signatures
 
 get_ino() {
Signature · 1 line
2.45.2
#19 lore raw

PATCH v2 3/8 common/btrfs: add a _require_btrfs_no_nodatasum helper

In reply to [email protected]

From: Filipe Manana <[email protected]>

Add a _require_btrfs_no_nodatasum helper to skip a test if the nodatasum mount option is give, as we do have several tests that fail, for several reasons, when that mount option is passed.

---
 common/btrfs | 7 +++++++
 1 file changed, 7 insertions(+)
common/btrfs +7 -0
index 5d69ddd8..a3b9c12f 100644
@@ -134,6 +134,13 @@ _require_btrfs_no_nodatacow()
 	fi
 }
 
+_require_btrfs_no_nodatasum()
+{
+	if _normalize_mount_options "$MOUNT_OPTIONS" | grep -q "nodatasum"; then
+		_notrun "This test requires no nodatasum enabled"
+	fi
+}
+
 _require_btrfs_free_space_tree()
 {
 	_scratch_mkfs > /dev/null 2>&1
Signature · 1 line
2.45.2
#20 lore raw

PATCH v2 4/8 btrfs/333: skip the test when running with nodatacow or nodatasum

In reply to [email protected]

From: Filipe Manana <[email protected]>

Encoded writes are reject for inodes with the NODATASUM flag, so we must skip the test if running with either the nodatasum or nodatacow (which implies nodatasum) mount options.

So skip the test when under nodatacow and nodatasum mount options.

---
 tests/btrfs/333 | 5 +++++
 1 file changed, 5 insertions(+)
tests/btrfs/333 +5 -0
index 14cecdbc..6214d7c5 100755
@@ -14,6 +14,11 @@ _begin_fstest auto quick compress rw io_uring ioctl
 _require_command src/btrfs_encoded_read
 _require_command src/btrfs_encoded_write
 _require_btrfs_iouring_encoded_read
+# Encoded writes are reject for inodes with the NODATASUM flag, so we must skip
+# the test if running with either the nodatasum or nodatacow (which implies
+# nodatasum) mount options.
+_require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 
 do_encoded_read()
 {
Signature · 1 line
2.45.2
#21 lore raw

PATCH v2 5/8 btrfs/205: skip test when running with nodatasum mount option

In reply to [email protected]

From: Filipe Manana <[email protected]>

Currently the test fails when we pass "-o nodatasum" in MOUNT_OPTIONS and the reason is because we enable compression, with "chattr +c", on a file and then try to clone from it to a file with nodatasum inherited from the mount options, which results in the clone ioctl to fail with -EINVAL since it's not possible to clone from datasum to nodatasum and vice-versa.

So skip the test if nodatasum is a mount option.

---
 tests/btrfs/205 | 5 +++++
 1 file changed, 5 insertions(+)
tests/btrfs/205 +5 -0
index 13a1df8b..a557ab14 100755
@@ -24,6 +24,11 @@ _require_xfs_io_command "falloc" "-k"
 _require_command "$CHATTR_PROG" chattr
 _require_btrfs_fs_feature "no_holes"
 _require_btrfs_mkfs_feature "no-holes"
+# We want to create a compressed inline extent representing 4K of data for file
+# foo1 and then clone it into a file without compression, and since compression
+# implies datasum, cloning fails if the destination file has nodatasum. So skip
+# the test if nodatasum is present in MOUNT_OPTIONS.
+_require_btrfs_no_nodatasum
 
 run_tests()
 {
Signature · 1 line
2.45.2
#23 lore raw

PATCH v2 6/8 btrfs: skip tests exercising data corruption and repair when using nodatasum

In reply to [email protected]

From: Filipe Manana <[email protected]>

Several tests exercise corrupting data and then checking that on read the data is repaired, but this requires using checksums, so the tests fail when running with the nodatasum mount option.

So add a _require_btrfs_no_nodatasum call to these tests.

---
 tests/btrfs/140 | 4 +++-
 tests/btrfs/141 | 4 +++-
 tests/btrfs/157 | 4 +++-
 tests/btrfs/158 | 4 +++-
 tests/btrfs/215 | 4 +++-
 tests/btrfs/265 | 4 +++-
 tests/btrfs/266 | 4 +++-
 tests/btrfs/267 | 4 +++-
 tests/btrfs/268 | 4 +++-
 tests/btrfs/269 | 4 +++-
 tests/btrfs/289 | 4 +++-
 11 files changed, 33 insertions(+), 11 deletions(-)
tests/btrfs/140 +3 -1
index b2c8451d..cb70f967 100755
@@ -17,8 +17,10 @@ _begin_fstest auto quick read_repair fiemap
 . ./common/filter
 
 _require_scratch_dev_pool 2
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_btrfs_command inspect-internal dump-tree
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
tests/btrfs/141 +3 -1
index 3d48dff3..4afd3304 100755
@@ -17,8 +17,10 @@ _begin_fstest auto quick read_repair
 
 . ./common/filter
 
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_scratch_dev_pool 2
 
 _require_btrfs_command inspect-internal dump-tree
tests/btrfs/157 +3 -1
index c49229f0..00393fc8 100755
@@ -25,8 +25,10 @@ _begin_fstest auto quick raid read_repair
 
 . ./common/filter
 
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_scratch_dev_pool 4
 _require_btrfs_command inspect-internal dump-tree
 _require_btrfs_raid_type raid6
tests/btrfs/158 +3 -1
index ff28defe..87d16cdf 100755
@@ -17,8 +17,10 @@ _begin_fstest auto quick raid scrub
 
 . ./common/filter
 
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_scratch_dev_pool 4
 _require_btrfs_command inspect-internal dump-tree
 _require_btrfs_raid_type raid5
tests/btrfs/215 +3 -1
index 2418cc90..bd82fb79 100755
@@ -21,8 +21,10 @@ get_physical()
 }
 
 _require_scratch
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device $SCRATCH_DEV
 # We need to ensure a fixed amount of written blocks to trigger a specific
tests/btrfs/265 +3 -1
index 5640e714..823d4d96 100755
@@ -15,8 +15,10 @@ _begin_fstest auto quick read_repair
 
 _require_scratch_dev_pool 3
 
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
tests/btrfs/266 +3 -1
index 681cefda..bffcec27 100755
@@ -14,8 +14,10 @@ _begin_fstest auto quick read_repair
 
 . ./common/filter
 
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_scratch_dev_pool 3
 
 _require_odirect
tests/btrfs/267 +3 -1
index ceba974d..b4ea3106 100755
@@ -16,8 +16,10 @@ _begin_fstest auto quick read_repair
 
 _require_scratch_dev_pool 3
 
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
tests/btrfs/268 +3 -1
index 99e1ee4a..7681b1a5 100755
@@ -15,8 +15,10 @@ _begin_fstest auto quick read_repair
 
 _require_scratch
 _require_odirect
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices
 _require_scratch_dev_pool 2
 _scratch_dev_pool_get 2
tests/btrfs/269 +3 -1
index 183aeb73..c048da44 100755
@@ -19,8 +19,10 @@ _begin_fstest auto quick read_repair
 
 _require_scratch
 _require_odirect
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices
 # We need to ensure a fixed extent size and we corrupt by writing directly to
 # the device, so skip if compression is enabled.
tests/btrfs/289 +3 -1
index b340b97d..1e8336a7 100755
@@ -12,8 +12,10 @@ _begin_fstest auto quick scrub repair
 . ./common/filter
 
 _require_scratch
-# No data checksums for NOCOW case, so can't detect corruption and repair data.
+# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption
+# and repair data.
 _require_btrfs_no_nodatacow
+_require_btrfs_no_nodatasum
 
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
Signature · 1 line
2.45.2
#25 lore raw

PATCH v2 7/8 btrfs/281: skip test when running with nodatasum mount option

In reply to [email protected]

From: Filipe Manana <[email protected]>

The test exercises compression and compression doesn't happen on inodes with checksums disabled (nodatasum), making the test fail the expectations if getting compressed extents. So skip the test if nodatasum is present.

---
 tests/btrfs/281 | 2 ++
 1 file changed, 2 insertions(+)
tests/btrfs/281 +2 -0
index 855dd824..8fb7158a 100755
@@ -25,6 +25,8 @@ _require_btrfs_send_version 2
 _require_xfs_io_command "fiemap"
 _require_fssum
 _require_btrfs_no_nodatacow
+# Compression can't happen with nodatasum, so skip the test.
+_require_btrfs_no_nodatasum
 
 _fixed_by_kernel_commit a11452a3709e \
 	"btrfs: send: avoid unaligned encoded writes when attempting to clone range"
Signature · 1 line
2.45.2
#27 lore raw

PATCH v2 8/8 btrfs: skip tests that exercise compression property when using nodatasum

In reply to [email protected]

From: Filipe Manana <[email protected]>

A couple tests exercise the compression property and that fails when an inode has the nodatasum flag set. So skip the tests when running under the nodatasum mount option.

---
 tests/btrfs/048 | 3 +++
 tests/btrfs/059 | 3 +++
 2 files changed, 6 insertions(+)
tests/btrfs/048 +3 -0
index a38c3951..3676debe 100755
@@ -28,6 +28,9 @@ _require_scratch
 _require_btrfs_command "property"
 _require_btrfs_command inspect-internal dump-super
 _require_btrfs_no_nodatacow
+# We exercise setting compression through properties, and that fails on inodes
+# with nodatasum, so skip when mounting with nodatasum.
+_require_btrfs_no_nodatasum
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
tests/btrfs/059 +3 -0
index 227ebb14..3da6a5a9 100755
@@ -26,6 +26,9 @@ _require_test
 _require_scratch
 _require_btrfs_command "property"
 _require_btrfs_no_nodatacow
+# We exercise setting compression through properties, and that fails on inodes
+# with nodatasum, so skip when mounting with nodatasum.
+_require_btrfs_no_nodatasum
 
 _scratch_mkfs >> $seqres.full 2>&1
 _scratch_mount
Signature · 1 line
2.45.2
Reviewed-by on the v2 series
#29 lore raw

Re: [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum

In reply to [email protected]
Quoted 6 lines · 在 2025/2/13 10:04, [email protected] 写道:

From: Filipe Manana <[email protected]>

Several tests fail when running with the compression or nodatasum mount options. This patchset fixes that by either skipping the tests when those mount options are present or adapting the tests to able to run. Details in the changelogs.

Thanks,
Qu

Quoted 39 lines

V2: Updated patch 5/8, the chattr must stay as we really want to create
an inline compressed extent, otherwise it wouldn't be exercising cloning of an inline extent. So skip the test instead of nodatasum is present and add a comment about it.

Added some collect review tags.

Filipe Manana (8):
btrfs: skip tests incompatible with compression when compression is enabled btrfs/290: skip test if we are running with nodatacow mount option common/btrfs: add a _require_btrfs_no_nodatasum helper btrfs/333: skip the test when running with nodatacow or nodatasum btrfs/205: skip test when running with nodatasum mount option
btrfs: skip tests exercising data corruption and repair when using nodatasum btrfs/281: skip test when running with nodatasum mount option
btrfs: skip tests that exercise compression property when using nodatasum

  common/btrfs    |  7 +++++++
  tests/btrfs/048 |  3 +++
  tests/btrfs/059 |  3 +++
  tests/btrfs/140 |  4 +++-
  tests/btrfs/141 |  4 +++-
  tests/btrfs/157 |  4 +++-
  tests/btrfs/158 |  4 +++-
  tests/btrfs/205 |  5 +++++
  tests/btrfs/215 |  8 +++++++-
  tests/btrfs/265 |  7 ++++++-
  tests/btrfs/266 |  7 ++++++-
  tests/btrfs/267 |  7 ++++++-
  tests/btrfs/268 |  7 ++++++-
  tests/btrfs/269 |  7 ++++++-
  tests/btrfs/281 |  2 ++
  tests/btrfs/289 |  8 ++++++--
  tests/btrfs/290 | 12 ++++++++++++
  tests/btrfs/297 |  4 ++++
  tests/btrfs/333 |  5 +++++
  19 files changed, 96 insertions(+), 12 deletions(-)
Reviewed-by on the v2 series
#30 lore raw

Re: [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum

In reply to [email protected]
Quoted 7 lines · On 13/2/25 07:34, [email protected] wrote:

From: Filipe Manana <[email protected]>

Several tests fail when running with the compression or nodatasum mount options. This patchset fixes that by either skipping the tests when those mount options are present or adapting the tests to able to run. Details in the changelogs.

Quoted 7 lines

V2: Updated patch 5/8, the chattr must stay as we really want to create
an inline compressed extent, otherwise it wouldn't be exercising cloning of an inline extent. So skip the test instead of nodatasum is present and add a comment about it.

Added some collect review tags.

Looks good. Thx.

Merged.

-Anand

Quoted 31 lines

Filipe Manana (8):
btrfs: skip tests incompatible with compression when compression is enabled btrfs/290: skip test if we are running with nodatacow mount option common/btrfs: add a _require_btrfs_no_nodatasum helper btrfs/333: skip the test when running with nodatacow or nodatasum btrfs/205: skip test when running with nodatasum mount option
btrfs: skip tests exercising data corruption and repair when using nodatasum btrfs/281: skip test when running with nodatasum mount option
btrfs: skip tests that exercise compression property when using nodatasum

  common/btrfs    |  7 +++++++
  tests/btrfs/048 |  3 +++
  tests/btrfs/059 |  3 +++
  tests/btrfs/140 |  4 +++-
  tests/btrfs/141 |  4 +++-
  tests/btrfs/157 |  4 +++-
  tests/btrfs/158 |  4 +++-
  tests/btrfs/205 |  5 +++++
  tests/btrfs/215 |  8 +++++++-
  tests/btrfs/265 |  7 ++++++-
  tests/btrfs/266 |  7 ++++++-
  tests/btrfs/267 |  7 ++++++-
  tests/btrfs/268 |  7 ++++++-
  tests/btrfs/269 |  7 ++++++-
  tests/btrfs/281 |  2 ++
  tests/btrfs/289 |  8 ++++++--
  tests/btrfs/290 | 12 ++++++++++++
  tests/btrfs/297 |  4 ++++
  tests/btrfs/333 |  5 +++++
  19 files changed, 96 insertions(+), 12 deletions(-)