gfs2-utils: master - fsck.gfs2: When flagging a duplicate reference, show valid or invalid

Bob Peterson rpeterso at fedoraproject.org
Mon May 20 16:18:50 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=390b7b663762b32a68fff13c214ec6361f63f3bf
Commit:        390b7b663762b32a68fff13c214ec6361f63f3bf
Parent:        37480679e413e503de72d873021ce2c808f0d8cc
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Wed Apr 3 10:03:49 2013 -0700
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Mon May 20 11:12:47 2013 -0500

fsck.gfs2: When flagging a duplicate reference, show valid or invalid

This patch changes the logging when duplicate block references are
flagged. The idea is to print whether or not the inode with the reference
is valid or invalid, which helps in diagnosing problems when duplicate
block references are resolved.
---
 gfs2/fsck/util.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gfs2/fsck/util.c b/gfs2/fsck/util.c
index fc3a0ec..ef59e6e 100644
--- a/gfs2/fsck/util.c
+++ b/gfs2/fsck/util.c
@@ -399,9 +399,10 @@ int add_duplicate_ref(struct gfs2_inode *ip, uint64_t block,
 	id->reftypecount[reftype]++;
 	id->dup_count++;
 	log_info( _("Found %d reference(s) to block %llu"
-		    " (0x%llx) as %s in inode #%llu (0x%llx)\n"),
+		    " (0x%llx) as %s in %s inode #%llu (0x%llx)\n"),
 		  id->dup_count, (unsigned long long)block,
 		  (unsigned long long)block, reftypes[reftype],
+		  inode_valid ? _("valid") : _("invalid"),
 		  (unsigned long long)ip->i_di.di_num.no_addr,
 		  (unsigned long long)ip->i_di.di_num.no_addr);
 	if (first)


More information about the cluster-commits mailing list