From b96d9cbf7300e515a8de8d7d90c61110b5301f37 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 6 Jun 2011 03:22:01 +0000 Subject: cluster/afr: Log errors in afr self-heal with GF_LOG_ERROR Signed-off-by: Pranith Kumar K Signed-off-by: Anand Avati BUG: 2986 (Failed operations should should be logged `E' or `W') URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2986 --- xlators/cluster/afr/src/afr-self-heal-data.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'xlators/cluster/afr/src/afr-self-heal-data.c') diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index 950fcb16735..13aa054dc75 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -75,10 +75,6 @@ afr_sh_data_done (call_frame_t *frame, xlator_t *this) /* for (i = 0; i < priv->child_count; i++) */ /* sh->locked_nodes[i] = 0; */ - gf_log (this->name, GF_LOG_TRACE, - "self heal of %s completed", - local->loc.path); - sh->completion_cbk (frame, this); return 0; @@ -902,18 +898,21 @@ afr_sh_data_post_nonblocking_inodelk_cbk (call_frame_t *frame, xlator_t *this) { afr_internal_lock_t *int_lock = NULL; afr_local_t *local = NULL; + afr_self_heal_t *sh = NULL; local = frame->local; int_lock = &local->internal_lock; + sh = &local->self_heal; if (int_lock->lock_op_ret < 0) { - gf_log (this->name, GF_LOG_INFO, - "Non Blocking inodelks failed."); + gf_log (this->name, GF_LOG_ERROR, "Non Blocking data inodelks " + "failed for %s.", local->loc.path); + sh->op_failed = 1; afr_sh_data_done (frame, this); } else { - gf_log (this->name, GF_LOG_DEBUG, - "Non Blocking inodelks done. Proceeding to FOP"); + gf_log (this->name, GF_LOG_DEBUG, "Non Blocking data inodelks " + "done for %s. Proceeding to FOP", local->loc.path); afr_sh_data_fxattrop (frame, this); } @@ -943,7 +942,6 @@ afr_sh_data_lock_rec (call_frame_t *frame, xlator_t *this) afr_nonblocking_inodelk (frame, this); - return 0; } @@ -995,7 +993,7 @@ afr_sh_data_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, LOCK (&frame->lock); { if (op_ret == -1) { - gf_log (this->name, GF_LOG_INFO, + gf_log (this->name, GF_LOG_ERROR, "open of %s failed on child %s (%s)", local->loc.path, priv->children[child_index]->name, -- cgit