Gitweb:
http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitd...
Commit: 3527e52c3ed84708e888635195264ece16db4216
Parent: 76e593eba54483a1199590f6ef0e03979146d79f
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Tue Aug 9 11:38:18 2011 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Mon Aug 29 12:53:52 2011 -0500
fsck.gfs2: Shorten output
This patch shortens some of the output of fsck.gfs2, thereby making
the output files smaller and more manageable.
rhbz#675723
---
gfs2/fsck/lost_n_found.c | 6 +++---
gfs2/fsck/metawalk.c | 7 ++++---
gfs2/fsck/pass5.c | 13 +++++++------
3 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/gfs2/fsck/lost_n_found.c b/gfs2/fsck/lost_n_found.c
index 7ce5db5..dbb2b58 100644
--- a/gfs2/fsck/lost_n_found.c
+++ b/gfs2/fsck/lost_n_found.c
@@ -69,8 +69,8 @@ static void add_dotdot(struct gfs2_inode *ip)
(unsigned long long)ip->i_di.di_num.no_addr,
(unsigned long long)di->dotdot_parent);
else
- log_debug(_("Couldn't find a valid \"..\" entry "
- "for orphan directory %lld (0x%llx)\n"),
+ log_debug(_("Couldn't find directory %lld (0x%llx) "
+ "in directory tree.\n"),
(unsigned long long)ip->i_di.di_num.no_addr,
(unsigned long long)ip->i_di.di_num.no_addr);
}
@@ -226,7 +226,7 @@ int add_inode_to_lf(struct gfs2_inode *ip){
incr_link_count(lf_dip->i_di.di_num.no_addr,
ip->i_di.di_mode, _("to lost+found"));
- log_notice( _("Added inode #%llu (0x%llx) to lost+found dir\n"),
+ log_notice( _("Added inode #%llu (0x%llx) to lost+found\n"),
(unsigned long long)ip->i_di.di_num.no_addr,
(unsigned long long)ip->i_di.di_num.no_addr);
gfs2_dinode_out(&lf_dip->i_di, lf_dip->i_bh);
diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index b908f69..065c9c4 100644
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawalk.c
@@ -47,12 +47,13 @@ int check_n_fix_bitmap(struct gfs2_sbd *sdp, uint64_t blk,
const char *allocdesc[] = {"free space", "data",
"unlinked",
"inode", "reserved"};
- log_err( _("Block %llu (0x%llx) seems to be %s, but is "
- "marked as %s in the bitmap.\n"),
+ /* Keep these messages as short as possible, or the output
+ gets to be huge and unmanageable. */
+ log_err( _("Block %llu (0x%llx) was '%s', should be %s.\n"),
(unsigned long long)blk, (unsigned long long)blk,
allocdesc[new_bitmap_state],
allocdesc[old_bitmap_state]);
- if (query( _("Okay to fix the bitmap? (y/n)"))) {
+ if (query( _("Fix the bitmap? (y/n)"))) {
/* If the new bitmap state is free (and therefore the
old state was not) we have to add to the free
space in the rgrp. If the old bitmap state was
diff --git a/gfs2/fsck/pass5.c b/gfs2/fsck/pass5.c
index 742dfca..1c50f55 100644
--- a/gfs2/fsck/pass5.c
+++ b/gfs2/fsck/pass5.c
@@ -81,8 +81,8 @@ static int check_block_status(struct gfs2_sbd *sdp, char *buffer,
unsigned int b
So we ignore it. */
if (rg_status == GFS2_BLKST_UNLINKED &&
block_status == GFS2_BLKST_FREE) {
- log_err( _("Unlinked inode block found at "
- "block %llu (0x%llx).\n"),
+ log_err( _("Unlinked inode found at block %llu "
+ "(0x%llx).\n"),
(unsigned long long)block,
(unsigned long long)block);
if (query(_("Do you want to fix the bitmap? (y/n) "))) {
@@ -114,16 +114,17 @@ static int check_block_status(struct gfs2_sbd *sdp, char *buffer,
unsigned int b
log_err( _("Ondisk status is %u (%s) but FSCK thinks it should be "),
rg_status, blockstatus[rg_status]);
log_err("%u (%s)\n", block_status, blockstatus[block_status]);
- log_err( _("Metadata type is %u (%s)\n"), q,
- block_type_string(q));
+ if (q) /* Don't print redundant "free" */
+ log_err( _("Metadata type is %u (%s)\n"), q,
+ block_type_string(q));
if (query(_("Fix bitmap for block %llu (0x%llx) ? (y/n) "),
(unsigned long long)block,
(unsigned long long)block)) {
if (gfs2_set_bitmap(sdp, block, block_status))
- log_err( _("Failed.\n"));
+ log_err( _("Repair failed.\n"));
else
- log_err( _("Succeeded.\n"));
+ log_err( _("Fixed.\n"));
} else
log_err( _("Bitmap at block %llu (0x%llx) left inconsistent\n"),
(unsigned long long)block,