diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-03-04 19:31:53 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-03-04 19:31:53 -0500 |
commit | 7d39db14a42cbd719c7515b9da8f85a2eb6a0633 (patch) | |
tree | 5c93b9f76c9895183d1e973ed296cd9b7a1d9a0e /fs/ext4/super.c | |
parent | 9f24e4208f7ee2748f157368b63287dc903fcf60 (diff) |
ext4: Use struct flex_groups to calculate get_orlov_stats()
Instead of looping over all of the block groups in a flex group
summing their summary statistics, start tracking used_dirs in struct
flex_groups, and use struct flex_groups instead. This should save a
bit of CPU for mkdir-heavy workloads.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 6b5d5c6399fa..b9aefceb41e7 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -1634,6 +1634,8 @@ static int ext4_fill_flex_info(struct super_block *sb) | |||
1634 | ext4_free_inodes_count(sb, gdp)); | 1634 | ext4_free_inodes_count(sb, gdp)); |
1635 | atomic_set(&sbi->s_flex_groups[flex_group].free_blocks, | 1635 | atomic_set(&sbi->s_flex_groups[flex_group].free_blocks, |
1636 | ext4_free_blks_count(sb, gdp)); | 1636 | ext4_free_blks_count(sb, gdp)); |
1637 | atomic_set(&sbi->s_flex_groups[flex_group].used_dirs, | ||
1638 | ext4_used_dirs_count(sb, gdp)); | ||
1637 | } | 1639 | } |
1638 | 1640 | ||
1639 | return 1; | 1641 | return 1; |