[Patch 0/2] [F/I linux-azure] Xfstest failure with sparse_super2 mount option
Tim Gardner
tim.gardner at canonical.com
Mon Apr 25 14:12:58 UTC 2022
BugLink: https://bugs.launchpad.net/bugs/1970223
SRU Justification
[Impact]
Microsoft has detected an Xfstest failure scenario. There might be fs corruption
when resizing ext4 filesystems mounted with sparse_super2 option enabled.
Fix: commit b1489186cc8391e0c1e342f9fbc3eedf6b944c61 ("ext4: add check to
prevent attempting to resize an fs with sparse_super2")
[Test Case]
mkfs.ext4 -b 4096 -I 256 -J size=32 -E resize=$((256*1024*1024)) -O sparse_super2 ext4.img 65M truncate -s 30G ext4.img
mount ext4.img /mnt
python3 -c 'import fcntl, os, struct ; fd = os.open("/mnt", os.O_RDONLY | os.O_DIRECTORY) ; fcntl.ioctl(fd, 0x40086610, struct.pack("Q", 30 * 1024 * 1024 * 1024 // 4096), False) ; os.close(fd)'
dmesg | tail
e2fsck ext4.img
[Where things could go wrong]
The file system may erroneously not mount.
[Other Info]
SF: #00334996
More information about the kernel-team
mailing list