From 2526eea5dde0aa1af6ff43cf63f6e818798c8f2f Mon Sep 17 00:00:00 2001 From: Anuradha Date: Fri, 27 Sep 2013 17:42:17 +0530 Subject: Logging : Improved the log message on unlock failure in afr_unlock_inodelk_cbk. "unlock failed on 1 unlock" seems meaningless in the log message. Improved it. Change-Id: If67d3f9d4aa5310d0b6728a6c89fa58a5cc93d12 BUG: 1012947 Signed-off-by: Anuradha Reviewed-on: http://review.gluster.org/6012 Reviewed-by: Pranith Kumar Karampuri Tested-by: Gluster Build System --- xlators/cluster/afr/src/afr-lk-common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c index e2136089b..060d78f35 100644 --- a/xlators/cluster/afr/src/afr-lk-common.c +++ b/xlators/cluster/afr/src/afr-lk-common.c @@ -658,6 +658,7 @@ afr_unlock_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, afr_internal_lock_t *int_lock = NULL; afr_inodelk_t *inodelk = NULL; int32_t child_index = (long)cookie; + afr_private_t *priv = NULL; local = frame->local; int_lock = &local->internal_lock; @@ -666,9 +667,12 @@ afr_unlock_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, AFR_UNLOCK_OP, NULL, op_ret, op_errno, child_index); + priv = this->private; + if (op_ret < 0 && op_errno != ENOTCONN && op_errno != EBADFD) { - gf_log (this->name, GF_LOG_INFO, "%s: unlock failed on %d " - "unlock by %s", local->loc.path, child_index, + gf_log (this->name, GF_LOG_INFO, "%s: unlock failed on subvolume %s " + "with lock owner %s", local->loc.path, + priv->children[child_index]->name, lkowner_utoa (&frame->root->lk_owner)); } -- cgit