Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=205ffdc992e944... Commit: 205ffdc992e944e6bd1db5c7bb024f01d8b6d731 Parent: 0d0256d317fe73aa7e5322df91053e2f4d3408af Author: Bob Peterson rpeterso@redhat.com AuthorDate: Fri Mar 8 09:49:31 2013 -0700 Committer: Bob Peterson rpeterso@redhat.com CommitterDate: Fri May 17 15:16:33 2013 -0500
fsck.gfs2: small cleanups
This patch just fixes some messages that were wrong, adds comments, and so forth.
rhbz#902920 --- gfs2/fsck/metawalk.c | 24 +++++++++++++----------- gfs2/fsck/pass2.c | 9 +++------ gfs2/fsck/util.h | 2 +- 3 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c index 1659da0..8df32a0 100644 --- a/gfs2/fsck/metawalk.c +++ b/gfs2/fsck/metawalk.c @@ -354,14 +354,12 @@ static int check_entries(struct gfs2_inode *ip, struct gfs2_buffer_head *bh,
if (type == DIR_LINEAR) { dent = (struct gfs2_dirent *)(bh->b_data + sizeof(struct gfs2_dinode)); - } - else if (type == DIR_EXHASH) { + } else if (type == DIR_EXHASH) { dent = (struct gfs2_dirent *)(bh->b_data + sizeof(struct gfs2_leaf)); - log_debug( _("Checking leaf %llu (0x%llu)\n"), + log_debug( _("Checking leaf %llu (0x%llx)\n"), (unsigned long long)bh->b_blocknr, (unsigned long long)bh->b_blocknr); - } - else { + } else { log_err( _("Invalid directory type %d specified\n"), type); return -1; } @@ -496,11 +494,12 @@ static int check_leaf(struct gfs2_inode *ip, int lindex, /* Make sure the block number is in range. */ if (!valid_block(ip->i_sbd, *leaf_no)) { log_err( _("Leaf block #%llu (0x%llx) is out of range for " - "directory #%llu (0x%llx).\n"), + "directory #%llu (0x%llx) at index %d (0x%x).\n"), (unsigned long long)*leaf_no, (unsigned long long)*leaf_no, (unsigned long long)ip->i_di.di_num.no_addr, - (unsigned long long)ip->i_di.di_num.no_addr); + (unsigned long long)ip->i_di.di_num.no_addr, + lindex, lindex); msg = _("that is out of range"); goto bad_leaf; } @@ -1332,8 +1331,8 @@ static int check_data(struct gfs2_inode *ip, struct metawalk_fxns *pass,
/** * check_metatree - * @ip: - * @rgd: + * @ip: inode structure in memory + * @pass: structure passed in from caller to determine the sub-functions * */ int check_metatree(struct gfs2_inode *ip, struct metawalk_fxns *pass) @@ -1682,8 +1681,11 @@ void reprocess_inode(struct gfs2_inode *ip, const char *desc) int error;
alloc_fxns.private = (void *)desc; - log_info( _("%s had blocks added; reprocessing its metadata tree " - "at height=%d.\n"), desc, ip->i_di.di_height); + log_info( _("%s inode %llu (0x%llx) had blocks added; reprocessing " + "its metadata tree at height=%d.\n"), desc, + (unsigned long long)ip->i_di.di_num.no_addr, + (unsigned long long)ip->i_di.di_num.no_addr, + ip->i_di.di_height); error = check_metatree(ip, &alloc_fxns); if (error) log_err( _("Error %d reprocessing the %s metadata tree.\n"), diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c index 4000610..f68faab 100644 --- a/gfs2/fsck/pass2.c +++ b/gfs2/fsck/pass2.c @@ -44,9 +44,9 @@ static int set_parent_dir(struct gfs2_sbd *sdp, struct gfs2_inum child, if (di->dinode.no_addr == child.no_addr && di->dinode.no_formal_ino == child.no_formal_ino) { if (di->treewalk_parent) { - log_err( _("Another directory at block %llx (0x%llx) " - "already contains this child %lld (%llx) - " - "checking parent %llx (0x%llx)\n"), + log_err( _("Another directory at block %lld (0x%llx) " + "already contains this child %lld (0x%llx)" + " - checking parent %lld (0x%llx)\n"), (unsigned long long)di->treewalk_parent, (unsigned long long)di->treewalk_parent, (unsigned long long)child.no_addr, @@ -1777,6 +1777,3 @@ int pass2(struct gfs2_sbd *sdp) gfs2_dup_free(); return FSCK_OK; } - - - diff --git a/gfs2/fsck/util.h b/gfs2/fsck/util.h index 3f15fca..a4ff437 100644 --- a/gfs2/fsck/util.h +++ b/gfs2/fsck/util.h @@ -65,7 +65,7 @@ static const inline char *block_type_string(uint8_t q) const char *blktyp[] = { "free", "data", - "indirect data", + "indirect meta", "directory", "file",
cluster-commits@lists.fedorahosted.org