Commit 2046fd18 authored by Eric Sandeen's avatar Eric Sandeen Committed by Jan Kara

ext3: Count journal as bsddf overhead in ext3_statfs

ext4 counts journal space as bsddf overhead, but ext3 does not.

For some reason when I patched ext4 I thought I should leave
ext3 alone, but frankly it makes more sense to fix it, I think.

Otherwise we get inconsistent behavior from ext3 under ext3.ko,
and ext3 under ext4.ko, which is not at all desirable...

This is testable by xfstests shared/289, though it will need
modification because it currently special-cases ext3.
Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 61e6cfa8
...@@ -2825,6 +2825,10 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf) ...@@ -2825,6 +2825,10 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf)
* bitmap, and an inode table. * bitmap, and an inode table.
*/ */
overhead += ngroups * (2 + sbi->s_itb_per_group); overhead += ngroups * (2 + sbi->s_itb_per_group);
/* Add the journal blocks as well */
overhead += sbi->s_journal->j_maxlen;
sbi->s_overhead_last = overhead; sbi->s_overhead_last = overhead;
smp_wmb(); smp_wmb();
sbi->s_blocks_last = le32_to_cpu(es->s_blocks_count); sbi->s_blocks_last = le32_to_cpu(es->s_blocks_count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment