From: Daeho Jeong <daeho43@gmail.com>
To: linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com
Cc: Daeho Jeong <daehojeong@google.com>
Subject: [f2fs-dev] [PATCH] f2fs-tools: remove unnecessary alignment for blocks_for_ssa
Date: Wed, 24 Sep 2025 11:54:23 -0700 [thread overview]
Message-ID: <20250924185423.1305104-1-daeho43@gmail.com> (raw)
From: Daeho Jeong <daehojeong@google.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@google.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
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next reply other threads:[~2025-09-24 18:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 18:54 Daeho Jeong [this message]
2025-09-25 9:24 ` [f2fs-dev] [PATCH] f2fs-tools: remove unnecessary alignment for blocks_for_ssa Chao Yu via Linux-f2fs-devel
2025-09-28 19:58 ` Jaegeuk Kim via Linux-f2fs-devel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250924185423.1305104-1-daeho43@gmail.com \
--to=daeho43@gmail.com \
--cc=daehojeong@google.com \
--cc=kernel-team@android.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).