From 154a59a6e0988194c6a6e17527a30cca47a697f9 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 20 Jan 2012 17:30:54 +0530 Subject: cluster/afr: Handle split-brain/all-fool xattrs for directory In case of split-brain/all-fool xattrs perform conservative merge. Don't treat ignorant subvol as fool. Change-Id: I3044d388d816d79268fec170d202ef23e7d5bf1c BUG: 765528 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/2674 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-self-heal-common.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'xlators/cluster/afr/src/afr-self-heal-common.h') diff --git a/xlators/cluster/afr/src/afr-self-heal-common.h b/xlators/cluster/afr/src/afr-self-heal-common.h index b313c17e9..1e325685d 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.h +++ b/xlators/cluster/afr/src/afr-self-heal-common.h @@ -34,11 +34,6 @@ typedef enum { AFR_LOOKUP_FAIL_MISSING_GFIDS = 2, } afr_lookup_flags_t; -typedef enum { - AFR_SPLIT_BRAIN = 1, - AFR_ALL_FOOLS =2 -} afr_source_flags_t; - int afr_sh_select_source (int sources[], int child_count); @@ -53,6 +48,7 @@ afr_sh_print_pending_matrix (int32_t *pending_matrix[], xlator_t *this); int afr_build_pending_matrix (char **pending_key, int32_t **pending_matrix, + unsigned char *ignorant_subvols, dict_t *xattr[], afr_transaction_type type, size_t child_count); @@ -62,10 +58,9 @@ afr_sh_pending_to_delta (afr_private_t *priv, dict_t **xattr, int child_count, afr_transaction_type type); int -afr_mark_sources (int32_t *sources, int32_t **pending_matrix, struct iatt *bufs, - int32_t child_count, afr_self_heal_type type, - int32_t *valid_children, const char *xlator_name, - afr_source_flags_t *flags); +afr_mark_sources (xlator_t *this, int32_t *sources, int32_t **pending_matrix, + struct iatt *bufs, afr_self_heal_type type, + int32_t *success_children, int32_t *subvol_status); int afr_sh_delta_to_xattr (afr_private_t *priv, @@ -83,10 +78,10 @@ afr_self_heal_type afr_self_heal_type_for_transaction (afr_transaction_type type); int -afr_build_sources (xlator_t *xlator, dict_t **xattr, struct iatt *bufs, +afr_build_sources (xlator_t *this, dict_t **xattr, struct iatt *bufs, int32_t **pending_matrix, int32_t *sources, int32_t *success_children, afr_transaction_type type, - afr_source_flags_t *flags); + int32_t *subvol_status, gf_boolean_t ignore_ignorant); void afr_sh_common_reset (afr_self_heal_t *sh, unsigned int child_count); int -- cgit