From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <chao@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 3/3] f2fs: fix false alarm on invalid block address
Date: Fri, 12 Apr 2024 20:56:02 +0000 [thread overview]
Message-ID: <Zhmf4klcOr4eplin@google.com> (raw)
In-Reply-To: <050a93dc-d9a8-44bd-9a83-83718e95f04d@kernel.org>
On 04/11, Chao Yu wrote:
> On 2024/4/10 4:34, Jaegeuk Kim wrote:
> > f2fs_ra_meta_pages can try to read ahead on invalid block address which is
> > not the corruption case.
>
> In which case we will read ahead invalid meta pages? recovery w/ META_POR?
I was trying to debug another issue, but found the root cause. Let me drop this
patch.
>
> Thanks,
>
> >
> > Fixes: 31f85ccc84b8 ("f2fs: unify the error handling of f2fs_is_valid_blkaddr")
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> > fs/f2fs/checkpoint.c | 9 +++++----
> > 1 file changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> > index eac698b8dd38..b01320502624 100644
> > --- a/fs/f2fs/checkpoint.c
> > +++ b/fs/f2fs/checkpoint.c
> > @@ -179,22 +179,22 @@ static bool __f2fs_is_valid_blkaddr(struct f2fs_sb_info *sbi,
> > break;
> > case META_SIT:
> > if (unlikely(blkaddr >= SIT_BLK_CNT(sbi)))
> > - goto err;
> > + goto check_only;
> > break;
> > case META_SSA:
> > if (unlikely(blkaddr >= MAIN_BLKADDR(sbi) ||
> > blkaddr < SM_I(sbi)->ssa_blkaddr))
> > - goto err;
> > + goto check_only;
> > break;
> > case META_CP:
> > if (unlikely(blkaddr >= SIT_I(sbi)->sit_base_addr ||
> > blkaddr < __start_cp_addr(sbi)))
> > - goto err;
> > + goto check_only;
> > break;
> > case META_POR:
> > if (unlikely(blkaddr >= MAX_BLKADDR(sbi) ||
> > blkaddr < MAIN_BLKADDR(sbi)))
> > - goto err;
> > + goto check_only;
> > break;
> > case DATA_GENERIC:
> > case DATA_GENERIC_ENHANCE:
> > @@ -228,6 +228,7 @@ static bool __f2fs_is_valid_blkaddr(struct f2fs_sb_info *sbi,
> > return true;
> > err:
> > f2fs_handle_error(sbi, ERROR_INVALID_BLKADDR);
> > +check_only:
> > return false;
> > }
next prev parent reply other threads:[~2024-04-12 20:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 20:34 [PATCH 1/3] f2fs: use folio_test_writeback Jaegeuk Kim
2024-04-09 20:34 ` [PATCH 2/3] f2fs: clear writeback when compression failed Jaegeuk Kim
2024-04-11 9:05 ` [f2fs-dev] " Chao Yu
2024-04-12 20:57 ` Jaegeuk Kim
2024-04-16 16:49 ` [PATCH 2/3 v2] " Jaegeuk Kim
2024-04-23 19:47 ` [f2fs-dev] " Daeho Jeong
2024-04-25 2:15 ` Chao Yu
2024-04-09 20:34 ` [PATCH 3/3] f2fs: fix false alarm on invalid block address Jaegeuk Kim
2024-04-11 9:08 ` [f2fs-dev] " Chao Yu
2024-04-12 20:56 ` Jaegeuk Kim [this message]
2024-04-19 10:27 ` Juhyung Park
2024-04-19 17:50 ` Jaegeuk Kim
2024-04-25 7:29 ` Chao Yu
2024-04-28 1:23 ` Daeho Jeong
2024-04-28 9:08 ` Chao Yu
2024-04-11 8:56 ` [f2fs-dev] [PATCH 1/3] f2fs: use folio_test_writeback Chao Yu
2024-04-14 15:32 ` patchwork-bot+f2fs
2024-04-24 17:40 ` 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=Zhmf4klcOr4eplin@google.com \
--to=jaegeuk@kernel.org \
--cc=chao@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 read-only IMAP folder(s) and NNTP newsgroup(s).