mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-17 10:16:53 +00:00
Rename the options so they more accurately reflect what the command is actually doing. The feature is enabled/disabled in the end but it's not a simple on/off like for others, the conversion takes time. Signed-off-by: David Sterba <dsterba@suse.com>
26 lines
984 B
Bash
Executable File
26 lines
984 B
Bash
Executable File
#!/bin/bash
|
|
# Test back and forth conversion from extent tree to block-group-tree
|
|
|
|
source "$TEST_TOP/common" || exit
|
|
|
|
setup_root_helper
|
|
prepare_test_dev
|
|
|
|
run_check_mkfs_test_dev -O ^block-group-tree
|
|
run_check_mount_test_dev
|
|
run_check $SUDO_HELPER dd if=/dev/zero of="$TEST_MNT"/file bs=1M count=1
|
|
run_check_umount_test_dev
|
|
|
|
run_check "$TOP/btrfs" inspect-internal dump-tree "$TEST_DEV"
|
|
run_check "$TOP/btrfs" inspect-internal dump-super "$TEST_DEV"
|
|
run_check "$TOP/btrfstune" --convert-to-block-group-tree "$TEST_DEV"
|
|
_log "=== AFTER CONVERSION ==="
|
|
run_check "$TOP/btrfs" inspect-internal dump-tree "$TEST_DEV"
|
|
run_check "$TOP/btrfs" inspect-internal dump-super "$TEST_DEV"
|
|
run_check "$TOP/btrfs" check "$TEST_DEV"
|
|
_log "=== BACK CONVERSION ==="
|
|
run_check "$TOP/btrfstune" --convert-from-block-group-tree "$TEST_DEV"
|
|
run_check "$TOP/btrfs" inspect-internal dump-tree "$TEST_DEV"
|
|
run_check "$TOP/btrfs" inspect-internal dump-super "$TEST_DEV"
|
|
run_check "$TOP/btrfs" check "$TEST_DEV"
|