Skip to contentSkip to conversation

fsck.gfs2: Print out block number when pass3 finds a bad directory

PATCH New Bob Peterson 1 participant 1 message Jan 9, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 fsck.gfs2: Print out block number when pass3 finds a bad directory

Hi,

This patch changes pass3 so that it prints out the directory inode number when it finds a directory containing a bad block.

Regards,

Bob Peterson
Red Hat File Systems

---

gfs2/fsck/pass3.c +4 -1
index 9582b5b..33865df 100644
@@ -246,7 +246,10 @@ int pass3(struct gfs2_sbd *sdp)
 			q = block_type(di->dinode.no_addr);
 			if (q == gfs2_bad_block) {
 				log_err( _("Found unlinked directory "
-					   "containing bad block\n"));
+					   "containing bad block at block %llu"
+					   " (0x%llx)\n"),
+					(unsigned long long)di->dinode.no_addr,
+					(unsigned long long)di->dinode.no_addr);
 				if (query(_("Clear unlinked directory "
 					   "with bad blocks? (y/n) "))) {
 					log_warn( _("inode %lld (0x%llx) is "