From 7f52ce36d1a378c0983fb00c06032297033e350d Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 25 May 2012 09:49:58 +0530 Subject: cluster/afr: Don't reset split-brain when data-self-heal is off Change-Id: Ie3b2c19e0bee85f64d4c2522beaf7d08e46b8a9e BUG: 804606 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/3466 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr-common.c | 1 - xlators/cluster/afr/src/afr-self-heal-common.c | 1 + xlators/cluster/afr/src/afr-self-heal-data.c | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 06b2c0ef225..7973dfdde04 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -1221,7 +1221,6 @@ afr_detect_self_heal_by_lookup_status (afr_local_t *local, xlator_t *this, IA_ISREG (local->cont.lookup.inode->ia_type)) { local->self_heal.do_data_self_heal = _gf_true; local->self_heal.do_gfid_self_heal = _gf_true; - local->self_heal.do_missing_entry_self_heal = _gf_true; gf_log (this->name, GF_LOG_WARNING, "split brain detected during lookup of %s.", local->loc.path); diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index e0af66952ac..6d23494987a 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -2219,6 +2219,7 @@ afr_self_heal (call_frame_t *frame, xlator_t *this, inode_t *inode) sh = &sh_local->self_heal; sh->inode = inode_ref (inode); + sh_local->govinda_gOvinda = afr_is_split_brain (this, sh->inode); sh->orig_frame = frame; diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index ba1c99bcb39..462ee88237f 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -745,6 +745,7 @@ afr_sh_data_fxattrop_fstat_done (call_frame_t *frame, xlator_t *this) "No self-heal needed for %s", local->loc.path); + local->govinda_gOvinda = 0; afr_sh_data_finish (frame, this); return 0; } @@ -776,6 +777,7 @@ afr_sh_data_fxattrop_fstat_done (call_frame_t *frame, xlator_t *this) return 0; } + local->govinda_gOvinda = 0; ret = afr_sh_inode_set_read_ctx (sh, this); if (ret) { gf_log (this->name, GF_LOG_DEBUG, -- cgit