From: Chao Yu <chao@kernel.org>
To: Wu Bo <bo.wu@vivo.com>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Wu Bo <wubo.oduw@gmail.com>, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 2/3] f2fs-tools: skip not matched segment when finding free block
Date: Wed, 20 Sep 2023 21:07:59 +0800 [thread overview]
Message-ID: <bba25aab-c7a7-2e48-8280-07e05cf3d54c@kernel.org> (raw)
In-Reply-To: <4ae9a0c9657efa47399953c6d8a5cd28135bc3df.1694768423.git.bo.wu@vivo.com>
On 2023/9/15 17:04, Wu Bo wrote:
> If the segment type is not matched, goto next segment to save time.
> ---
> fsck/mount.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fsck/mount.c b/fsck/mount.c
> index 00940b8..dccaae2 100644
> --- a/fsck/mount.c
> +++ b/fsck/mount.c
> @@ -2854,6 +2854,8 @@ next_segment:
> if (type == want_type && !new_sec &&
> !f2fs_test_bit(offset, (const char *)bitmap))
> return 0;
> + if (type != want_type)
> + goto next_segment;
if (type != want_type)
goto next_segment;
else if (!new_sec && !f2fs_test_bit(offset, (const char *)bitmap))
return 0;
Thanks,
>
> *to = left ? *to - 1: *to + 1;
> }
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2023-09-20 13:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-15 9:04 [f2fs-dev] [PATCH 0/3] f2fs-tools: cache free segments count to improve perfmance Wu Bo via Linux-f2fs-devel
2023-09-15 9:04 ` [f2fs-dev] [PATCH 1/3] f2fs-tools: use 'IS_CUR_SEGNO()' to check if it is current segment Wu Bo via Linux-f2fs-devel
2023-09-20 8:49 ` Chao Yu
2023-09-15 9:04 ` [f2fs-dev] [PATCH 2/3] f2fs-tools: skip not matched segment when finding free block Wu Bo via Linux-f2fs-devel
2023-09-20 13:07 ` Chao Yu [this message]
2023-09-15 9:04 ` [f2fs-dev] [PATCH 3/3] f2fs-tools: cache free segments count to improve perfmance Wu Bo 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=bba25aab-c7a7-2e48-8280-07e05cf3d54c@kernel.org \
--to=chao@kernel.org \
--cc=bo.wu@vivo.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=wubo.oduw@gmail.com \
/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).