From a9ba00f5e4f9f00464c109bc41ec73725722f692 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 24 Aug 2012 11:52:01 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/3853 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-self-heal-metadata.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'xlators/cluster/afr/src/afr-self-heal-metadata.c') 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); -- cgit