]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ext4: avoid resizing to a partial cluster size
authorKiselev, Oleg <okiselev@amazon.com>
Wed, 20 Jul 2022 04:27:48 +0000 (04:27 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 3 Aug 2022 03:56:26 +0000 (23:56 -0400)
commit69cb8e9d8cd97cdf5e293b26d70a9dee3e35e6bd
tree4c04cf154e06fd8c06738c0bc78ce665902161d7
parent026d0d27c4882303e4b071ca6d996640cc2932c3
ext4: avoid resizing to a partial cluster size

This patch avoids an attempt to resize the filesystem to an
unaligned cluster boundary.  An online resize to a size that is not
integral to cluster size results in the last iteration attempting to
grow the fs by a negative amount, which trips a BUG_ON and leaves the fs
with a corrupted in-memory superblock.

Signed-off-by: Oleg Kiselev <okiselev@amazon.com>
Link: https://lore.kernel.org/r/0E92A0AB-4F16-4F1A-94B7-702CC6504FDE@amazon.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/resize.c