Re: [PATCH] ext2: show more accurate free block count in debug message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>

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@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux