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-next>] [day] [month] [year] [list]
Message-ID: <20250924185423.1305104-1-daeho43@gmail.com>
Date: Wed, 24 Sep 2025 11:54:23 -0700
From: Daeho Jeong <daeho43@...il.com>
To: linux-kernel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net,
	kernel-team@...roid.com
Cc: Daeho Jeong <daehojeong@...gle.com>
Subject: [PATCH] f2fs-tools: remove unnecessary alignment for blocks_for_ssa

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.

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