From 10dfc9b4d4d04314ccd0f6a4eb0ee0341fd91e0d Mon Sep 17 00:00:00 2001 From: arao Date: Fri, 6 Mar 2015 12:33:05 +0530 Subject: afr: Porting messages to new logging framework updated Backport of http://review.gluster.org/9897 Cherry picked from 58a736111fa1db4f10c6646e81066434260f674f >Change-Id: I94ac7b2cb0d43a82cf0eeee21407cff9b575c458 >BUG: 1194640 >Signed-off-by: arao >Signed-off-by: Mohamed Ashiq >Reviewed-on: http://review.gluster.org/9897 >Tested-by: Gluster Build System >Tested-by: NetBSD Build System >Reviewed-by: Pranith Kumar Karampuri Change-Id: I5fb464da38594579f31661b42a8a3e9d858a797e BUG: 1217722 Signed-off-by: arao Signed-off-by: Mohamed Ashiq Reviewed-on: http://review.gluster.org/11351 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Anuradha Talur Reviewed-by: Pranith Kumar Karampuri --- xlators/cluster/afr/src/afr-self-heal-metadata.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'xlators/cluster/afr/src/afr-self-heal-metadata.c') diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c index 11c0c9c8cd9..c4993f11d7d 100644 --- a/xlators/cluster/afr/src/afr-self-heal-metadata.c +++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c @@ -51,7 +51,8 @@ __afr_selfheal_metadata_do (call_frame_t *frame, xlator_t *this, inode_t *inode, loc.inode = inode_ref (inode); gf_uuid_copy (loc.gfid, inode->gfid); - gf_log (this->name, GF_LOG_INFO, "performing metadata selfheal on %s", + gf_msg (this->name, GF_LOG_INFO, 0, + AFR_MSG_SELF_HEAL_INFO, "performing metadata selfheal on %s", uuid_utoa (inode->gfid)); ret = syncop_getxattr (priv->children[source], &loc, &xattr, NULL, @@ -232,7 +233,8 @@ __afr_selfheal_metadata_finalize_source (call_frame_t *frame, xlator_t *this, source = afr_dirtime_splitbrain_source (frame, this, replies, locked_on); if (source != -1) { - gf_log (this->name, GF_LOG_NOTICE, "clear time " + gf_msg (this->name, GF_LOG_INFO, 0, + AFR_MSG_SPLIT_BRAIN, "clear time " "split brain on %s", uuid_utoa (replies[source].poststat.ia_gfid)); sources[source] = 1; @@ -277,10 +279,11 @@ __afr_selfheal_metadata_finalize_source (call_frame_t *frame, xlator_t *this, !IA_EQUAL (first, replies[i].poststat, uid) || !IA_EQUAL (first, replies[i].poststat, gid) || !IA_EQUAL (first, replies[i].poststat, prot)) { - gf_log (this->name, GF_LOG_DEBUG, "%s: iatt mismatch " - "for source(%d) vs (%d)", - uuid_utoa (replies[source].poststat.ia_gfid), - source, i); + gf_msg_debug (this->name, 0, "%s: iatt mismatch " + "for source(%d) vs (%d)", + uuid_utoa + (replies[source].poststat.ia_gfid), + source, i); sources[i] = 0; healed_sinks[i] = 1; } @@ -291,10 +294,11 @@ __afr_selfheal_metadata_finalize_source (call_frame_t *frame, xlator_t *this, continue; if (!afr_xattrs_are_equal (replies[source].xdata, replies[i].xdata)) { - gf_log (this->name, GF_LOG_DEBUG, "%s: xattr mismatch " - "for source(%d) vs (%d)", - uuid_utoa (replies[source].poststat.ia_gfid), - source, i); + gf_msg_debug (this->name, 0, "%s: xattr mismatch " + "for source(%d) vs (%d)", + uuid_utoa + (replies[source].poststat.ia_gfid), + source, i); sources[i] = 0; healed_sinks[i] = 1; } -- cgit