mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
ext4: mballoc: Remove useless setting of ac_criteria
There will be changes coming in future patches which will introduce a new criteria for block allocation. This removes the useless setting of ac_criteria. AFAIU, this might be only used to differentiate between whether a preallocated blocks was allocated or was regular allocator called for allocating blocks. Hence this also adds the debug prints to identify what type of block allocation was done in ext4_mb_show_ac(). Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/1dbae05617519cb6202f1b299c9d1be3e7cda763.1685449706.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
2ec6d0a5ea
commit
569f196f1e
@ -4617,7 +4617,6 @@ ext4_mb_use_preallocated(struct ext4_allocation_context *ac)
|
||||
atomic_inc(&tmp_pa->pa_count);
|
||||
ext4_mb_use_inode_pa(ac, tmp_pa);
|
||||
spin_unlock(&tmp_pa->pa_lock);
|
||||
ac->ac_criteria = 10;
|
||||
read_unlock(&ei->i_prealloc_lock);
|
||||
return true;
|
||||
}
|
||||
@ -4660,7 +4659,6 @@ ext4_mb_use_preallocated(struct ext4_allocation_context *ac)
|
||||
}
|
||||
if (cpa) {
|
||||
ext4_mb_use_group_pa(ac, cpa);
|
||||
ac->ac_criteria = 20;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -5434,6 +5432,10 @@ static void ext4_mb_show_ac(struct ext4_allocation_context *ac)
|
||||
(unsigned long)ac->ac_b_ex.fe_logical,
|
||||
(int)ac->ac_criteria);
|
||||
mb_debug(sb, "%u found", ac->ac_found);
|
||||
mb_debug(sb, "used pa: %s, ", ac->ac_pa ? "yes" : "no");
|
||||
if (ac->ac_pa)
|
||||
mb_debug(sb, "pa_type %s\n", ac->ac_pa->pa_type == MB_GROUP_PA ?
|
||||
"group pa" : "inode pa");
|
||||
ext4_mb_show_pa(sb);
|
||||
}
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user