gfs2-utils: master - fsck.gfs2: Make debug messages more succinct wrt extended attributes

Bob Peterson rpeterso at fedoraproject.org
Tue Sep 29 18:37:53 UTC 2015


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=65306dde6b09e1c70a4b579fe9df0a19c89dc2f5
Commit:        65306dde6b09e1c70a4b579fe9df0a19c89dc2f5
Parent:        ec1544385e555a8c890ee4ff4fafc948bc258bc5
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Wed Sep 23 12:22:33 2015 -0500
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Tue Sep 29 13:22:59 2015 -0500

fsck.gfs2: Make debug messages more succinct wrt extended attributes

This patch changes function check_inode_eattr, which is called from
several passes, to remove the debug message that says basically
Extended attributes exist for inode X. That way the debug output is
not cluttered with those messages for every inode for every pass.
Instead, the existing message regarding the processing of EA leaf blocks
has been enhanced to add the inode number. Similarly, a new debug
message was added to function check_inode_eattr for indirect EA block
processing. This makes the output much more clear.
---
 gfs2/fsck/metawalk.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index 9923d94..1ecd756 100644
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawalk.c
@@ -955,9 +955,12 @@ static int check_leaf_eattr(struct gfs2_inode *ip, uint64_t block,
 	if (pass->check_eattr_leaf) {
 		int error = 0;
 
-		log_debug( _("Checking EA leaf block #%llu (0x%llx).\n"),
+		log_debug( _("Checking EA leaf block #%llu (0x%llx) for "
+			     "inode #%llu (0x%llx).\n"),
 			   (unsigned long long)block,
-			   (unsigned long long)block);
+			   (unsigned long long)block,
+			   (unsigned long long)ip->i_di.di_num.no_addr,
+			   (unsigned long long)ip->i_di.di_num.no_addr);
 
 		error = pass->check_eattr_leaf(ip, block, parent, &bh,
 					       pass->private);
@@ -1175,11 +1178,13 @@ int check_inode_eattr(struct gfs2_inode *ip, struct metawalk_fxns *pass)
 	if (!ip->i_di.di_eattr)
 		return 0;
 
-	log_debug( _("Extended attributes exist for inode #%llu (0x%llx).\n"),
-		  (unsigned long long)ip->i_di.di_num.no_addr,
-		  (unsigned long long)ip->i_di.di_num.no_addr);
-
 	if (ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT){
+		log_debug( _("Checking EA indirect block #%llu (0x%llx) for "
+			     "inode #%llu (0x%llx)..\n"),
+			   (unsigned long long)ip->i_di.di_eattr,
+			   (unsigned long long)ip->i_di.di_eattr,
+			   (unsigned long long)ip->i_di.di_num.no_addr,
+			   (unsigned long long)ip->i_di.di_num.no_addr);
 		if ((error = check_indirect_eattr(ip, ip->i_di.di_eattr, pass)))
 			stack;
 	} else {


More information about the cluster-commits mailing list