Skip to contentSkip to conversation

fsck.f2fs: print node block address

PATCH New Chao Yu 1 participant 1 message Jul 28, 2018

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/1 fsck.f2fs: print node block address

Print block address of unreachable node id in fsck_verify() for better debugging.

---
 fsck/fsck.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
fsck/fsck.c +5 -1
index bb1da0305f2c..20a569228516 100644
@@ -2507,7 +2507,11 @@ int fsck_verify(struct f2fs_sb_info *sbi)
 
 	for (i = 0; i < fsck->nr_nat_entries; i++) {
 		if (f2fs_test_bit(i, fsck->nat_area_bitmap) != 0) {
-			printf("NID[0x%x] is unreachable\n", i);
+			struct node_info ni;
+
+			get_node_info(sbi, i, &ni);
+			printf("NID[0x%x] is unreachable, blkaddr:0x%x\n",
+							i, ni.blk_addr);
 			nr_unref_nid++;
 		}
 	}
Signature · 1 line
2.18.0.rc1