From: Filipe Manana Date: Thu, 1 Feb 2024 18:03:49 +0000 (+0000) Subject: btrfs/299: skip test if we were mounted with nodatacow X-Git-Tag: xfs-zoned-2024-06-07~145 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d9d267ada5a0daf9a607382e934be97f22d825c5;p=users%2Fhch%2Fxfstests-dev.git btrfs/299: skip test if we were mounted with nodatacow The test requires the ability to create an inline extent in a file with a prealloced extent, created with fallocate's FALLOC_FL_KEEP_SIZE mode, which can only happen when COW is enabled. If the test is run with MOUNT_OPTIONS="-o nodatacow", then COW never happens as all writes end up using the preallocated extent. This results in the logical-resolve command to return one file path when it should return none, since the base logical address of the prealloc extent is still in use unless COW happens. So make the test not run if nodatacow is specified in MOUNT_OPTIONS. Signed-off-by: Filipe Manana Reviewed-by: David Disseldorp Signed-off-by: Zorro Lang --- diff --git a/tests/btrfs/299 b/tests/btrfs/299 index c4b1c7c54..d38bf2ac1 100755 --- a/tests/btrfs/299 +++ b/tests/btrfs/299 @@ -23,6 +23,9 @@ _supported_fs btrfs _require_scratch _require_xfs_io_command "falloc" "-k" _require_btrfs_command inspect-internal logical-resolve +# Can't run with nodatacow because we need to be able to create an inline extent +# in a range with a prealloc extent, which can only happen with COW enabled. +_require_btrfs_no_nodatacow _fixed_by_kernel_commit 560840afc3e6 \ "btrfs: fix resolving backrefs for inline extent followed by prealloc"