]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ext3: Count journal as bsddf overhead in ext3_statfs
authorEric Sandeen <sandeen@redhat.com>
Tue, 15 Oct 2013 23:45:17 +0000 (18:45 -0500)
committerJan Kara <jack@suse.cz>
Wed, 16 Oct 2013 12:29:17 +0000 (14:29 +0200)
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: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext3/super.c

index c50c76190373a06bdb1a7971a935e7a5d00d9888..37fd31ed16e781fd525773e2f9dc0a2e7b274ab0 100644 (file)
@@ -2825,6 +2825,10 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf)
                 * bitmap, and an inode table.
                 */
                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;
                smp_wmb();
                sbi->s_blocks_last = le32_to_cpu(es->s_blocks_count);