cluster: RHEL6 - fsck.gfs2: print block count values when fixing them

Bob Peterson rpeterso at fedoraproject.org
Tue May 21 12:23:48 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=b178d9ade44ed9a8e8609920b96960d1e79f7c84
Commit:        b178d9ade44ed9a8e8609920b96960d1e79f7c84
Parent:        d5a2afb07d27e1822f14d1dd3b33464a738fa6f6
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Tue Apr 2 11:50:31 2013 -0700
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Fri May 17 15:26:12 2013 -0500

fsck.gfs2: print block count values when fixing them

Before this patch, block counts were fixed, but it didn't log what
the new value was changed to. That made it very difficult to track
down block count problems. This patch changes the logging so that
it prints the new block count, and a breakdown of how many blocks
were counted for metadata, data, extended attributes, etc.

rhbz#902920
---
 gfs2/fsck/pass1.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c
index a4967a4..92a8ff8 100644
--- a/gfs2/fsck/pass1.c
+++ b/gfs2/fsck/pass1.c
@@ -612,7 +612,11 @@ static int finish_eattr_indir(struct gfs2_inode *ip, int leaf_pointers,
 		ip->i_di.di_blocks = 1 + bc->indir_count +
 			bc->data_count + bc->ea_count;
 		bmodified(ip->i_bh);
-		log_err( _("Block count fixed.\n"));
+		log_err(_("Block count fixed: 1+%lld+%lld+%lld = %lld.\n"),
+			(unsigned long long)bc->indir_count,
+			(unsigned long long)bc->data_count,
+			(unsigned long long)bc->ea_count,
+			(unsigned long long)ip->i_di.di_blocks);
 		return 1;
 	}
 	log_err( _("Block count not fixed.\n"));


More information about the cluster-commits mailing list