@@ -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
@@ -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.
@@ -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.
@@ -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.
@@ -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"
@@ -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
@@ -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
@@ -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"