lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 29 Jul 2019 15:17:48 +0200
From:   Jan Kara <jack@...e.cz>
To:     Chengguang Xu <cgxu519@...o.com.cn>
Cc:     Jan Kara <jack@...e.com>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext2: show more accurate free block count in debug
 message

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@...o.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@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists