From c693d3b1414dba7066b44fa69c26c300f4906746 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 5 Jun 2012 14:58:53 +0530 Subject: cluster/afr: Don't reset split-brain when data-self-heal is off Change-Id: Id73bdb84c3a1c0af6f0e2954514c3c07c65317bc BUG: 804606 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/3522 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 80e5c043e50..f0fd6ffd005 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -924,7 +924,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.need_data_self_heal = _gf_true; local->self_heal.need_gfid_self_heal = _gf_true; - local->self_heal.need_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 06899265074..3987325b895 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -2254,6 +2254,7 @@ afr_self_heal (call_frame_t *frame, xlator_t *this, inode_t *inode) sh->orig_frame = frame; sh->inode = inode_ref (inode); + sh_local->govinda_gOvinda = afr_is_split_brain (this, sh->inode); sh->completion_cbk = afr_self_heal_completion_cbk; diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index 3762a2742fd..b4d34f2f483 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -603,6 +603,7 @@ afr_sh_data_fix (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; } @@ -635,6 +636,7 @@ afr_sh_data_fix (call_frame_t *frame, xlator_t *this) return 0; } + local->govinda_gOvinda = 0; source = afr_sh_select_source (sh->sources, priv->child_count); if (source == -1) { -- cgit