diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-07-18 10:28:18 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-08-12 21:51:39 -0700 |
commit | 12aa31278c651f36c2ea1c0698ba789aa3f9262c (patch) | |
tree | 21642a29f8456553dea1c0ca26feda431c850ff4 /xlators/cluster/afr/src/afr-self-heal-common.c | |
parent | aa4e7d04ff20e38182a62576595951d59524fff0 (diff) |
cluster/afr: Avoid setting split-brain outside inode locks
RCA:
The bug is observed because the decision to mark
a file in split-brain is taken outside appropriate locks.
Lookup gathers xattrs outside any lock. The xattrs being
in split-brain in lookup should only be taken as a hint.
Appropriate inodelks should be taken before confirming
a split-brain. Self-heal confirms this at the moment.
Fix:
Self-heals are launched to inspect xattrs when the
data/metadata self-heal options are turned on.
Decision to set/reset split-brain flag is taken inside
appropriate locks.
Known Issue After fix:
If data/metadata self-heal is turned off, inspecting of
xattrs could not be performed so split-brain behavior
does not work correctly if the self-heal options are turned off.
This bug is handled only in upstream.
Change-Id: I59a43d5ce7bf9ca35bff54a51bf4cfa55d717a9e
BUG: 833727
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3691
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index 9e493092e2a..be8809a5de7 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -2144,7 +2144,7 @@ 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) + if (local->govinda_gOvinda || sh->mdata_spb || sh->data_spb) split_brain = _gf_true; afr_set_split_brain (this, sh->inode, split_brain); |