summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-common.h
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-01-20 17:30:54 +0530
committerAnand Avati <avati@redhat.com>2012-03-12 19:37:26 -0700
commit154a59a6e0988194c6a6e17527a30cca47a697f9 (patch)
tree6b7e2bcd6acead9d64430847ef848f35daff0861 /xlators/cluster/afr/src/afr-self-heal-common.h
parentfafd5c17c0d126e10b401199cd4f01f7786deef8 (diff)
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 <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2674 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.h')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.h17
1 files changed, 6 insertions, 11 deletions
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