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: [PATCH] f2fs-tools: use proper address entry count for direct nodes
Date: Wed, 4 Oct 2023 16:26:16 -0700 [thread overview]
Message-ID: <ZR30mNQEyRjzr0jm@google.com> (raw)
In-Reply-To: <20231003230155.355807-1-daeho43@gmail.com>
On 10/03, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
>
> For direct nodes, we have to use DEF_ADDRS_PER_BLOCK.
>
> Signed-off-by: Daeho Jeong <daehojeong@google.com>
> ---
> fsck/fsck.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fsck/fsck.c b/fsck/fsck.c
> index 78ffdb6..56a7d31 100644
> --- a/fsck/fsck.c
> +++ b/fsck/fsck.c
> @@ -2894,7 +2894,7 @@ static void fsck_failed_reconnect_file_dnode(struct f2fs_sb_info *sbi,
> fsck->chk.valid_blk_cnt--;
> f2fs_clear_main_bitmap(sbi, ni.blk_addr);
>
> - for (i = 0; i < ADDRS_PER_BLOCK(&node->i); i++) {
> + for (i = 0; i < DEF_ADDRS_PER_BLOCK; i++) {
It seems we need to use the inode block passing by fsck_failed_reconnect_file().
> addr = le32_to_cpu(node->dn.addr[i]);
> if (!addr)
> continue;
3012 fsck->chk.valid_blk_cnt--;
3013 if (addr == NEW_ADDR)
And, we also need to skip if addr == COMPRESS_ADDR here?
3014 continue;
3015 f2fs_clear_main_bitmap(sbi, addr);
3016 }
> --
> 2.42.0.582.g8ccd20d70d-goog
next prev parent reply other threads:[~2023-10-04 23:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-03 23:01 [PATCH] f2fs-tools: use proper address entry count for direct nodes Daeho Jeong
2023-10-04 23:26 ` Jaegeuk Kim [this message]
2023-10-04 23:37 ` Daeho Jeong
2023-10-04 23:55 ` Jaegeuk Kim
2023-10-05 0:04 ` Daeho Jeong
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=ZR30mNQEyRjzr0jm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox