On Fri, Jun 03, 2016 at 10:34:26AM +0800, Qu Wenruo wrote: > New convert introduced simpler chunk/extent allocation algorithm, at the > cost of complex backup superblock migration codes. > > Use specially built ext2 images to test if btrfs-convert can convert and > rollback images without problem. > > All these special ext2 image have blocks/holes across 2nd btrfs backup > superblock. > > The naming of test image is like the following: > |<------superblock migration range----->| > 64M 64M + 64K > |-Data--|-Data--|/Hole//|-Data--|/Hole//|-Data--|--Data--| = drdhdhdrd > > These test cases should check all typical layouts and make sure new > convert works. > > Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
Applied, thanks. > + extracted=$(extract_image "$src") > + run_check $SUDO_HELPER e2fsck -n -f $extracted > + run_check $SUDO_HELPER $TOP/btrfs-convert $extracted > + run_check $SUDO_HELPER $TOP/btrfs check $extracted > + run_check $SUDO_HELPER $TOP/btrfs-show-super $extracted > + > + run_check $SUDO_HELPER mount -o loop $extracted $TEST_MNT > + run_check $SUDO_HELPER e2fsck -n -f $TEST_MNT/ext2_saved/image > + run_check $SUDO_HELPER umount $TEST_MNT > + > + run_check $SUDO_HELPER $TOP/btrfs check $extracted > + run_check $SUDO_HELPER $TOP/btrfs-convert -r $extracted > + run_check $SUDO_HELPER e2fsck -n -f $extracted Most of the SUDO_HELPER calls are not necessary, and the tests failed when run under user (on NFS where root cannot do everything), so I did some additional changes. The separate convert dir should be now ready for adding more images easily. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html