ext4: Test to ensure resize with sparse_super2 is handled correctly
Kernel currently doesn't support resize of EXT4 mounted with
sparse_super2 option enabled. Earlier, it used to leave the resize
incomplete and the fs would be left in an inconsistent state,
however commit
b1489186cc83[1] fixed this to avoid the fs corruption
by clearly returning -EOPNOTSUPP.
Test to ensure that kernel handles resizing with sparse_super2
correctly. Run resize for multiple iterations because this sometimes
leads to kernel crash due to fs corruption, which we want to detect.
Related commit in mainline:
[1] commit
b1489186cc8391e0c1e342f9fbc3eedf6b944c61
ext4: add check to prevent attempting to resize an fs with sparse_super2
Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>