2 # test if btrfs-convert creates a filesystem without leaf crossing stripes
4 source "$TEST_TOP/common"
6 check_prereq btrfs-convert
9 # In my test, it happened in 514M~560M, 737M~769M, 929M~917M,
10 # and HAVE_ERROR=((size + 1) / 2) % 2 if size >= 970
15 for ((size = SIZE_FROM; size <= SIZE_END; size += A_PRIME_NUM)); do
16 run_check truncate -s "$size"M "$IMAGE"
17 run_check mkfs.ext4 -F "$IMAGE"
18 run_check "$TOP/btrfs-convert" "$IMAGE"
19 run_check_stdout "$TOP/btrfs" check "$IMAGE" 2>&1 |
20 grep -q "crossing stripe boundary" &&
21 _fail "leaf crossing stripes after btrfs-convert"
24 # grep will expectedly fail