diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2011-11-08 22:21:30 +0530 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-11-09 09:57:20 -0800 |
commit | d2a05724a647c9ca38e14cc35be405074ff6795d (patch) | |
tree | fda008bc07aeac2cedde4c43f9bd43a9bb04def3 /xlators/cluster/afr/src/afr-self-heal-entry.c | |
parent | a9b785b84e509c4dd9ffe3e580201ae1f000599d (diff) |
cluster/afr: Handle split-brain/all-fool xattrs for directoryv3.2.5qa7
Change-Id: I058ed91494e1a9bbcf5e6e6c49e8ee4f7e014e23
BUG: 3796
Reviewed-on: http://review.gluster.com/695
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-entry.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 16dd46d2ee1..161b870f509 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -1613,7 +1613,7 @@ afr_sh_need_recreate (afr_self_heal_t *impunge_sh, int *sources, GF_ASSERT (sources); success_children = impunge_sh->child_success; - if (sources[child] || (child == impunge_sh->active_source)) { + if (child == impunge_sh->active_source) { GF_ASSERT (afr_is_child_present (success_children, child_count, child)); goto out; @@ -2135,10 +2135,10 @@ void afr_sh_entry_fix (call_frame_t *frame, xlator_t *this, int32_t op_ret, int32_t op_errno) { - afr_local_t *local = NULL; - afr_self_heal_t *sh = NULL; - afr_private_t *priv = NULL; - int source = 0; + afr_local_t *local = NULL; + afr_self_heal_t *sh = NULL; + afr_private_t *priv = NULL; + afr_source_flags_t flags = 0; int nsources = 0; @@ -2166,7 +2166,7 @@ afr_sh_entry_fix (call_frame_t *frame, xlator_t *this, nsources = afr_mark_sources (sh->sources, sh->pending_matrix, sh->buf, priv->child_count, AFR_SELF_HEAL_ENTRY, - sh->child_success, this->name); + sh->child_success, this->name, &flags); if (nsources == 0) { gf_log (this->name, GF_LOG_TRACE, @@ -2177,10 +2177,7 @@ afr_sh_entry_fix (call_frame_t *frame, xlator_t *this, return; } - source = afr_sh_select_source (sh->sources, priv->child_count); - - sh->source = source; - + sh->source = afr_sh_select_source (sh->sources, priv->child_count); heal: afr_sh_entry_sync_prepare (frame, this); |