2015-11-19 15:37:15 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# iterate over nodesize and sectorsize combinations
|
|
|
|
|
2018-02-08 06:34:19 +00:00
|
|
|
source "$TEST_TOP/common"
|
2015-11-19 15:37:15 +00:00
|
|
|
|
|
|
|
check_prereq mkfs.btrfs
|
|
|
|
check_prereq btrfs
|
2016-01-12 14:16:11 +00:00
|
|
|
|
2015-11-19 15:37:15 +00:00
|
|
|
setup_root_helper
|
|
|
|
prepare_test_dev
|
|
|
|
|
|
|
|
test_mkfs_single()
|
|
|
|
{
|
2019-06-05 17:09:38 +00:00
|
|
|
run_check_mkfs_test_dev "$@"
|
2018-03-23 15:34:30 +00:00
|
|
|
run_check $SUDO_HELPER "$TOP/btrfs" inspect-internal dump-super "$TEST_DEV"
|
|
|
|
run_check $SUDO_HELPER "$TOP/btrfs" check "$TEST_DEV"
|
2015-11-19 15:37:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# default
|
|
|
|
test_mkfs_single
|
|
|
|
|
|
|
|
# nodesize >= sectorsize
|
|
|
|
for nodesize in 4096 8192 16384 32768 65536; do
|
|
|
|
for sectorsize in 4096 8192 16384 32768 65536; do
|
2018-03-23 15:34:30 +00:00
|
|
|
[ "$nodesize" -lt "$sectorsize" ] && continue
|
|
|
|
test_mkfs_single -n "$nodesize" -s "$sectorsize" -d single -m single
|
|
|
|
test_mkfs_single -n "$nodesize" -s "$sectorsize" -d single -m dup
|
2015-11-19 15:37:15 +00:00
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
# nodesize, mixed mode
|
|
|
|
for nodesize in 4k 8k 16k 32k 64k; do
|
2018-03-23 15:34:30 +00:00
|
|
|
test_mkfs_single -n "$nodesize" -s "$nodesize" -d single -m single --mixed
|
|
|
|
test_mkfs_single -n "$nodesize" -s "$nodesize" -d dup -m dup --mixed
|
2015-11-19 15:37:15 +00:00
|
|
|
done
|