From 45a0a14095f67136a0718a58e2c0d48a46ad82d9 Mon Sep 17 00:00:00 2001 From: Bob Peterson Date: May 25 2016 15:08:06 +0000 Subject: 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. --- 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 {