]> git.ipfire.org Git - thirdparty/linux.git/commit
ext4: always allocate blocks only from groups inode can use
authorJan Kara <jack@suse.cz>
Wed, 14 Jan 2026 18:28:18 +0000 (19:28 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 20 Jan 2026 03:54:58 +0000 (22:54 -0500)
commit4865c768b563deff1b6a6384e74a62f143427b42
tree4abb219a9c020baf190e1af59c87ca261f635e34
parent94a8cea54cd935c54fa2fba70354757c0fc245e3
ext4: always allocate blocks only from groups inode can use

For filesystems with more than 2^32 blocks inodes using indirect block
based format cannot use blocks beyond the 32-bit limit.
ext4_mb_scan_groups_linear() takes care to not select these unsupported
groups for such inodes however other functions selecting groups for
allocation don't. So far this is harmless because the other selection
functions are used only with mb_optimize_scan and this is currently
disabled for inodes with indirect blocks however in the following patch
we want to enable mb_optimize_scan regardless of inode format.

Reviewed-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Pedro Falcato <pfalcato@suse.de>
Cc: stable@kernel.org
Link: https://patch.msgid.link/20260114182836.14120-3-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc.c