From: Yunlei He <heyunlei@huawei.com>
To: jaegeuk@kernel.org, yuchao0@huawei.com,
linux-f2fs-devel@lists.sourceforge.net
Cc: ning.jia@huawei.com, heyunlei@huawei.com
Subject: [PATCH] fsck.f2fs: use mem nat info directly
Date: Mon, 22 Jan 2018 20:03:46 +0800 [thread overview]
Message-ID: <1516622626-1486-1-git-send-email-heyunlei@huawei.com> (raw)
Use mem nat info directly for we built in fsck init.
Signed-off-by: Yunlei He <heyunlei@huawei.com>
---
fsck/mount.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/fsck/mount.c b/fsck/mount.c
index 0a5b986..fe0d510 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -1591,8 +1591,14 @@ void update_nat_blkaddr(struct f2fs_sb_info *sbi, nid_t ino,
void get_node_info(struct f2fs_sb_info *sbi, nid_t nid, struct node_info *ni)
{
struct f2fs_nat_entry raw_nat;
- get_nat_entry(sbi, nid, &raw_nat);
+
ni->nid = nid;
+ if (c.func == FSCK) {
+ node_info_from_raw_nat(ni, &(F2FS_FSCK(sbi)->entries[nid]));
+ return;
+ }
+
+ get_nat_entry(sbi, nid, &raw_nat);
node_info_from_raw_nat(ni, &raw_nat);
}
--
1.9.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
next reply other threads:[~2018-01-22 12:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 12:03 Yunlei He [this message]
2018-01-24 15:39 ` [PATCH] fsck.f2fs: use mem nat info directly 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=1516622626-1486-1-git-send-email-heyunlei@huawei.com \
--to=heyunlei@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=ning.jia@huawei.com \
--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;
as well as URLs for NNTP newsgroup(s).