]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
btrfs/283: skip if we cannot write into one extent
authorNaohiro Aota <naohiro.aota@wdc.com>
Mon, 25 Sep 2023 05:55:41 +0000 (14:55 +0900)
committerZorro Lang <zlang@kernel.org>
Thu, 5 Oct 2023 14:32:01 +0000 (22:32 +0800)
On the zoned mode, the extent size is limited also by
queue/zone_append_max_bytes. This breaks the assumption that the file "foo"
has a single extent and corrupts the test output.

It is difficult to support the case, so let's just skip the test in this
case.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/283

index c1f6007d5398079bb744770d428dcc4e4824e97f..118df08b8958a093272f0133992f7f90f1c0967f 100755 (executable)
@@ -25,6 +25,14 @@ _require_fssum
 _wants_kernel_commit c7499a64dcf6 \
             "btrfs: send: optimize clone detection to increase extent sharing"
 
+extent_size=$(( 128 * 1024 ))
+if _scratch_btrfs_is_zoned; then
+       zone_append_max=$(cat "/sys/block/$(_short_dev $SCRATCH_DEV)/queue/zone_append_max_bytes")
+       if [[ $zone_append_max -gt 0 && $zone_append_max -lt $extent_size ]]; then
+               _notrun "zone append max $zone_append_max is smaller than wanted extent size $extent_size"
+       fi
+fi
+
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 send_stream=$send_files_dir/snap.stream
 snap_fssum=$send_files_dir/snap.fssum