Commit 9b6a0c14 authored by Harshad Shirwadkar's avatar Harshad Shirwadkar Committed by Greg Kroah-Hartman
Browse files

ext4: drop s_mb_bal_lock and convert protected fields to atomic



[ Upstream commit 67d25186 ]

s_mb_buddies_generated gets used later in this patch series to
determine if the cr 0 and cr 1 optimziations should be performed or
not. Currently, s_mb_buddies_generated is protected under a
spin_lock. In the allocation path, it is better if we don't depend on
the lock and instead read the value atomically. In order to do that,
we drop s_bal_lock altogether and we convert the only two protected
fields by it s_mb_buddies_generated and s_mb_generation_time to atomic
type.

Signed-off-by: default avatarHarshad Shirwadkar <harshadshirwadkar@gmail.com>
Reviewed-by: default avatarAndreas Dilger <adilger@dilger.ca>
Reviewed-by: default avatarRitesh Harjani <ritesh.list@gmail.com>
Link: https://lore.kernel.org/r/20210401172129.189766-2-harshadshirwadkar@gmail.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Stable-dep-of: 5354b2af ("ext4: allow ext4_get_group_info() to fail")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0983142c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment