diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-06-27 16:42:35 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-07-26 10:14:54 -0700 |
commit | f153c835807ac31006ba690b1deb47b20b51bc83 (patch) | |
tree | 563b61874ec5304116d92f39bb6e1f749b1c6d3f /xlators/cluster/afr/src/afr.h | |
parent | c2a7a22bfe18316eab441d49e515726e53f74582 (diff) |
cluster/afr: Modified split-brain handling
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.
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.
Fix
Self-heals are launched to inspect xattrs even when the
data/metadata self-heal options are turned off. The decision
to heal data/metadata after the xattrs are inspected is based
on whether the options are turned on/off. So decision to set/reset
split-brain flag is taken inside appropriate locks.
Testcases:
tests 33-36 in
https://github.com/pranithk/gluster-tests/blob/master/afr/self-heal.sh
Change-Id: Ia8aeab08208b50c06609ad35a9d72f3d553ee343
BUG: 833727
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3626
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index abb95533449..5ed478c4a2f 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -170,6 +170,8 @@ typedef struct { gf_boolean_t do_entry_self_heal; gf_boolean_t do_gfid_self_heal; gf_boolean_t do_missing_entry_self_heal; + gf_boolean_t force_confirm_spb; /* Check for split-brains even when + self-heal is turned off */ gf_boolean_t forced_merge; /* Is this a self-heal triggered to forcibly merge the directories? */ @@ -266,6 +268,8 @@ typedef struct { int (*algo_completion_cbk) (call_frame_t *frame, xlator_t *this); int (*algo_abort_cbk) (call_frame_t *frame, xlator_t *this); void (*gfid_sh_success_cbk) (call_frame_t *sh_frame, xlator_t *this); + gf_boolean_t mdata_spb; + gf_boolean_t data_spb; call_frame_t *sh_frame; } afr_self_heal_t; @@ -444,7 +448,9 @@ typedef struct _afr_local { int32_t read_child; int32_t *sources; int32_t *success_children; + int32_t **pending_matrix; gf_boolean_t fresh_lookup; + gf_boolean_t possible_spb; } lookup; struct { |