Skip to content

Commit

Permalink
ext3: Count internal journal as bsddf overhead in ext3_statfs
Browse files Browse the repository at this point in the history
The journal blocks of external journal device should not
be counted as overhead.

Signed-off-by: Chin-Tsung Cheng <chintzung@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Chin-Tsung Cheng authored and Jan Kara committed Aug 19, 2014
1 parent 410dd3c commit e6d8fb3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/ext3/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2828,8 +2828,9 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf)
*/
overhead += ngroups * (2 + sbi->s_itb_per_group);

/* Add the journal blocks as well */
overhead += sbi->s_journal->j_maxlen;
/* Add the internal journal blocks as well */
if (sbi->s_journal && !sbi->journal_bdev)
overhead += sbi->s_journal->j_maxlen;

sbi->s_overhead_last = overhead;
smp_wmb();
Expand Down

0 comments on commit e6d8fb3

Please sign in to comment.