Эх сурвалжийг харах

ext3: Count internal journal as bsddf overhead in ext3_statfs

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>
Chin-Tsung Cheng 11 жил өмнө
parent
commit
e6d8fb340f
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 3 2
      fs/ext3/super.c

+ 3 - 2
fs/ext3/super.c

@@ -2828,8 +2828,9 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf)
 		 */
 		 */
 		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;
+		/* 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;
 		sbi->s_overhead_last = overhead;
 		smp_wmb();
 		smp_wmb();