android_kernel_xiaomi_sm7250/fs/ext4
Jerry Lee 李修賢 f2180ad6a4 ext4: continue to expand file system when the target size doesn't reach
commit df3cb754d13d2cd5490db9b8d536311f8413a92e upstream.

When expanding a file system from (16TiB-2MiB) to 18TiB, the operation
exits early which leads to result inconsistency between resize2fs and
Ext4 kernel driver.

=== before ===
○ → resize2fs /dev/mapper/thin
resize2fs 1.45.5 (07-Jan-2020)
Filesystem at /dev/mapper/thin is mounted on /mnt/test; on-line resizing required
old_desc_blocks = 2048, new_desc_blocks = 2304
The filesystem on /dev/mapper/thin is now 4831837696 (4k) blocks long.

[  865.186308] EXT4-fs (dm-5): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[  912.091502] dm-4: detected capacity change from 34359738368 to 38654705664
[  970.030550] dm-5: detected capacity change from 34359734272 to 38654701568
[ 1000.012751] EXT4-fs (dm-5): resizing filesystem from 4294966784 to 4831837696 blocks
[ 1000.012878] EXT4-fs (dm-5): resized filesystem to 4294967296

=== after ===
[  129.104898] EXT4-fs (dm-5): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[  143.773630] dm-4: detected capacity change from 34359738368 to 38654705664
[  198.203246] dm-5: detected capacity change from 34359734272 to 38654701568
[  207.918603] EXT4-fs (dm-5): resizing filesystem from 4294966784 to 4831837696 blocks
[  207.918754] EXT4-fs (dm-5): resizing filesystem from 4294967296 to 4831837696 blocks
[  207.918758] EXT4-fs (dm-5): Converting file system to meta_bg
[  207.918790] EXT4-fs (dm-5): resizing filesystem from 4294967296 to 4831837696 blocks
[  221.454050] EXT4-fs (dm-5): resized to 4658298880 blocks
[  227.634613] EXT4-fs (dm-5): resized filesystem to 4831837696

Signed-off-by: Jerry Lee <jerrylee@qnap.com>
Link: https://lore.kernel.org/r/PU1PR04MB22635E739BD21150DC182AC6A18C9@PU1PR04MB2263.apcprd04.prod.outlook.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-26 13:19:42 +02:00
..
acl.c
acl.h
balloc.c
bitmap.c
block_validity.c
dir.c
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
ext4.h
extents_status.c
extents_status.h
extents.c
file.c ext4: avoid crash when inline data creation follows DIO write 2022-10-26 13:19:22 +02:00
fsmap.c
fsmap.h
fsync.c
hash.c
ialloc.c ext4: make directory inode spreading reflect flexbg size 2022-09-28 11:02:58 +02:00
indirect.c
inline.c ext4: correct max_inline_xattr_value_size computing 2022-08-25 11:15:29 +02:00
inode.c ext4: place buffer head allocation before handle start 2022-10-26 13:19:23 +02:00
ioctl.c
Kconfig
Makefile
mballoc.c
mballoc.h
migrate.c ext4: recover csum seed of tmp_inode after migrating to extents 2022-08-25 11:15:19 +02:00
mmp.c
move_extent.c
namei.c ext4: avoid remove directory when directory is corrupted 2022-08-25 11:15:44 +02:00
page-io.c
readpage.c
resize.c ext4: continue to expand file system when the target size doesn't reach 2022-10-26 13:19:42 +02:00
super.c ext4: make ext4_lazyinit_thread freezable 2022-10-26 13:19:22 +02:00
symlink.c
sysfs.c
truncate.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext4: fix use-after-free in ext4_xattr_set_entry 2022-08-25 11:15:28 +02:00
xattr.h ext4: add EXT4_INODE_HAS_XATTR_SPACE macro in xattr.h 2022-08-25 11:15:28 +02:00