gfs2-utils: master - fsck.gfs2: print block count values when fixing them

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


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=8f388da439c05aa4876fbafe9b4a69634d78896d
Commit:        8f388da439c05aa4876fbafe9b4a69634d78896d
Parent:        273d844cac9ff64a6f6ee7fd7130d9a0e775f911
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Tue Apr 2 11:50:31 2013 -0700
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Mon May 20 11:12:46 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.
---
 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 3a47184..964e60b 100644
--- a/gfs2/fsck/pass1.c
+++ b/gfs2/fsck/pass1.c
@@ -613,7 +613,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