* [PATCH 0/8] fstests: btrfs: fix test failure when running with compression or nodatasum
@ 2025-02-12 17:01 fdmanana
2025-02-12 17:01 ` [PATCH 1/8] btrfs: skip tests incompatible with compression when compression is enabled fdmanana
` (8 more replies)
0 siblings, 9 replies; 31+ messages in thread
From: fdmanana @ 2025-02-12 17:01 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
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(-)
--
2.45.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 1/8] btrfs: skip tests incompatible with compression when compression is enabled
2025-02-12 17:01 [PATCH 0/8] fstests: btrfs: fix test failure when running with compression or nodatasum fdmanana
@ 2025-02-12 17:01 ` fdmanana
2025-02-12 17:16 ` Johannes Thumshirn
2025-02-12 17:01 ` [PATCH 2/8] btrfs/290: skip test if we are running with nodatacow mount option fdmanana
` (7 subsequent siblings)
8 siblings, 1 reply; 31+ messages in thread
From: fdmanana @ 2025-02-12 17:01 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
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.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
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(-)
diff --git a/tests/btrfs/215 b/tests/btrfs/215
index b63ebff6..2418cc90 100755
--- a/tests/btrfs/215
+++ b/tests/btrfs/215
@@ -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
diff --git a/tests/btrfs/265 b/tests/btrfs/265
index 0fa55a7f..5640e714 100755
--- a/tests/btrfs/265
+++ b/tests/btrfs/265
@@ -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.
diff --git a/tests/btrfs/266 b/tests/btrfs/266
index 0788ba94..681cefda 100755
--- a/tests/btrfs/266
+++ b/tests/btrfs/266
@@ -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.
diff --git a/tests/btrfs/267 b/tests/btrfs/267
index 151ccdae..ceba974d 100755
--- a/tests/btrfs/267
+++ b/tests/btrfs/267
@@ -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.
diff --git a/tests/btrfs/268 b/tests/btrfs/268
index dce5cb95..99e1ee4a 100755
--- a/tests/btrfs/268
+++ b/tests/btrfs/268
@@ -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"
diff --git a/tests/btrfs/269 b/tests/btrfs/269
index 129a4a41..183aeb73 100755
--- a/tests/btrfs/269
+++ b/tests/btrfs/269
@@ -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
diff --git a/tests/btrfs/289 b/tests/btrfs/289
index 86e91021..b340b97d 100755
--- a/tests/btrfs/289
+++ b/tests/btrfs/289
@@ -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
diff --git a/tests/btrfs/297 b/tests/btrfs/297
index eb4f365e..1f3f7c08 100755
--- a/tests/btrfs/297
+++ b/tests/btrfs/297
@@ -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"
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 2/8] btrfs/290: skip test if we are running with nodatacow mount option
2025-02-12 17:01 [PATCH 0/8] fstests: btrfs: fix test failure when running with compression or nodatasum fdmanana
2025-02-12 17:01 ` [PATCH 1/8] btrfs: skip tests incompatible with compression when compression is enabled fdmanana
@ 2025-02-12 17:01 ` fdmanana
2025-02-12 17:19 ` Johannes Thumshirn
2025-02-12 17:01 ` [PATCH 3/8] common/btrfs: add a _require_btrfs_no_nodatasum helper fdmanana
` (6 subsequent siblings)
8 siblings, 1 reply; 31+ messages in thread
From: fdmanana @ 2025-02-12 17:01 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
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.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
tests/btrfs/290 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/btrfs/290 b/tests/btrfs/290
index 1a5e267b..04563dfe 100755
--- a/tests/btrfs/290
+++ b/tests/btrfs/290
@@ -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() {
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 3/8] common/btrfs: add a _require_btrfs_no_nodatasum helper
2025-02-12 17:01 [PATCH 0/8] fstests: btrfs: fix test failure when running with compression or nodatasum fdmanana
2025-02-12 17:01 ` [PATCH 1/8] btrfs: skip tests incompatible with compression when compression is enabled fdmanana
2025-02-12 17:01 ` [PATCH 2/8] btrfs/290: skip test if we are running with nodatacow mount option fdmanana
@ 2025-02-12 17:01 ` fdmanana
2025-02-12 17:20 ` Johannes Thumshirn
2025-02-12 17:01 ` [PATCH 4/8] btrfs/333: skip the test when running with nodatacow or nodatasum fdmanana
` (5 subsequent siblings)
8 siblings, 1 reply; 31+ messages in thread
From: fdmanana @ 2025-02-12 17:01 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
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.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
common/btrfs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/common/btrfs b/common/btrfs
index 5d69ddd8..a3b9c12f 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -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
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 4/8] btrfs/333: skip the test when running with nodatacow or nodatasum
2025-02-12 17:01 [PATCH 0/8] fstests: btrfs: fix test failure when running with compression or nodatasum fdmanana
` (2 preceding siblings ...)
2025-02-12 17:01 ` [PATCH 3/8] common/btrfs: add a _require_btrfs_no_nodatasum helper fdmanana
@ 2025-02-12 17:01 ` fdmanana
2025-02-12 17:21 ` Johannes Thumshirn
2025-02-12 17:01 ` [PATCH 5/8] btrfs/205: avoid test failure when running with nodatasum mount option fdmanana
` (4 subsequent siblings)
8 siblings, 1 reply; 31+ messages in thread
From: fdmanana @ 2025-02-12 17:01 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
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.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
tests/btrfs/333 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/btrfs/333 b/tests/btrfs/333
index 14cecdbc..6214d7c5 100755
--- a/tests/btrfs/333
+++ b/tests/btrfs/333
@@ -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()
{
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 5/8] btrfs/205: avoid test failure when running with nodatasum mount option
2025-02-12 17:01 [PATCH 0/8] fstests: btrfs: fix test failure when running with compression or nodatasum fdmanana
` (3 preceding siblings ...)
2025-02-12 17:01 ` [PATCH 4/8] btrfs/333: skip the test when running with nodatacow or nodatasum fdmanana
@ 2025-02-12 17:01 ` fdmanana
2025-02-12 23:20 ` David Sterba
2025-02-12 17:01 ` [PATCH 6/8] btrfs: skip tests exercising data corruption and repair when using nodatasum fdmanana
` (3 subsequent siblings)
8 siblings, 1 reply; 31+ messages in thread
From: fdmanana @ 2025-02-12 17:01 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
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.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
tests/btrfs/205 | 2 --
1 file changed, 2 deletions(-)
diff --git a/tests/btrfs/205 b/tests/btrfs/205
index 13a1df8b..71522492 100755
--- a/tests/btrfs/205
+++ b/tests/btrfs/205
@@ -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" \
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 6/8] btrfs: skip tests exercising data corruption and repair when using nodatasum
2025-02-12 17:01 [PATCH 0/8] fstests: btrfs: fix test failure when running with compression or nodatasum fdmanana
` (4 preceding siblings ...)
2025-02-12 17:01 ` [PATCH 5/8] btrfs/205: avoid test failure when running with nodatasum mount option fdmanana
@ 2025-02-12 17:01 ` fdmanana
2025-02-12 17:01 ` [PATCH 7/8] btrfs/281: skip test when running with nodatasum mount option fdmanana
` (2 subsequent siblings)
8 siblings, 0 replies; 31+ messages in thread
From: fdmanana @ 2025-02-12 17:01 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
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.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
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(-)
diff --git a/tests/btrfs/140 b/tests/btrfs/140
index b2c8451d..cb70f967 100755
--- a/tests/btrfs/140
+++ b/tests/btrfs/140
@@ -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
diff --git a/tests/btrfs/141 b/tests/btrfs/141
index 3d48dff3..4afd3304 100755
--- a/tests/btrfs/141
+++ b/tests/btrfs/141
@@ -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
diff --git a/tests/btrfs/157 b/tests/btrfs/157
index c49229f0..00393fc8 100755
--- a/tests/btrfs/157
+++ b/tests/btrfs/157
@@ -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
diff --git a/tests/btrfs/158 b/tests/btrfs/158
index ff28defe..87d16cdf 100755
--- a/tests/btrfs/158
+++ b/tests/btrfs/158
@@ -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
diff --git a/tests/btrfs/215 b/tests/btrfs/215
index 2418cc90..bd82fb79 100755
--- a/tests/btrfs/215
+++ b/tests/btrfs/215
@@ -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
diff --git a/tests/btrfs/265 b/tests/btrfs/265
index 5640e714..823d4d96 100755
--- a/tests/btrfs/265
+++ b/tests/btrfs/265
@@ -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}"
diff --git a/tests/btrfs/266 b/tests/btrfs/266
index 681cefda..bffcec27 100755
--- a/tests/btrfs/266
+++ b/tests/btrfs/266
@@ -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
diff --git a/tests/btrfs/267 b/tests/btrfs/267
index ceba974d..b4ea3106 100755
--- a/tests/btrfs/267
+++ b/tests/btrfs/267
@@ -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}"
diff --git a/tests/btrfs/268 b/tests/btrfs/268
index 99e1ee4a..7681b1a5 100755
--- a/tests/btrfs/268
+++ b/tests/btrfs/268
@@ -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
diff --git a/tests/btrfs/269 b/tests/btrfs/269
index 183aeb73..c048da44 100755
--- a/tests/btrfs/269
+++ b/tests/btrfs/269
@@ -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.
diff --git a/tests/btrfs/289 b/tests/btrfs/289
index b340b97d..1e8336a7 100755
--- a/tests/btrfs/289
+++ b/tests/btrfs/289
@@ -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
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 7/8] btrfs/281: skip test when running with nodatasum mount option
2025-02-12 17:01 [PATCH 0/8] fstests: btrfs: fix test failure when running with compression or nodatasum fdmanana
` (5 preceding siblings ...)
2025-02-12 17:01 ` [PATCH 6/8] btrfs: skip tests exercising data corruption and repair when using nodatasum fdmanana
@ 2025-02-12 17:01 ` fdmanana
2025-02-12 23:21 ` David Sterba
2025-02-12 17:01 ` [PATCH 8/8] btrfs: skip tests that exercise compression property when using nodatasum fdmanana
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
8 siblings, 1 reply; 31+ messages in thread
From: fdmanana @ 2025-02-12 17:01 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
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.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
tests/btrfs/281 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/btrfs/281 b/tests/btrfs/281
index 855dd824..8fb7158a 100755
--- a/tests/btrfs/281
+++ b/tests/btrfs/281
@@ -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"
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 8/8] btrfs: skip tests that exercise compression property when using nodatasum
2025-02-12 17:01 [PATCH 0/8] fstests: btrfs: fix test failure when running with compression or nodatasum fdmanana
` (6 preceding siblings ...)
2025-02-12 17:01 ` [PATCH 7/8] btrfs/281: skip test when running with nodatasum mount option fdmanana
@ 2025-02-12 17:01 ` fdmanana
2025-02-12 23:21 ` David Sterba
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
8 siblings, 1 reply; 31+ messages in thread
From: fdmanana @ 2025-02-12 17:01 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
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.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
tests/btrfs/048 | 3 +++
tests/btrfs/059 | 3 +++
2 files changed, 6 insertions(+)
diff --git a/tests/btrfs/048 b/tests/btrfs/048
index a38c3951..3676debe 100755
--- a/tests/btrfs/048
+++ b/tests/btrfs/048
@@ -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
diff --git a/tests/btrfs/059 b/tests/btrfs/059
index 227ebb14..3da6a5a9 100755
--- a/tests/btrfs/059
+++ b/tests/btrfs/059
@@ -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
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 1/8] btrfs: skip tests incompatible with compression when compression is enabled
2025-02-12 17:01 ` [PATCH 1/8] btrfs: skip tests incompatible with compression when compression is enabled fdmanana
@ 2025-02-12 17:16 ` Johannes Thumshirn
0 siblings, 0 replies; 31+ messages in thread
From: Johannes Thumshirn @ 2025-02-12 17:16 UTC (permalink / raw)
To: fdmanana@kernel.org, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Filipe Manana
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 2/8] btrfs/290: skip test if we are running with nodatacow mount option
2025-02-12 17:01 ` [PATCH 2/8] btrfs/290: skip test if we are running with nodatacow mount option fdmanana
@ 2025-02-12 17:19 ` Johannes Thumshirn
0 siblings, 0 replies; 31+ messages in thread
From: Johannes Thumshirn @ 2025-02-12 17:19 UTC (permalink / raw)
To: fdmanana@kernel.org, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Filipe Manana
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 3/8] common/btrfs: add a _require_btrfs_no_nodatasum helper
2025-02-12 17:01 ` [PATCH 3/8] common/btrfs: add a _require_btrfs_no_nodatasum helper fdmanana
@ 2025-02-12 17:20 ` Johannes Thumshirn
0 siblings, 0 replies; 31+ messages in thread
From: Johannes Thumshirn @ 2025-02-12 17:20 UTC (permalink / raw)
To: fdmanana@kernel.org, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Filipe Manana
All those double negations XD
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 4/8] btrfs/333: skip the test when running with nodatacow or nodatasum
2025-02-12 17:01 ` [PATCH 4/8] btrfs/333: skip the test when running with nodatacow or nodatasum fdmanana
@ 2025-02-12 17:21 ` Johannes Thumshirn
0 siblings, 0 replies; 31+ messages in thread
From: Johannes Thumshirn @ 2025-02-12 17:21 UTC (permalink / raw)
To: fdmanana@kernel.org, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Filipe Manana
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 5/8] btrfs/205: avoid test failure when running with nodatasum mount option
2025-02-12 17:01 ` [PATCH 5/8] btrfs/205: avoid test failure when running with nodatasum mount option fdmanana
@ 2025-02-12 23:20 ` David Sterba
0 siblings, 0 replies; 31+ messages in thread
From: David Sterba @ 2025-02-12 23:20 UTC (permalink / raw)
To: fdmanana; +Cc: fstests, linux-btrfs, Filipe Manana
On Wed, Feb 12, 2025 at 05:01:53PM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> 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.
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 7/8] btrfs/281: skip test when running with nodatasum mount option
2025-02-12 17:01 ` [PATCH 7/8] btrfs/281: skip test when running with nodatasum mount option fdmanana
@ 2025-02-12 23:21 ` David Sterba
0 siblings, 0 replies; 31+ messages in thread
From: David Sterba @ 2025-02-12 23:21 UTC (permalink / raw)
To: fdmanana; +Cc: fstests, linux-btrfs, Filipe Manana
On Wed, Feb 12, 2025 at 05:01:55PM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> 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.
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 8/8] btrfs: skip tests that exercise compression property when using nodatasum
2025-02-12 17:01 ` [PATCH 8/8] btrfs: skip tests that exercise compression property when using nodatasum fdmanana
@ 2025-02-12 23:21 ` David Sterba
0 siblings, 0 replies; 31+ messages in thread
From: David Sterba @ 2025-02-12 23:21 UTC (permalink / raw)
To: fdmanana; +Cc: fstests, linux-btrfs, Filipe Manana
On Wed, Feb 12, 2025 at 05:01:56PM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> 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.
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum
2025-02-12 17:01 [PATCH 0/8] fstests: btrfs: fix test failure when running with compression or nodatasum fdmanana
` (7 preceding siblings ...)
2025-02-12 17:01 ` [PATCH 8/8] btrfs: skip tests that exercise compression property when using nodatasum fdmanana
@ 2025-02-12 23:34 ` fdmanana
2025-02-12 23:34 ` [PATCH v2 1/8] btrfs: skip tests incompatible with compression when compression is enabled fdmanana
` (9 more replies)
8 siblings, 10 replies; 31+ messages in thread
From: fdmanana @ 2025-02-12 23:34 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
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(-)
--
2.45.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH v2 1/8] btrfs: skip tests incompatible with compression when compression is enabled
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
@ 2025-02-12 23:34 ` fdmanana
2025-02-12 23:35 ` [PATCH v2 2/8] btrfs/290: skip test if we are running with nodatacow mount option fdmanana
` (8 subsequent siblings)
9 siblings, 0 replies; 31+ messages in thread
From: fdmanana @ 2025-02-12 23:34 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana, Johannes Thumshirn
From: Filipe Manana <fdmanana@suse.com>
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.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
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(-)
diff --git a/tests/btrfs/215 b/tests/btrfs/215
index b63ebff6..2418cc90 100755
--- a/tests/btrfs/215
+++ b/tests/btrfs/215
@@ -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
diff --git a/tests/btrfs/265 b/tests/btrfs/265
index 0fa55a7f..5640e714 100755
--- a/tests/btrfs/265
+++ b/tests/btrfs/265
@@ -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.
diff --git a/tests/btrfs/266 b/tests/btrfs/266
index 0788ba94..681cefda 100755
--- a/tests/btrfs/266
+++ b/tests/btrfs/266
@@ -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.
diff --git a/tests/btrfs/267 b/tests/btrfs/267
index 151ccdae..ceba974d 100755
--- a/tests/btrfs/267
+++ b/tests/btrfs/267
@@ -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.
diff --git a/tests/btrfs/268 b/tests/btrfs/268
index dce5cb95..99e1ee4a 100755
--- a/tests/btrfs/268
+++ b/tests/btrfs/268
@@ -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"
diff --git a/tests/btrfs/269 b/tests/btrfs/269
index 129a4a41..183aeb73 100755
--- a/tests/btrfs/269
+++ b/tests/btrfs/269
@@ -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
diff --git a/tests/btrfs/289 b/tests/btrfs/289
index 86e91021..b340b97d 100755
--- a/tests/btrfs/289
+++ b/tests/btrfs/289
@@ -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
diff --git a/tests/btrfs/297 b/tests/btrfs/297
index eb4f365e..1f3f7c08 100755
--- a/tests/btrfs/297
+++ b/tests/btrfs/297
@@ -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"
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH v2 2/8] btrfs/290: skip test if we are running with nodatacow mount option
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
2025-02-12 23:34 ` [PATCH v2 1/8] btrfs: skip tests incompatible with compression when compression is enabled fdmanana
@ 2025-02-12 23:35 ` fdmanana
2025-02-12 23:35 ` [PATCH v2 3/8] common/btrfs: add a _require_btrfs_no_nodatasum helper fdmanana
` (7 subsequent siblings)
9 siblings, 0 replies; 31+ messages in thread
From: fdmanana @ 2025-02-12 23:35 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana, Johannes Thumshirn
From: Filipe Manana <fdmanana@suse.com>
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.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
tests/btrfs/290 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/btrfs/290 b/tests/btrfs/290
index 1a5e267b..04563dfe 100755
--- a/tests/btrfs/290
+++ b/tests/btrfs/290
@@ -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() {
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH v2 3/8] common/btrfs: add a _require_btrfs_no_nodatasum helper
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
2025-02-12 23:34 ` [PATCH v2 1/8] btrfs: skip tests incompatible with compression when compression is enabled fdmanana
2025-02-12 23:35 ` [PATCH v2 2/8] btrfs/290: skip test if we are running with nodatacow mount option fdmanana
@ 2025-02-12 23:35 ` fdmanana
2025-02-12 23:35 ` [PATCH v2 4/8] btrfs/333: skip the test when running with nodatacow or nodatasum fdmanana
` (6 subsequent siblings)
9 siblings, 0 replies; 31+ messages in thread
From: fdmanana @ 2025-02-12 23:35 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana, Johannes Thumshirn
From: Filipe Manana <fdmanana@suse.com>
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.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
common/btrfs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/common/btrfs b/common/btrfs
index 5d69ddd8..a3b9c12f 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -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
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH v2 4/8] btrfs/333: skip the test when running with nodatacow or nodatasum
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
` (2 preceding siblings ...)
2025-02-12 23:35 ` [PATCH v2 3/8] common/btrfs: add a _require_btrfs_no_nodatasum helper fdmanana
@ 2025-02-12 23:35 ` fdmanana
2025-02-12 23:35 ` [PATCH v2 5/8] btrfs/205: skip test when running with nodatasum mount option fdmanana
` (5 subsequent siblings)
9 siblings, 0 replies; 31+ messages in thread
From: fdmanana @ 2025-02-12 23:35 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana, Johannes Thumshirn
From: Filipe Manana <fdmanana@suse.com>
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.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
tests/btrfs/333 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/btrfs/333 b/tests/btrfs/333
index 14cecdbc..6214d7c5 100755
--- a/tests/btrfs/333
+++ b/tests/btrfs/333
@@ -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()
{
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH v2 5/8] btrfs/205: skip test when running with nodatasum mount option
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
` (3 preceding siblings ...)
2025-02-12 23:35 ` [PATCH v2 4/8] btrfs/333: skip the test when running with nodatacow or nodatasum fdmanana
@ 2025-02-12 23:35 ` fdmanana
2025-02-13 9:40 ` Johannes Thumshirn
2025-02-12 23:35 ` [PATCH v2 6/8] btrfs: skip tests exercising data corruption and repair when using nodatasum fdmanana
` (4 subsequent siblings)
9 siblings, 1 reply; 31+ messages in thread
From: fdmanana @ 2025-02-12 23:35 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
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.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
tests/btrfs/205 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/btrfs/205 b/tests/btrfs/205
index 13a1df8b..a557ab14 100755
--- a/tests/btrfs/205
+++ b/tests/btrfs/205
@@ -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()
{
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH v2 6/8] btrfs: skip tests exercising data corruption and repair when using nodatasum
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
` (4 preceding siblings ...)
2025-02-12 23:35 ` [PATCH v2 5/8] btrfs/205: skip test when running with nodatasum mount option fdmanana
@ 2025-02-12 23:35 ` fdmanana
2025-02-13 9:40 ` Johannes Thumshirn
2025-02-12 23:35 ` [PATCH v2 7/8] btrfs/281: skip test when running with nodatasum mount option fdmanana
` (3 subsequent siblings)
9 siblings, 1 reply; 31+ messages in thread
From: fdmanana @ 2025-02-12 23:35 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
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.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
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(-)
diff --git a/tests/btrfs/140 b/tests/btrfs/140
index b2c8451d..cb70f967 100755
--- a/tests/btrfs/140
+++ b/tests/btrfs/140
@@ -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
diff --git a/tests/btrfs/141 b/tests/btrfs/141
index 3d48dff3..4afd3304 100755
--- a/tests/btrfs/141
+++ b/tests/btrfs/141
@@ -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
diff --git a/tests/btrfs/157 b/tests/btrfs/157
index c49229f0..00393fc8 100755
--- a/tests/btrfs/157
+++ b/tests/btrfs/157
@@ -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
diff --git a/tests/btrfs/158 b/tests/btrfs/158
index ff28defe..87d16cdf 100755
--- a/tests/btrfs/158
+++ b/tests/btrfs/158
@@ -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
diff --git a/tests/btrfs/215 b/tests/btrfs/215
index 2418cc90..bd82fb79 100755
--- a/tests/btrfs/215
+++ b/tests/btrfs/215
@@ -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
diff --git a/tests/btrfs/265 b/tests/btrfs/265
index 5640e714..823d4d96 100755
--- a/tests/btrfs/265
+++ b/tests/btrfs/265
@@ -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}"
diff --git a/tests/btrfs/266 b/tests/btrfs/266
index 681cefda..bffcec27 100755
--- a/tests/btrfs/266
+++ b/tests/btrfs/266
@@ -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
diff --git a/tests/btrfs/267 b/tests/btrfs/267
index ceba974d..b4ea3106 100755
--- a/tests/btrfs/267
+++ b/tests/btrfs/267
@@ -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}"
diff --git a/tests/btrfs/268 b/tests/btrfs/268
index 99e1ee4a..7681b1a5 100755
--- a/tests/btrfs/268
+++ b/tests/btrfs/268
@@ -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
diff --git a/tests/btrfs/269 b/tests/btrfs/269
index 183aeb73..c048da44 100755
--- a/tests/btrfs/269
+++ b/tests/btrfs/269
@@ -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.
diff --git a/tests/btrfs/289 b/tests/btrfs/289
index b340b97d..1e8336a7 100755
--- a/tests/btrfs/289
+++ b/tests/btrfs/289
@@ -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
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH v2 7/8] btrfs/281: skip test when running with nodatasum mount option
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
` (5 preceding siblings ...)
2025-02-12 23:35 ` [PATCH v2 6/8] btrfs: skip tests exercising data corruption and repair when using nodatasum fdmanana
@ 2025-02-12 23:35 ` fdmanana
2025-02-13 9:41 ` Johannes Thumshirn
2025-02-12 23:35 ` [PATCH v2 8/8] btrfs: skip tests that exercise compression property when using nodatasum fdmanana
` (2 subsequent siblings)
9 siblings, 1 reply; 31+ messages in thread
From: fdmanana @ 2025-02-12 23:35 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana, David Sterba
From: Filipe Manana <fdmanana@suse.com>
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: David Sterba <dsterba@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
tests/btrfs/281 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/btrfs/281 b/tests/btrfs/281
index 855dd824..8fb7158a 100755
--- a/tests/btrfs/281
+++ b/tests/btrfs/281
@@ -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"
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH v2 8/8] btrfs: skip tests that exercise compression property when using nodatasum
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
` (6 preceding siblings ...)
2025-02-12 23:35 ` [PATCH v2 7/8] btrfs/281: skip test when running with nodatasum mount option fdmanana
@ 2025-02-12 23:35 ` fdmanana
2025-02-13 9:41 ` Johannes Thumshirn
2025-02-13 9:02 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum Qu Wenruo
2025-02-14 9:29 ` Anand Jain
9 siblings, 1 reply; 31+ messages in thread
From: fdmanana @ 2025-02-12 23:35 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana, David Sterba
From: Filipe Manana <fdmanana@suse.com>
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.
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
tests/btrfs/048 | 3 +++
tests/btrfs/059 | 3 +++
2 files changed, 6 insertions(+)
diff --git a/tests/btrfs/048 b/tests/btrfs/048
index a38c3951..3676debe 100755
--- a/tests/btrfs/048
+++ b/tests/btrfs/048
@@ -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
diff --git a/tests/btrfs/059 b/tests/btrfs/059
index 227ebb14..3da6a5a9 100755
--- a/tests/btrfs/059
+++ b/tests/btrfs/059
@@ -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
--
2.45.2
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
` (7 preceding siblings ...)
2025-02-12 23:35 ` [PATCH v2 8/8] btrfs: skip tests that exercise compression property when using nodatasum fdmanana
@ 2025-02-13 9:02 ` Qu Wenruo
2025-02-14 9:29 ` Anand Jain
9 siblings, 0 replies; 31+ messages in thread
From: Qu Wenruo @ 2025-02-13 9:02 UTC (permalink / raw)
To: fdmanana, fstests; +Cc: linux-btrfs, Filipe Manana
在 2025/2/13 10:04, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
>
> 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.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
>
> 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(-)
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v2 5/8] btrfs/205: skip test when running with nodatasum mount option
2025-02-12 23:35 ` [PATCH v2 5/8] btrfs/205: skip test when running with nodatasum mount option fdmanana
@ 2025-02-13 9:40 ` Johannes Thumshirn
0 siblings, 0 replies; 31+ messages in thread
From: Johannes Thumshirn @ 2025-02-13 9:40 UTC (permalink / raw)
To: fdmanana@kernel.org, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Filipe Manana
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v2 6/8] btrfs: skip tests exercising data corruption and repair when using nodatasum
2025-02-12 23:35 ` [PATCH v2 6/8] btrfs: skip tests exercising data corruption and repair when using nodatasum fdmanana
@ 2025-02-13 9:40 ` Johannes Thumshirn
0 siblings, 0 replies; 31+ messages in thread
From: Johannes Thumshirn @ 2025-02-13 9:40 UTC (permalink / raw)
To: fdmanana@kernel.org, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Filipe Manana
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v2 7/8] btrfs/281: skip test when running with nodatasum mount option
2025-02-12 23:35 ` [PATCH v2 7/8] btrfs/281: skip test when running with nodatasum mount option fdmanana
@ 2025-02-13 9:41 ` Johannes Thumshirn
0 siblings, 0 replies; 31+ messages in thread
From: Johannes Thumshirn @ 2025-02-13 9:41 UTC (permalink / raw)
To: fdmanana@kernel.org, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Filipe Manana, David Sterba
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v2 8/8] btrfs: skip tests that exercise compression property when using nodatasum
2025-02-12 23:35 ` [PATCH v2 8/8] btrfs: skip tests that exercise compression property when using nodatasum fdmanana
@ 2025-02-13 9:41 ` Johannes Thumshirn
0 siblings, 0 replies; 31+ messages in thread
From: Johannes Thumshirn @ 2025-02-13 9:41 UTC (permalink / raw)
To: fdmanana@kernel.org, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Filipe Manana, David Sterba
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
` (8 preceding siblings ...)
2025-02-13 9:02 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum Qu Wenruo
@ 2025-02-14 9:29 ` Anand Jain
9 siblings, 0 replies; 31+ messages in thread
From: Anand Jain @ 2025-02-14 9:29 UTC (permalink / raw)
To: fdmanana, fstests; +Cc: linux-btrfs, Filipe Manana
On 13/2/25 07:34, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> 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.
>
Looks good. Thx.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Merged.
-Anand
> 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(-)
>
^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2025-02-14 9:29 UTC | newest]
Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12 17:01 [PATCH 0/8] fstests: btrfs: fix test failure when running with compression or nodatasum fdmanana
2025-02-12 17:01 ` [PATCH 1/8] btrfs: skip tests incompatible with compression when compression is enabled fdmanana
2025-02-12 17:16 ` Johannes Thumshirn
2025-02-12 17:01 ` [PATCH 2/8] btrfs/290: skip test if we are running with nodatacow mount option fdmanana
2025-02-12 17:19 ` Johannes Thumshirn
2025-02-12 17:01 ` [PATCH 3/8] common/btrfs: add a _require_btrfs_no_nodatasum helper fdmanana
2025-02-12 17:20 ` Johannes Thumshirn
2025-02-12 17:01 ` [PATCH 4/8] btrfs/333: skip the test when running with nodatacow or nodatasum fdmanana
2025-02-12 17:21 ` Johannes Thumshirn
2025-02-12 17:01 ` [PATCH 5/8] btrfs/205: avoid test failure when running with nodatasum mount option fdmanana
2025-02-12 23:20 ` David Sterba
2025-02-12 17:01 ` [PATCH 6/8] btrfs: skip tests exercising data corruption and repair when using nodatasum fdmanana
2025-02-12 17:01 ` [PATCH 7/8] btrfs/281: skip test when running with nodatasum mount option fdmanana
2025-02-12 23:21 ` David Sterba
2025-02-12 17:01 ` [PATCH 8/8] btrfs: skip tests that exercise compression property when using nodatasum fdmanana
2025-02-12 23:21 ` David Sterba
2025-02-12 23:34 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum fdmanana
2025-02-12 23:34 ` [PATCH v2 1/8] btrfs: skip tests incompatible with compression when compression is enabled fdmanana
2025-02-12 23:35 ` [PATCH v2 2/8] btrfs/290: skip test if we are running with nodatacow mount option fdmanana
2025-02-12 23:35 ` [PATCH v2 3/8] common/btrfs: add a _require_btrfs_no_nodatasum helper fdmanana
2025-02-12 23:35 ` [PATCH v2 4/8] btrfs/333: skip the test when running with nodatacow or nodatasum fdmanana
2025-02-12 23:35 ` [PATCH v2 5/8] btrfs/205: skip test when running with nodatasum mount option fdmanana
2025-02-13 9:40 ` Johannes Thumshirn
2025-02-12 23:35 ` [PATCH v2 6/8] btrfs: skip tests exercising data corruption and repair when using nodatasum fdmanana
2025-02-13 9:40 ` Johannes Thumshirn
2025-02-12 23:35 ` [PATCH v2 7/8] btrfs/281: skip test when running with nodatasum mount option fdmanana
2025-02-13 9:41 ` Johannes Thumshirn
2025-02-12 23:35 ` [PATCH v2 8/8] btrfs: skip tests that exercise compression property when using nodatasum fdmanana
2025-02-13 9:41 ` Johannes Thumshirn
2025-02-13 9:02 ` [PATCH v2 0/8] fstests: btrfs: fix test failures when running with compression or nodatasum Qu Wenruo
2025-02-14 9:29 ` Anand Jain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox