From 2d45a5557f9e6a797e39d3383d851e8812fa91c0 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Mon, 23 Jun 2014 22:59:14 +0530 Subject: features/marker: log message clean up 1. Changed log messages to be more appropriate. 2. Changed loglevel of failures in fop_cbks to be recorded as TRACE. Logging of failures at higher loglevels is unessential in non-endpoint translators. 3. Removed a log message related to memory allocation failure. BUG: 1188066 Change-Id: I63c560c3bbd12706357fb3f696378c1a1e1efb44 Signed-off-by: Vijay Bellur Reviewed-on: http://review.gluster.org/8168 Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY Reviewed-by: Raghavendra G Tested-by: Raghavendra G Reviewed-on: http://review.gluster.org/9525 Reviewed-by: Raghavendra Bhat --- xlators/features/marker/src/marker-quota.c | 7 +++---- xlators/features/marker/src/marker.c | 32 ++++++++++++++---------------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 37c5cfa9225..b8d7a774377 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -557,7 +557,7 @@ mq_readdir_cbk (call_frame_t *frame, local = mq_local_ref (frame->local); if (op_ret == -1) { - gf_log (this->name, GF_LOG_DEBUG, + gf_log (this->name, GF_LOG_TRACE, "readdir failed %s", strerror (op_errno)); local->err = -1; @@ -1295,9 +1295,8 @@ mq_get_parent_inode_local (xlator_t *this, quota_local_t *local) local->ctx = ctx; if (list_empty (&ctx->contribution_head)) { - gf_log_callingfn (this->name, GF_LOG_WARNING, - "contribution node list is empty which " - "is an error"); + gf_log_callingfn (this->name, GF_LOG_ERROR, + "contribution node list is empty"); ret = -1; goto out; } diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index d612d60a239..e9c80440a5e 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -587,7 +587,7 @@ marker_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret == -1) { gf_log (this->name, GF_LOG_TRACE, "error occurred " - "while Creating a file %s", strerror (op_errno)); + "while creating directory %s", strerror (op_errno)); } local = (marker_local_t *) frame->local; @@ -661,7 +661,7 @@ marker_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret == -1) { gf_log (this->name, GF_LOG_TRACE, "error occurred " - "while Creating a file %s", strerror (op_errno)); + "while creating file %s", strerror (op_errno)); } local = (marker_local_t *) frame->local; @@ -1817,8 +1817,8 @@ marker_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this, marker_conf_t *priv = NULL; if (op_ret == -1) { - gf_log (this->name, GF_LOG_TRACE, "%s occurred while " - "creating symlinks ", strerror (op_errno)); + gf_log (this->name, GF_LOG_TRACE, "%s occurred with " + "mknod ", strerror (op_errno)); } local = (marker_local_t *) frame->local; @@ -2357,8 +2357,8 @@ marker_fsetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, marker_conf_t *priv = NULL; if (op_ret == -1) { - gf_log (this->name, GF_LOG_TRACE, "%s occurred while " - "creating symlinks ", strerror (op_errno)); + gf_log (this->name, GF_LOG_TRACE, "%s occurred in " + "fsetxattr", strerror (op_errno)); } local = (marker_local_t *) frame->local; @@ -2425,8 +2425,8 @@ marker_fsetattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, marker_conf_t *priv = NULL; if (op_ret == -1) { - gf_log (this->name, GF_LOG_ERROR, "%s occurred while " - "creating symlinks ", strerror (op_errno)); + gf_log (this->name, GF_LOG_TRACE, "%s occurred in " + "fsetattr ", strerror (op_errno)); } local = (marker_local_t *) frame->local; @@ -2495,8 +2495,7 @@ marker_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, frame->local = NULL; if (op_ret == -1) { - gf_log (this->name, ((op_errno == ENOENT) ? GF_LOG_DEBUG : - GF_LOG_ERROR), + gf_log (this->name, GF_LOG_TRACE, "%s occurred during setattr of %s", strerror (op_errno), (local ? local->loc.path : "")); @@ -2558,8 +2557,10 @@ marker_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, marker_conf_t *priv = NULL; if (op_ret == -1) { - gf_log (this->name, GF_LOG_ERROR, "%s occurred while " - "creating symlinks ", strerror (op_errno)); + gf_log (this->name, GF_LOG_TRACE, + "%s occurred while " + "removing extended attribute", + strerror (op_errno)); } local = (marker_local_t *) frame->local; @@ -2876,7 +2877,7 @@ mem_acct_init (xlator_t *this) if (ret != 0) { gf_log(this->name, GF_LOG_ERROR, "Memory accounting init" - "failed"); + " failed"); return ret; } @@ -2913,14 +2914,11 @@ init_xtime_priv (xlator_t *this, dict_t *options) if (ret == -1){ priv->marker_xattr = NULL; - - gf_log (this->name, GF_LOG_ERROR, - "Failed to allocate memory"); goto out; } gf_log (this->name, GF_LOG_DEBUG, - "the volume-uuid = %s", priv->volume_uuid); + "volume-uuid = %s", priv->volume_uuid); } else { priv->volume_uuid = NULL; -- cgit