ext4/033: test EXT4_IOC_RESIZE_FS by calling the ioctl directly
E2fsprogs commits
4ea80d031c7e ("resize2fs: adjust new size of the
file system to allow a successful resize") and
50088b1996cc
("resize2fs: attempt to keep the # of inodes valid by removing the
last bg") will automatically reduce the requested new size of the file
system by up to a single block group to avoid overflowing the 32-bit
inode count. This interferes with ext4/033's test of kernel commit
4f2f76f75143 ("ext4: Forbid overflowing inode count when # resizing".)
Address this by creating a new test program, ext4_resize which calls
the EXT4_IOC_RESIZE_FS ioctl directly so we can correctly test the
kernel's online resize code.
Reported-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>