2020-07-20 12:51:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Check if btrfs-convert can handle an ext4 fs whose size is 64G.
|
|
|
|
# That fs size could trigger a multiply overflow and screw up free space
|
|
|
|
# calculation
|
|
|
|
|
2023-04-19 15:08:41 +00:00
|
|
|
source "$TEST_TOP/common" || exit
|
|
|
|
source "$TEST_TOP/common.convert" || exit
|
2020-07-20 12:51:09 +00:00
|
|
|
|
|
|
|
check_prereq btrfs-convert
|
|
|
|
check_global_prereq mke2fs
|
|
|
|
|
2023-04-13 18:40:23 +00:00
|
|
|
setup_root_helper
|
|
|
|
prepare_test_dev 64g
|
|
|
|
|
2020-07-20 12:51:09 +00:00
|
|
|
convert_test_prep_fs ext4 mke2fs -t ext4 -b 4096
|
|
|
|
run_check_umount_test_dev
|
|
|
|
|
|
|
|
# Unpatched btrfs-convert would fail half way due to corrupted free space
|
|
|
|
# cache tree
|
|
|
|
convert_test_do_convert
|