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

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 <>
1 file changed