diff --git a/tests/btrfs/189 b/tests/btrfs/189 index 5f736d73..7b6a1708 100755 --- a/tests/btrfs/189 +++ b/tests/btrfs/189 @@ -59,20 +59,22 @@ $BTRFS_UTIL_PROG send -f $send_files_dir/1.snap $SCRATCH_MNT/base 2>&1 \ # Clone part of the extent from a higher offset to a lower offset of the same # file. -$XFS_IO_PROG -c "reflink $SCRATCH_MNT/bar 1560K 500K 100K" $SCRATCH_MNT/bar \ +$XFS_IO_PROG -c "reflink $SCRATCH_MNT/bar 1600K 640K 128K" $SCRATCH_MNT/bar \ | _filter_xfs_io # Now clone from the previous file, same range, into the middle of another file, # such that the end offset at the destination is smaller than the destination's # file size. -$XFS_IO_PROG -c "reflink $SCRATCH_MNT/bar 1560K 0 100K" $SCRATCH_MNT/zoo \ +$XFS_IO_PROG -c "reflink $SCRATCH_MNT/bar 1600K 0 128K" $SCRATCH_MNT/zoo \ | _filter_xfs_io # Truncate the source file of the previous clone operation to a smaller size, # which ends up in the middle of the range of previous clone operation from file # bar to file bar. We want to check this doesn't confuse send to issue invalid -# clone operations. -$XFS_IO_PROG -c "truncate 550K" $SCRATCH_MNT/bar +# clone operations. This smaller size must not be aligned to the sector size of +# the filesystem - the unaligned size is what can cause those invalid clone +# operations. +$XFS_IO_PROG -c "truncate 710K" $SCRATCH_MNT/bar $BTRFS_UTIL_PROG subvolume snapshot -r $SCRATCH_MNT $SCRATCH_MNT/incr 2>&1 \ | _filter_scratch diff --git a/tests/btrfs/189.out b/tests/btrfs/189.out index 0ae3cdce..79c70b03 100644 --- a/tests/btrfs/189.out +++ b/tests/btrfs/189.out @@ -9,9 +9,9 @@ wrote 2097152/2097152 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Create a readonly snapshot of 'SCRATCH_MNT' in 'SCRATCH_MNT/base' At subvol SCRATCH_MNT/base -linked 102400/102400 bytes at offset 512000 +linked 131072/131072 bytes at offset 655360 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -linked 102400/102400 bytes at offset 0 +linked 131072/131072 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Create a readonly snapshot of 'SCRATCH_MNT' in 'SCRATCH_MNT/incr' At subvol SCRATCH_MNT/incr