linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Chengguang Xu <cgxu519@zoho.com.cn>
Cc: Jan Kara <jack@suse.com>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext2: show more accurate free block count in debug message
Date: Mon, 29 Jul 2019 15:17:48 +0200	[thread overview]
Message-ID: <20190729131748.GD17833@quack2.suse.cz> (raw)
In-Reply-To: <20190718012236.22618-1-cgxu519@zoho.com.cn>

On Thu 18-07-19 09:22:36, Chengguang Xu wrote:
> Show more accurate free block count in debug message by replacing
> es->s_free_blocks_count to sbi->s_freeblocks_counter in
> ext2_count_free_blocks().
> 
> Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn>

Thanks for the patch but I don't think this really makes any big
difference. So let's just not introduce unnecessary churn.

								Honza

> ---
>  fs/ext2/balloc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
> index 547c165299c0..8c587533cead 100644
> --- a/fs/ext2/balloc.c
> +++ b/fs/ext2/balloc.c
> @@ -1495,7 +1495,8 @@ unsigned long ext2_count_free_blocks (struct super_block * sb)
>  		brelse(bitmap_bh);
>  	}
>  	printk("ext2_count_free_blocks: stored = %lu, computed = %lu, %lu\n",
> -		(long)le32_to_cpu(es->s_free_blocks_count),
> +		(unsigned long)
> +		percpu_counter_read(&EXT2_SB(sb)->s_freeblocks_counter),
>  		desc_count, bitmap_count);
>  	return bitmap_count;
>  #else
> -- 
> 2.21.0
> 
> 
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

      reply	other threads:[~2019-07-29 13:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-18  1:22 [PATCH] ext2: show more accurate free block count in debug message Chengguang Xu
2019-07-29 13:17 ` Jan Kara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190729131748.GD17833@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=cgxu519@zoho.com.cn \
    --cc=jack@suse.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).