mbox series

[00/10] A few fixes and cleanups to mballoc

Message ID 20230721171007.2065423-1-shikemeng@huaweicloud.com
Headers show
Series A few fixes and cleanups to mballoc | expand

Message

Kemeng Shi July 21, 2023, 5:09 p.m. UTC
Hi all, this series contains some random fixes and cleanups to mballoc
which include correct grp validation, fix data overflow and so on.
More details can be found in respective patches.
Besides, 'kvm-xfstest smoke' runs successfully without error.

Thanks!

Kemeng Shi (10):
  ext4: correct grp validation in ext4_mb_good_group
  ext4: avoid potential data overflow in next_linear_group
  ext4: return found group directly in
    ext4_mb_choose_next_group_p2_aligned
  ext4: use is_power_of_2 helper in ext4_mb_regular_allocator
  ext4: remove unnecessary return for void function
  ext4: replace the traditional ternary conditional operator with with
    max()/min()
  ext4: remove unused ext4_{set}/{clear}_bit_atomic
  ext4: return found group directly in
    ext4_mb_choose_next_group_goal_fast
  ext4: return found group directly in
    ext4_mb_choose_next_group_best_avail
  ext4: correct some stale comment of criteria

 fs/ext4/ext4.h    |  2 --
 fs/ext4/mballoc.c | 85 ++++++++++++++++++-----------------------------
 2 files changed, 32 insertions(+), 55 deletions(-)

Comments

Ritesh Harjani (IBM) July 21, 2023, 3:55 p.m. UTC | #1
Kemeng Shi <shikemeng@huaweicloud.com> writes:

> Hi all, this series contains some random fixes and cleanups to mballoc
> which include correct grp validation, fix data overflow and so on.
> More details can be found in respective patches.
> Besides, 'kvm-xfstest smoke' runs successfully without error.

Thanks Kemeng for the cleanup series. Looks good to me with few minor
nits which I have commented in individual patches.

Note that I couldn't cleanly apply the series on ted's dev branch
(Patch-05 gave some minor conflict). Maybe you might have based your
changes on top of linux master or something. Anyways it was just a minor
conflict and I don't know what is Ted's general preference here, but I
thought of doing an FYI - 

-ritesh


>
> Thanks!
>
> Kemeng Shi (10):
>   ext4: correct grp validation in ext4_mb_good_group
>   ext4: avoid potential data overflow in next_linear_group
>   ext4: return found group directly in
>     ext4_mb_choose_next_group_p2_aligned
>   ext4: use is_power_of_2 helper in ext4_mb_regular_allocator
>   ext4: remove unnecessary return for void function
>   ext4: replace the traditional ternary conditional operator with with
>     max()/min()
>   ext4: remove unused ext4_{set}/{clear}_bit_atomic
>   ext4: return found group directly in
>     ext4_mb_choose_next_group_goal_fast
>   ext4: return found group directly in
>     ext4_mb_choose_next_group_best_avail
>   ext4: correct some stale comment of criteria
>
>  fs/ext4/ext4.h    |  2 --
>  fs/ext4/mballoc.c | 85 ++++++++++++++++++-----------------------------
>  2 files changed, 32 insertions(+), 55 deletions(-)
>
> -- 
> 2.30.0
Kemeng Shi July 25, 2023, 2:09 a.m. UTC | #2
on 7/21/2023 11:55 PM, Ritesh Harjani wrote:
> Kemeng Shi <shikemeng@huaweicloud.com> writes:
> 
>> Hi all, this series contains some random fixes and cleanups to mballoc
>> which include correct grp validation, fix data overflow and so on.
>> More details can be found in respective patches.
>> Besides, 'kvm-xfstest smoke' runs successfully without error.
> 
> Thanks Kemeng for the cleanup series. Looks good to me with few minor
> nits which I have commented in individual patches.
> 
Hi Ritesh, thanks for the review and comments. I went through all your
suggestions and they help a lot. I will send v2 patchset to handle these.
> Note that I couldn't cleanly apply the series on ted's dev branch
> (Patch-05 gave some minor conflict). Maybe you might have based your
> changes on top of linux master or something. Anyways it was just a minor
> conflict and I don't know what is Ted's general preference here, but I
> thought of doing an FYI - 
Sorry for the conflict, this patchset is based on cleanup patchset [1]
which you have noticed. As [1] still needs a lot more review, I will
make this patchset based on current dev branch.

Thanks!

[1] https://lore.kernel.org/linux-ext4/20230629144007.1263510-1-shikemeng@huaweicloud.com/T/#m66729346a76498079278df3e132a89910860f8ff