Skip to content

Commit 1628b2f

Browse files
adam900710kdave
authored andcommitted
btrfs-progs: tests: convert: add a test case to check the csum for the image file
The new test case would create an empty ext4 with 64K block size, which can lead to a new data chunk which is no longer 1:1 mapped. Then convert the fs and verify it with --check-data-csum to make sure the image file is fine. Reviewed-by: Anand Jain <[email protected]> Signed-off-by: Qu Wenruo <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent bbc164f commit 1628b2f

File tree

1 file changed

+16
-0
lines changed
  • tests/convert-tests/023-64k-blocksize-migrated

1 file changed

+16
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Make sure the migrated range doesn't cause csum errors
3+
4+
source "$TEST_TOP/common" || exit
5+
source "$TEST_TOP/common.convert" || exit
6+
7+
setup_root_helper
8+
prepare_test_dev 10G
9+
10+
check_global_prereq mkfs.ext4
11+
check_prereq btrfs-convert
12+
check_prereq btrfs
13+
14+
run_check mkfs.ext4 -b 64K -F "$TEST_DEV"
15+
run_check $SUDO_HELPER "$TOP/btrfs-convert" --nodesize 64K "$TEST_DEV"
16+
run_check $SUDO_HELPER "$TOP/btrfs" check --check-data-csum "$TEST_DEV"

0 commit comments

Comments
 (0)