summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-05-25 09:49:58 +0530
committerAnand Avati <avati@redhat.com>2012-06-19 13:47:04 -0700
commitfe8572380620d2ec7e95f9b6304ed735f013aa1c (patch)
tree7cae0339efcad2764bfe777d347f7c21fff262b1
parent3709b2860688f4f9645a52006e3ede35b7d02830 (diff)
cluster/afr: Don't reset split-brain when data-self-heal is off
BUG: 804606 Change-Id: I8cefcb6efa687fac4ad412403c085b3767218f72 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3586 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--xlators/cluster/afr/src/afr-common.c1
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c1
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c4
3 files changed, 4 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index f27227c4c9a..09b0195cd0b 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -1265,7 +1265,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 5d0db8f637d..c4384ebc572 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -2239,7 +2239,6 @@ afr_self_heal (call_frame_t *frame, xlator_t *this, inode_t *inode)
sh = &sh_local->self_heal;
sh->inode = inode_ref (inode);
-
sh->orig_frame = frame;
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 93b64529543..7186da710b3 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,
@@ -1393,6 +1395,8 @@ afr_self_heal_data (call_frame_t *frame, xlator_t *this)
local = frame->local;
sh = &local->self_heal;
+ local->govinda_gOvinda = afr_is_split_brain (this, sh->inode);
+
if (sh->do_data_self_heal &&
afr_data_self_heal_enabled (priv->data_self_heal)) {
afr_sh_data_open (frame, this);