Commit 2046fd1873886e8c774d7c1b0961624c164e7db2

Authored by Eric Sandeen
Committed by Jan Kara
1 parent 61e6cfa80d

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: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

... ... @@ -2825,6 +2825,10 @@
2825 2825 * bitmap, and an inode table.
2826 2826 */
2827 2827 overhead += ngroups * (2 + sbi->s_itb_per_group);
  2828 +
  2829 + /* Add the journal blocks as well */
  2830 + overhead += sbi->s_journal->j_maxlen;
  2831 +
2828 2832 sbi->s_overhead_last = overhead;
2829 2833 smp_wmb();
2830 2834 sbi->s_blocks_last = le32_to_cpu(es->s_blocks_count);