[PATCH 0/8] Some fixes and cleanup to mballoc

From: Kemeng Shi
Date: Tue Mar 21 2023 - 04:09:40 EST


We use cluster unit and block unit for different structure members. For
example, in struct ext4_prealloc_space, pa_lstart and pa_pstart are in
block unit while pa_len and pa_free are in cluster unit; in struct
ext4_free_extent, fe_logical is in block unit while fe_start and fe_len
are in cluster unit. The first five patches fix wrong unit use in
mballoc.
The rest is random bugfix and cleanup to mballoc, More details can be
found in respective patches.
Besides, "kvm-xfstest smoke" passes all test.
Thanks!

Kemeng Shi (8):
ext4: fix wrong unit use in ext4_mb_normalize_request
ext4: fix unit mismatch in ext4_mb_new_blocks_simple
ext4: fix wrong unit use in ext4_mb_new_inode_pa
ext4: fix wrong unit use in ext4_mb_find_by_goal
ext4: treat stripe in block unit
ext4: add EXT4_MB_HINT_GOAL_ONLY test in ext4_mb_use_preallocated
ext4: remove ext4_block_group and ext4_block_group_offset declaration
ext4: try all groups in ext4_mb_new_blocks_simple

fs/ext4/ext4.h | 4 ---
fs/ext4/mballoc.c | 75 +++++++++++++++++++++++++++++++++++------------
fs/ext4/super.c | 13 ++++++++
3 files changed, 70 insertions(+), 22 deletions(-)

--
2.30.0