From d2a05724a647c9ca38e14cc35be405074ff6795d Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 8 Nov 2011 22:21:30 +0530 Subject: cluster/afr: Handle split-brain/all-fool xattrs for directory Change-Id: I058ed91494e1a9bbcf5e6e6c49e8ee4f7e014e23 BUG: 3796 Reviewed-on: http://review.gluster.com/695 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-self-heal-common.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 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 d58fdb7654e..b313c17e984 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.h +++ b/xlators/cluster/afr/src/afr-self-heal-common.h @@ -34,6 +34,11 @@ 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); @@ -59,7 +64,8 @@ afr_sh_pending_to_delta (afr_private_t *priv, dict_t **xattr, 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); + int32_t *valid_children, const char *xlator_name, + afr_source_flags_t *flags); int afr_sh_delta_to_xattr (afr_private_t *priv, @@ -79,7 +85,8 @@ afr_self_heal_type_for_transaction (afr_transaction_type type); int afr_build_sources (xlator_t *xlator, dict_t **xattr, struct iatt *bufs, int32_t **pending_matrix, int32_t *sources, - int32_t *success_children, afr_transaction_type type); + int32_t *success_children, afr_transaction_type type, + afr_source_flags_t *flags); void afr_sh_common_reset (afr_self_heal_t *sh, unsigned int child_count); int -- cgit