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] [day] [month] [year] [list]
Message-ID: <aNmTex1lM2qGi_hf@google.com>
Date: Sun, 28 Sep 2025 19:58:51 +0000
From: Jaegeuk Kim <jaegeuk@...nel.org>
To: Daeho Jeong <daeho43@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
	kernel-team@...roid.com, Daeho Jeong <daehojeong@...gle.com>
Subject: Re: [PATCH] f2fs-tools: remove unnecessary alignment for
 blocks_for_ssa

On 09/24, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@...gle.com>
> 
> total_valid_blks_available is already a multiple of c.blks_per_seg.
> So, we don't need an additional alignment adjustment.

Can we add ASSERT?

> 
> Signed-off-by: Daeho Jeong <daehojeong@...gle.com>
> ---
>  mkfs/f2fs_format.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
> index b98976c..55a7505 100644
> --- a/mkfs/f2fs_format.c
> +++ b/mkfs/f2fs_format.c
> @@ -500,8 +500,7 @@ static int f2fs_prepare_super_block(void)
>  	if (c.feature & F2FS_FEATURE_RO)
>  		blocks_for_ssa = 0;
>  	else
> -		blocks_for_ssa = total_valid_blks_available /
> -				c.blks_per_seg + 1;
> +		blocks_for_ssa = total_valid_blks_available / c.blks_per_seg;
>  
>  	set_sb(segment_count_ssa, SEG_ALIGN(blocks_for_ssa));
>  
> -- 
> 2.51.0.536.g15c5d4f767-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ