summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-08-24 11:52:01 +0530
committerAnand Avati <avati@redhat.com>2012-08-29 20:49:37 -0700
commita9ba00f5e4f9f00464c109bc41ec73725722f692 (patch)
tree287812dba13bfe1c35558df13763c6e3fd9d69de /xlators/cluster
parente442b07f1d77e059e4b009adb4c9d0273850dcf5 (diff)
cluster/afr: Don't stop entry/data self-heal on metadata split-brain
Problem: Entry/Data self-heal is orthogonal to meta-data self-heal. meta-data split-brain should not affect entry/data self-heal. Fix: Prevented aborting rest of the self-heals when metadata split-brain happens. Tests: 1) Simulated meta-data split-brain then checked data-self-heal succeed on regular file, entry-self-heal succeed on dir. 2) Reset meta-data change-log on one of the subvols and checked that meta-data self-heal also completes. 3) Executed self-heal sanity script. Change-Id: I05ca222d855d3a6000703e3775471d0f874d35d6 BUG: 851451 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3853 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <obdurodon@gmail.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c4
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-metadata.c14
2 files changed, 6 insertions, 12 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index a081904803f..b6593a7ec6f 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -2163,8 +2163,10 @@ afr_self_heal_completion_cbk (call_frame_t *bgsh_frame, xlator_t *this)
local = bgsh_frame->local;
sh = &local->self_heal;
- if (local->govinda_gOvinda || sh->mdata_spb || sh->data_spb)
+ if (local->govinda_gOvinda || sh->mdata_spb || sh->data_spb) {
split_brain = _gf_true;
+ sh->op_failed = 1;
+ }
afr_set_split_brain (this, sh->inode, split_brain);
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c
index 4f81c1cf582..6e98f2a6375 100644
--- a/xlators/cluster/afr/src/afr-self-heal-metadata.c
+++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c
@@ -50,20 +50,12 @@ afr_sh_metadata_done (call_frame_t *frame, xlator_t *this)
sh = &local->self_heal;
afr_sh_reset (frame, this);
- if (sh->mdata_spb) {
+ if (IA_ISDIR (sh->type)) {
gf_log (this->name, GF_LOG_DEBUG,
- "split-brain detected, aborting selfheal of %s",
+ "proceeding to entry check on %s",
local->loc.path);
- sh->op_failed = 1;
- sh->completion_cbk (frame, this);
+ afr_self_heal_entry (frame, this);
} else {
- if (IA_ISDIR (sh->type)) {
- gf_log (this->name, GF_LOG_DEBUG,
- "proceeding to entry check on %s",
- local->loc.path);
- afr_self_heal_entry (frame, this);
- return 0;
- }
gf_log (this->name, GF_LOG_DEBUG,
"proceeding to data check on %s",
local->loc.path);