From: Lihong Kou <koulihong@huawei.com>
To: <yuchao0@huawei.com>, <jaegeuk@kernel.org>
Cc: <fangwei1@huawei.com>, <linux-f2fs-devel@lists.sourceforge.net>,
<linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<koulihong@huawei.com>
Subject: [f2fs-dev] [PATCH] fsck.f2fs: fix the bug in reserve_new_block
Date: Mon, 5 Aug 2019 15:26:21 +0800 [thread overview]
Message-ID: <1564989981-104324-1-git-send-email-koulihong@huawei.com> (raw)
if we new node block in fsck flow, we need to update
the valid_node_cnt at the same time.
Signed-off-by: Lihong Kou <koulihong@huawei.com>
---
fsck/segment.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fsck/segment.c b/fsck/segment.c
index 98c836e..c16fb3a 100644
--- a/fsck/segment.c
+++ b/fsck/segment.c
@@ -51,8 +51,11 @@ void reserve_new_block(struct f2fs_sb_info *sbi, block_t *to,
if (old_blkaddr == NULL_ADDR) {
sbi->total_valid_block_count++;
- if (c.func == FSCK)
+ if (c.func == FSCK) {
fsck->chk.valid_blk_cnt++;
+ if (IS_NODESEG(type))
+ fsck->chk.valid_node_cnt++;
+ }
}
se->dirty = 1;
--
2.7.4
next reply other threads:[~2019-08-05 7:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 7:26 Lihong Kou [this message]
2019-08-05 7:29 ` 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=1564989981-104324-1-git-send-email-koulihong@huawei.com \
--to=koulihong@huawei.com \
--cc=fangwei1@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.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
all inboxes | Powered by JetHome®