From: Chao Yu <chao@kernel.org>
To: jaegeuk@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, Chao Yu <chao@kernel.org>
Subject: [PATCH 3/6] f2fs: avoid unnecessary sanity check on ckpt_valid_blocks
Date: Mon, 15 Jun 2026 21:08:19 +0800 [thread overview]
Message-ID: <20260615130822.2576088-3-chao@kernel.org> (raw)
In-Reply-To: <20260615130822.2576088-1-chao@kernel.org>
The calculation of sec->ckpt_valid_blocks are the same in both
set_ckpt_valid_blocks() and sanity_check_valid_blocks(), so it
doesn't necessary to call sanity_check_valid_blocks() right after
set_ckpt_valid_blocks().
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/segment.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 1ef4edb77078..f9c688d270e6 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -4802,10 +4802,8 @@ void f2fs_flush_sit_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc)
}
/* update ckpt_valid_block */
- if (__is_large_section(sbi)) {
+ if (__is_large_section(sbi))
set_ckpt_valid_blocks(sbi, segno);
- sanity_check_valid_blocks(sbi, segno);
- }
__clear_bit(segno, bitmap);
sit_i->dirty_sentries--;
@@ -5133,10 +5131,8 @@ static int build_sit_entries(struct f2fs_sb_info *sbi)
if (__is_large_section(sbi)) {
unsigned int segno;
- for (segno = 0; segno < MAIN_SEGS(sbi); segno += SEGS_PER_SEC(sbi)) {
+ for (segno = 0; segno < MAIN_SEGS(sbi); segno += SEGS_PER_SEC(sbi))
set_ckpt_valid_blocks(sbi, segno);
- sanity_check_valid_blocks(sbi, segno);
- }
}
if (err)
--
2.49.0
next prev parent reply other threads:[~2026-06-15 13:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 13:08 [PATCH 1/6] f2fs: fix wrong description in printed log Chao Yu
2026-06-15 13:08 ` [PATCH 2/6] f2fs: misc cleanup in f2fs_record_stop_reason() Chao Yu
2026-06-15 13:08 ` Chao Yu [this message]
2026-06-15 13:08 ` [PATCH 4/6] f2fs: avoid unnecessary fscrypt_finalize_bounce_page() Chao Yu
2026-06-15 22:14 ` [f2fs-dev] " Jaegeuk Kim
2026-06-16 3:12 ` Chao Yu
2026-06-15 13:08 ` [PATCH 5/6] f2fs: use fscrypt_finalize_bounce_page() for cleanup Chao Yu
2026-06-15 13:11 ` Matthew Wilcox
2026-06-16 7:40 ` Chao Yu
2026-06-15 13:08 ` [PATCH 6/6] f2fs: remove unneeded f2fs_is_compressed_page() Chao Yu
2026-06-16 2:50 ` [f2fs-dev] [PATCH 1/6] f2fs: fix wrong description in printed log patchwork-bot+f2fs
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=20260615130822.2576088-3-chao@kernel.org \
--to=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--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
Powered by JetHome