summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-metadata.c
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2011-06-09 04:00:40 +0000
committerAnand Avati <avati@gluster.com>2011-06-09 07:41:28 -0700
commit272d43e6721d559594375e385b42e88122b42bd9 (patch)
treed9d5eba425c9fd11ba0b264b5de917e86cca3127 /xlators/cluster/afr/src/afr-self-heal-metadata.c
parent1a06583bc6ad298c97bdbafbcc0246bddc0ce301 (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.c23
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 e76d58850cd..ee4daf4b562 100644
--- a/xlators/cluster/afr/src/afr-self-heal-metadata.c
+++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c
@@ -76,9 +76,10 @@ afr_sh_metadata_done (call_frame_t *frame, xlator_t *this)
}
if (local->govinda_gOvinda) {
- gf_log (this->name, GF_LOG_DEBUG,
- "aborting selfheal of %s",
+ gf_log (this->name, GF_LOG_INFO,
+ "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,9 +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);
}
@@ -664,7 +662,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;
@@ -673,13 +672,15 @@ 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. Metadata self-heal "
+ "failed", 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);
}
@@ -703,7 +704,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);