lkml.org 
[lkml]   [2014]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ext3: Count internal journal as bsddf overhead in ext3_statfs
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


\
 
 \ /
  Last update: 2014-08-19 23:41    [W:0.326 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site