linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext3: Count internal journal as bsddf overhead in ext3_statfs
@ 2014-08-15  7:49 Chin-Tsung Cheng
  2014-08-19 21:20 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Chin-Tsung Cheng @ 2014-08-15  7:49 UTC (permalink / raw)
  To: jack; +Cc: akpm, adilger.kernel, linux-ext4, linux-kernel, Chin-Tsung Cheng

The journal blocks of external journal device should not
be counted as overhead.

Signed-off-by: Chin-Tsung Cheng <chintzung@gmail.com>
---
 fs/ext3/super.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 08cdfe5..622e882 100644
--- a/fs/ext3/super.c
+++ b/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);
 
-		/* 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();
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ext3: Count internal journal as bsddf overhead in ext3_statfs
  2014-08-15  7:49 [PATCH] ext3: Count internal journal as bsddf overhead in ext3_statfs Chin-Tsung Cheng
@ 2014-08-19 21:20 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2014-08-19 21:20 UTC (permalink / raw)
  To: Chin-Tsung Cheng; +Cc: jack, akpm, adilger.kernel, linux-ext4, linux-kernel

On Fri 15-08-14 15:49:31, Chin-Tsung Cheng wrote:
> The journal blocks of external journal device should not
> be counted as overhead.
  Thanks. I've added the patch to my tree.

								Honza

> 
> Signed-off-by: Chin-Tsung Cheng <chintzung@gmail.com>
> ---
>  fs/ext3/super.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext3/super.c b/fs/ext3/super.c
> index 08cdfe5..622e882 100644
> --- a/fs/ext3/super.c
> +++ b/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);
>  
> -		/* 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();
> -- 
> 1.9.3
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-19 21:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-15  7:49 [PATCH] ext3: Count internal journal as bsddf overhead in ext3_statfs Chin-Tsung Cheng
2014-08-19 21:20 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).