diff options
authorQu Wenruo <>2016-06-01 09:51:21 +0800
committerDavid Sterba <>2016-06-01 15:37:23 +0200
commitbb3c2ea224ea4e3caa35c3e63187a48e2f9dfe18 (patch)
parent205bd5edbea4be51fe366e1e7588a88b7cead1b7 (diff)
btrfs-progs: convert-tests: Add test for backup superblock migration
New convert framework uses new and simpler chunk layout, while the cost is the more complex superblock range migration logical, compared to old convert. Enhance the convert test script to create file which will takes up 2nd backup superblock space, to ensure the superblock migration is working as expected. Suggested-by: David Sterba <> Signed-off-by: Qu Wenruo <> Signed-off-by: David Sterba <>
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ b/tests/
index 94285170..94477b47 100755
--- a/tests/
+++ b/tests/
@@ -124,6 +124,12 @@ convert_test() {
# create a file to check btrfs-convert can convert regular file
# correct
+ # create a file inside the fs before convert, to make sure there is
+ # data covering btrfs backup superblock range (64M)
+ run_check $SUDO_HELPER dd if=/dev/zero bs=1M count=64 \
+ of=$TEST_MNT/convert_space_holder
run_check $SUDO_HELPER dd if=/dev/zero of=$TEST_MNT/test bs=$nodesize \
count=1 >/dev/null 2>&1