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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240119143324.5cehalj5wgy7cozc@quack3>
Date: Fri, 19 Jan 2024 15:33:24 +0100
From: Jan Kara <jack@...e.cz>
To: Zhang Yi <yi.zhang@...weicloud.com>
Cc: linux-ext4@...r.kernel.org, tytso@....edu, adilger.kernel@...ger.ca,
	jack@...e.cz, yi.zhang@...wei.com, chengzhihao1@...wei.com,
	yukuai3@...wei.com
Subject: Re: [PATCH] ext4: add a hint for block bitmap corrupt state in
 mb_groups

On Fri 19-01-24 14:11:54, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@...wei.com>
> 
> If one group is marked as block bitmap corrupted, its free blocks cannot
> be used and its free count is also deducted from the global
> sbi->s_freeclusters_counter. User might be confused about the absent
> free space because we can't query the information about corrupted block
> groups except unreliable error messages in syslog. So add a hint to show
> block bitmap corrupted groups in mb_groups.
> 
> Signed-off-by: Zhang Yi <yi.zhang@...wei.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  fs/ext4/mballoc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index d72b5e3c92ec..641c9be8e25e 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -3035,7 +3035,10 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
>  	for (i = 0; i <= 13; i++)
>  		seq_printf(seq, " %-5u", i <= blocksize_bits + 1 ?
>  				sg.info.bb_counters[i] : 0);
> -	seq_puts(seq, " ]\n");
> +	seq_puts(seq, " ]");
> +	if (EXT4_MB_GRP_BBITMAP_CORRUPT(&sg.info))
> +		seq_puts(seq, " Block bitmap corrupted!");
> +	seq_puts(seq, "\n");
>  
>  	return 0;
>  }
> -- 
> 2.39.2
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ