Skip to contentSkip to conversation

fsck.f2fs: use mem nat info directly

PATCH In review Yunlei He 2 participants 2 messages Jan 22, 2018 – Jan 24, 2018

lore
Share & tools
lore

Yunlei He

author
#0 lore raw

PATCH 1/1 fsck.f2fs: use mem nat info directly

Use mem nat info directly for we built in fsck init.

---
 fsck/mount.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
fsck/mount.c +7 -1
index 0a5b986..fe0d510 100644
@@ -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);
 }
 
Signature · 6 lines
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