Several test cases fail when running with MOUNT_OPTIONS="-o nodatacow"
because they attempt to use compression and compression can not be
enabled on nodatacow files (it fails with -EINVAL). So make sure those
tests are 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>
# real QA test starts here
_supported_fs btrfs
_require_scratch
+_require_btrfs_no_nodatacow
__workout()
{
_require_scratch
_require_btrfs_command "property"
_require_btrfs_command inspect-internal dump-super
+_require_btrfs_no_nodatacow
send_files_dir=$TEST_DIR/btrfs-test-$seq
_require_test
_require_scratch
_require_btrfs_command "property"
+_require_btrfs_no_nodatacow
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
_supported_fs btrfs
_require_scratch
_require_btrfs_command property
+_require_btrfs_no_nodatacow
algos=($(_btrfs_compression_algos))
_supported_fs btrfs
_require_scratch
_require_odirect
+_require_btrfs_no_nodatacow
_require_chattr c
_scratch_mkfs >>$seqres.full 2>&1
_require_btrfs_send_v2
_require_xfs_io_command "fiemap"
_require_fssum
+_require_btrfs_no_nodatacow
_fixed_by_kernel_commit a11452a3709e \
"btrfs: send: avoid unaligned encoded writes when attempting to clone range"