diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2011-06-06 03:10:39 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-06-08 03:03:02 -0700 |
commit | 99588612db403dffdb6380ceaaec1a8b10a3be5d (patch) | |
tree | 35342357d407491a5f0d733c18d5a1caf913ea1e /xlators/cluster/afr/src/afr-self-heal-metadata.c | |
parent | c997393c8a546e28648d56d2e86651f4bb4b38d8 (diff) |
cluster/afr: Log errors in afr self-heal with GF_LOG_ERROR
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2986 (Failed operations should should be logged `E' or `W')
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2986
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-metadata.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-metadata.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c index ee27a7bd1..7ad1ce69a 100644 --- a/xlators/cluster/afr/src/afr-self-heal-metadata.c +++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c @@ -77,8 +77,9 @@ afr_sh_metadata_done (call_frame_t *frame, xlator_t *this) if (local->govinda_gOvinda) { gf_log (this->name, GF_LOG_INFO, - "aborting selfheal of %s", + "split-brain detected, aborting selfheal of %s", local->loc.path); + sh->op_failed = 1; sh->completion_cbk (frame, this); } else { if (IA_ISREG (sh->type)) { @@ -96,10 +97,6 @@ afr_sh_metadata_done (call_frame_t *frame, xlator_t *this) afr_self_heal_entry (frame, this); return 0; } - gf_log (this->name, GF_LOG_DEBUG, - "completed self heal of %s", - local->loc.path); - sh->completion_cbk (frame, this); } @@ -661,7 +658,8 @@ afr_sh_metadata_lookup (call_frame_t *frame, xlator_t *this) } int -afr_sh_post_nonblocking_inodelk_cbk (call_frame_t *frame, xlator_t *this) +afr_sh_metadata_post_nonblocking_inodelk_cbk (call_frame_t *frame, + xlator_t *this) { afr_internal_lock_t *int_lock = NULL; afr_local_t *local = NULL; @@ -670,13 +668,16 @@ afr_sh_post_nonblocking_inodelk_cbk (call_frame_t *frame, xlator_t *this) int_lock = &local->internal_lock; if (int_lock->lock_op_ret < 0) { - gf_log (this->name, GF_LOG_DEBUG, - "Non Blocking inodelks failed."); + gf_log (this->name, GF_LOG_ERROR, "Non Blocking metadata " + "inodelks failed for %s.", local->loc.path); + gf_log (this->name, GF_LOG_ERROR, "Metadata self-heal " + "failed for %s.", local->loc.path); afr_sh_metadata_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 metadata " + "inodelks done for %s. Proceeding to FOP", + local->loc.path); afr_sh_metadata_lookup (frame, this); } @@ -700,7 +701,7 @@ afr_sh_metadata_lock (call_frame_t *frame, xlator_t *this) int_lock->lk_flock.l_start = 0; int_lock->lk_flock.l_len = 0; int_lock->lk_flock.l_type = F_WRLCK; - int_lock->lock_cbk = afr_sh_post_nonblocking_inodelk_cbk; + int_lock->lock_cbk = afr_sh_metadata_post_nonblocking_inodelk_cbk; afr_nonblocking_inodelk (frame, this); |