diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-03-04 19:09:10 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-03-04 19:09:10 -0500 |
commit | 9f24e4208f7ee2748f157368b63287dc903fcf60 (patch) | |
tree | 255989fe69ebfb2b031dc7cf6dbe975df67c711a /fs/ext4/super.c | |
parent | b713a5ec55bf73c833f9883cdd761b20ee61a1ab (diff) | |
download | kernel_samsung_crespo-9f24e4208f7ee2748f157368b63287dc903fcf60.zip kernel_samsung_crespo-9f24e4208f7ee2748f157368b63287dc903fcf60.tar.gz kernel_samsung_crespo-9f24e4208f7ee2748f157368b63287dc903fcf60.tar.bz2 |
ext4: Use atomic_t's in struct flex_groups
Reduce pressure on the sb_bgl_lock family of locks by using atomic_t's
to track the number of free blocks and inodes in each flex_group.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 1ec554c..6b5d5c6 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1630,10 +1630,10 @@ static int ext4_fill_flex_info(struct super_block *sb) gdp = ext4_get_group_desc(sb, i, &bh); flex_group = ext4_flex_group(sbi, i); - sbi->s_flex_groups[flex_group].free_inodes += - ext4_free_inodes_count(sb, gdp); - sbi->s_flex_groups[flex_group].free_blocks += - ext4_free_blks_count(sb, gdp); + atomic_set(&sbi->s_flex_groups[flex_group].free_inodes, + ext4_free_inodes_count(sb, gdp)); + atomic_set(&sbi->s_flex_groups[flex_group].free_blocks, + ext4_free_blks_count(sb, gdp)); } return 1; |