2020-09-02 18:50:49 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Basic check if mkfs supports the runtime feature free-space-tree
|
|
|
|
|
2023-04-19 15:08:41 +00:00
|
|
|
source "$TEST_TOP/common" || exit
|
2020-09-02 18:50:49 +00:00
|
|
|
|
|
|
|
check_prereq mkfs.btrfs
|
|
|
|
check_prereq btrfs
|
|
|
|
|
|
|
|
setup_root_helper
|
|
|
|
prepare_test_dev
|
|
|
|
|
2023-04-14 15:48:41 +00:00
|
|
|
run_check_mkfs_test_dev -O free-space-tree
|
2020-09-02 18:50:49 +00:00
|
|
|
|
|
|
|
run_check_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal dump-super "$TEST_DEV" | \
|
|
|
|
grep -q FREE_SPACE_TREE || _fail "free space tree not created"
|
|
|
|
run_check_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal dump-super "$TEST_DEV" | \
|
|
|
|
grep -q FREE_SPACE_TREE_VALID || _fail "free space tree not valid"
|