From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 2/2] f2fs: avoid to select pinned section during checkpoint=disable
Date: Wed, 4 May 2022 23:01:08 +0800 [thread overview]
Message-ID: <cf5d3814-073f-df3c-a16d-33161140fe6f@kernel.org> (raw)
In-Reply-To: <20220503203040.365028-2-jaegeuk@kernel.org>
On 2022/5/4 4:30, Jaegeuk Kim wrote:
> The f2fs_gc uses a bitmap to indicate pinned sections, but when disabling
> chckpoint, we call f2fs_gc() with NULL_SEGNO which selects the same dirty
> segment as a victim all the time, resulting in checkpoint=disable failure.
> Let's pick another one, if we fail to collect it.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> fs/f2fs/gc.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index 4d47723523c3..5ba8104e138b 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -1838,10 +1838,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync,
> if (gc_type == FG_GC)
> sbi->cur_victim_sec = NULL_SEGNO;
>
> - if (sync)
> - goto stop;
Semantics of 'sync' parameter should be: migrate one section at least before
exit?
So, should it be?
if (seg_freed && (sync || !has_not_enough_free_secs(sbi, sec_freed, 0)))
goto stop;
Thanks,
> -
> - if (!has_not_enough_free_secs(sbi, sec_freed, 0))
> + if (!has_not_enough_free_secs(sbi, sec_freed, 0) && seg_freed)
> goto stop;
>
> if (skipped_round <= MAX_SKIP_GC_COUNT || skipped_round * 2 < round) {
_______________________________________________
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:[~2022-05-04 15:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-03 20:30 [f2fs-dev] [PATCH 1/2] f2fs: write checkpoint during FG_GC Jaegeuk Kim
2022-05-03 20:30 ` [f2fs-dev] [PATCH 2/2] f2fs: avoid to select pinned section during checkpoint=disable Jaegeuk Kim
2022-05-04 15:01 ` Chao Yu [this message]
2022-05-04 20:22 ` [f2fs-dev] [PATCH 2/2 v2] " Jaegeuk Kim
2022-05-05 11:35 ` Chao Yu
2022-05-05 11:21 ` [f2fs-dev] [PATCH 1/2] f2fs: write checkpoint during FG_GC Chao Yu
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=cf5d3814-073f-df3c-a16d-33161140fe6f@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;
as well as URLs for NNTP newsgroup(s).