diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2012-11-16 07:08:30 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-12-11 16:23:53 -0800 |
commit | cc9701d4f533bf7337d2925424e2498ab64fdf13 (patch) | |
tree | 565527862f7f235c7b747a325155a126ad006d89 /xlators/cluster/afr/src/afr-self-heal-common.c | |
parent | 179e7333740fe990cac6fc2e63fbace844b17b8d (diff) |
cluster/afr: Remember type of split-brain in inode-ctx
Along with this change, fixed the race of setting the
split-brain status in inode-ctx after unwinding the fop from
self-heal in case of back-ground self-heal.
Change-Id: Ifc829300df485f50f139443802e8b6dc7038b4ad
BUG: 873962
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4198
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-common.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index 07603c5b2a2..a0dfa59d9a6 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -2067,19 +2067,16 @@ afr_self_heal_completion_cbk (call_frame_t *bgsh_frame, xlator_t *this) afr_local_t * orig_frame_local = NULL; afr_self_heal_t * orig_frame_sh = NULL; char sh_type_str[256] = {0,}; - gf_boolean_t split_brain = _gf_false; priv = this->private; local = bgsh_frame->local; sh = &local->self_heal; - if (local->govinda_gOvinda || sh->mdata_spb || sh->data_spb) { - split_brain = _gf_true; + if (local->govinda_gOvinda) { + afr_set_split_brain (this, sh->inode, SPB, SPB); sh->op_failed = 1; } - afr_set_split_brain (this, sh->inode, split_brain); - afr_self_heal_type_str_get (sh, sh_type_str, sizeof(sh_type_str)); if (sh->op_failed) { |