summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ialloc.c
diff options
context:
space:
mode:
authorTheodore Ts'o2011-09-10 00:56:51 +0200
committerTheodore Ts'o2011-09-10 00:56:51 +0200
commit5704265188ffe4290ed73b3cb685206c3ed8209d (patch)
tree6bc51bea59625b2a7c8e4b74bbb66884371f74dd /fs/ext4/ialloc.c
parentext4: teach ext4_ext_truncate() about the bigalloc feature (diff)
downloadkernel-qcow2-linux-5704265188ffe4290ed73b3cb685206c3ed8209d.tar.gz
kernel-qcow2-linux-5704265188ffe4290ed73b3cb685206c3ed8209d.tar.xz
kernel-qcow2-linux-5704265188ffe4290ed73b3cb685206c3ed8209d.zip
ext4: convert s_{dirty,free}blocks_counter to s_{dirty,free}clusters_counter
Convert the percpu counters s_dirtyblocks_counter and s_freeblocks_counter in struct ext4_super_info to be s_dirtyclusters_counter and s_freeclusters_counter. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r--fs/ext4/ialloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index b7a8130d0af4..58115bad163f 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -490,7 +490,8 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent,
freei = percpu_counter_read_positive(&sbi->s_freeinodes_counter);
avefreei = freei / ngroups;
- freeb = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
+ freeb = EXT4_C2B(sbi,
+ percpu_counter_read_positive(&sbi->s_freeclusters_counter));
avefreeb = freeb;
do_div(avefreeb, ngroups);
ndirs = percpu_counter_read_positive(&sbi->s_dirs_counter);