From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Daeho Jeong <daeho43@gmail.com>
Cc: Daeho Jeong <daehojeong@google.com>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: allow dirty sections with zero valid block for checkpoint disabled
Date: Thu, 9 May 2024 18:19:38 +0000 [thread overview]
Message-ID: <Zj0TuhzHzevgxGfe@google.com> (raw)
In-Reply-To: <20240507175628.2460390-1-daeho43@gmail.com>
On 05/07, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
>
> Following the semantic for dirty segments in checkpoint disabled mode,
> apply the same rule to dirty sections.
>
> Signed-off-by: Daeho Jeong <daehojeong@google.com>
> ---
> fs/f2fs/segment.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 6474b7338e81..2463398b243f 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -771,8 +771,11 @@ static void __locate_dirty_segment(struct f2fs_sb_info *sbi, unsigned int segno,
> block_t valid_blocks =
> get_valid_blocks(sbi, segno, true);
>
> - f2fs_bug_on(sbi, unlikely(!valid_blocks ||
> - valid_blocks == CAP_BLKS_PER_SEC(sbi)));
> + if (!is_sbi_flag_set(sbi, SBI_CP_DISABLED))
> + f2fs_bug_on(sbi, unlikely(!valid_blocks));
> +
> + f2fs_bug_on(sbi, unlikely(valid_blocks ==
> + CAP_BLKS_PER_SEC(sbi)));
What about:
f2fs_bug_on(sbi,
(!is_sbi_flag_set(sbi, SBI_CP_DISABLED) && !valid_blocks) ||
valid_blocks == CAP_BLKS_PER_SEC(sbi));
>
> if (!IS_CURSEC(sbi, secno))
> set_bit(secno, dirty_i->dirty_secmap);
> --
> 2.45.0.rc1.225.g2a3ae87e7f-goog
>
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Daeho Jeong <daeho43@gmail.com>
Cc: linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com,
Daeho Jeong <daehojeong@google.com>
Subject: Re: [f2fs-dev] [PATCH] f2fs: allow dirty sections with zero valid block for checkpoint disabled
Date: Thu, 9 May 2024 18:19:38 +0000 [thread overview]
Message-ID: <Zj0TuhzHzevgxGfe@google.com> (raw)
In-Reply-To: <20240507175628.2460390-1-daeho43@gmail.com>
On 05/07, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
>
> Following the semantic for dirty segments in checkpoint disabled mode,
> apply the same rule to dirty sections.
>
> Signed-off-by: Daeho Jeong <daehojeong@google.com>
> ---
> fs/f2fs/segment.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 6474b7338e81..2463398b243f 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -771,8 +771,11 @@ static void __locate_dirty_segment(struct f2fs_sb_info *sbi, unsigned int segno,
> block_t valid_blocks =
> get_valid_blocks(sbi, segno, true);
>
> - f2fs_bug_on(sbi, unlikely(!valid_blocks ||
> - valid_blocks == CAP_BLKS_PER_SEC(sbi)));
> + if (!is_sbi_flag_set(sbi, SBI_CP_DISABLED))
> + f2fs_bug_on(sbi, unlikely(!valid_blocks));
> +
> + f2fs_bug_on(sbi, unlikely(valid_blocks ==
> + CAP_BLKS_PER_SEC(sbi)));
What about:
f2fs_bug_on(sbi,
(!is_sbi_flag_set(sbi, SBI_CP_DISABLED) && !valid_blocks) ||
valid_blocks == CAP_BLKS_PER_SEC(sbi));
>
> if (!IS_CURSEC(sbi, secno))
> set_bit(secno, dirty_i->dirty_secmap);
> --
> 2.45.0.rc1.225.g2a3ae87e7f-goog
>
>
>
> _______________________________________________
> 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:[~2024-05-09 18:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-07 17:56 [f2fs-dev] [PATCH] f2fs: allow dirty sections with zero valid block for checkpoint disabled Daeho Jeong
2024-05-07 17:56 ` Daeho Jeong
2024-05-09 18:19 ` Jaegeuk Kim [this message]
2024-05-09 18:19 ` [f2fs-dev] " Jaegeuk Kim
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=Zj0TuhzHzevgxGfe@google.com \
--to=jaegeuk@kernel.org \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.