[v2,2/9] ext4: remove unused parameter group in ext4_mb_choose_next_group_*()
Commit Message
Remove unused parameter group in ext4_mb_choose_next_group_*().
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Jan Kara <jack@suse.cz>
---
fs/ext4/mballoc.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Comments
On Wed, Jan 03, 2024 at 06:28:14PM +0800, Kemeng Shi wrote:
> Remove unused parameter group in ext4_mb_choose_next_group_*().
Hey Kemeng,
Just a small thing, the parameter we are removing is "ngroups" rather
than "group" so maybe fix that in the commit message.
Other than that looks good, feel free to add
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
>
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
> Reviewed-by: Jan Kara <jack@suse.cz>
> ---
> fs/ext4/mballoc.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 9f9b8dd06..765b62729 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -870,7 +870,7 @@ mb_update_avg_fragment_size(struct super_block *sb, struct ext4_group_info *grp)
> * cr level needs an update.
> */
> static void ext4_mb_choose_next_group_p2_aligned(struct ext4_allocation_context *ac,
> - enum criteria *new_cr, ext4_group_t *group, ext4_group_t ngroups)
> + enum criteria *new_cr, ext4_group_t *group)
> {
on 1/4/2024 1:57 PM, Ojaswin Mujoo wrote:
> On Wed, Jan 03, 2024 at 06:28:14PM +0800, Kemeng Shi wrote:
>> Remove unused parameter group in ext4_mb_choose_next_group_*().
>
> Hey Kemeng,
>
> Just a small thing, the parameter we are removing is "ngroups" rather
> than "group" so maybe fix that in the commit message.
>
> Other than that looks good, feel free to add
>
Thanks for let me know. I will fix it in next version.
> Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
>>
>> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
>> Reviewed-by: Jan Kara <jack@suse.cz>
>> ---
>> fs/ext4/mballoc.c | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
>> index 9f9b8dd06..765b62729 100644
>> --- a/fs/ext4/mballoc.c
>> +++ b/fs/ext4/mballoc.c
>> @@ -870,7 +870,7 @@ mb_update_avg_fragment_size(struct super_block *sb, struct ext4_group_info *grp)
>> * cr level needs an update.
>> */
>> static void ext4_mb_choose_next_group_p2_aligned(struct ext4_allocation_context *ac,
>> - enum criteria *new_cr, ext4_group_t *group, ext4_group_t ngroups)
>> + enum criteria *new_cr, ext4_group_t *group)
>> {
>
@@ -870,7 +870,7 @@ mb_update_avg_fragment_size(struct super_block *sb, struct ext4_group_info *grp)
* cr level needs an update.
*/
static void ext4_mb_choose_next_group_p2_aligned(struct ext4_allocation_context *ac,
- enum criteria *new_cr, ext4_group_t *group, ext4_group_t ngroups)
+ enum criteria *new_cr, ext4_group_t *group)
{
struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
struct ext4_group_info *iter;
@@ -944,7 +944,7 @@ ext4_mb_find_good_group_avg_frag_lists(struct ext4_allocation_context *ac, int o
* order. Updates *new_cr if cr level needs an update.
*/
static void ext4_mb_choose_next_group_goal_fast(struct ext4_allocation_context *ac,
- enum criteria *new_cr, ext4_group_t *group, ext4_group_t ngroups)
+ enum criteria *new_cr, ext4_group_t *group)
{
struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
struct ext4_group_info *grp = NULL;
@@ -989,7 +989,7 @@ static void ext4_mb_choose_next_group_goal_fast(struct ext4_allocation_context *
* much and fall to CR_GOAL_LEN_SLOW in that case.
*/
static void ext4_mb_choose_next_group_best_avail(struct ext4_allocation_context *ac,
- enum criteria *new_cr, ext4_group_t *group, ext4_group_t ngroups)
+ enum criteria *new_cr, ext4_group_t *group)
{
struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
struct ext4_group_info *grp = NULL;
@@ -1124,11 +1124,11 @@ static void ext4_mb_choose_next_group(struct ext4_allocation_context *ac,
}
if (*new_cr == CR_POWER2_ALIGNED) {
- ext4_mb_choose_next_group_p2_aligned(ac, new_cr, group, ngroups);
+ ext4_mb_choose_next_group_p2_aligned(ac, new_cr, group);
} else if (*new_cr == CR_GOAL_LEN_FAST) {
- ext4_mb_choose_next_group_goal_fast(ac, new_cr, group, ngroups);
+ ext4_mb_choose_next_group_goal_fast(ac, new_cr, group);
} else if (*new_cr == CR_BEST_AVAIL_LEN) {
- ext4_mb_choose_next_group_best_avail(ac, new_cr, group, ngroups);
+ ext4_mb_choose_next_group_best_avail(ac, new_cr, group);
} else {
/*
* TODO: For CR=2, we can arrange groups in an rb tree sorted by