diff options
author | Filipe Manana <fdmanana@suse.com> | 2024-02-01 18:03:49 +0000 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2024-03-01 19:24:16 +0800 |
commit | d9d267ada5a0daf9a607382e934be97f22d825c5 (patch) | |
tree | 3243ebaca5c86287662f2992e8461112c18bf808 | |
parent | 45d779c9d241bdc1cb1d2761fe23f55251c09dde (diff) | |
download | xfstests-dev-d9d267ada5a0daf9a607382e934be97f22d825c5.tar.gz |
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 <fdmanana@suse.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-x | tests/btrfs/299 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/btrfs/299 b/tests/btrfs/299 index c4b1c7c544..d38bf2ac1c 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" |