From mboxrd@z Thu Jan 1 00:00:00 1970 From: rpeterso@redhat.com Date: Mon, 8 Apr 2013 07:41:01 -0700 Subject: [Cluster-devel] [PATCH 29/42] fsck.gfs2: print block count values when fixing them In-Reply-To: <1365432074-17615-1-git-send-email-rpeterso@redhat.com> References: <1365432074-17615-1-git-send-email-rpeterso@redhat.com> Message-ID: <1365432074-17615-30-git-send-email-rpeterso@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Bob Peterson 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 file changed, 5 insertions(+), 1 deletion(-) 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")); -- 1.7.11.7