From 57dfa97d4f84d426969591d3c0c674bdd54de450 Mon Sep 17 00:00:00 2001 From: Anuradha Talur Date: Fri, 11 Sep 2015 18:43:36 +0530 Subject: afr : get split-brain-status in a synctask Backport of: http://review.gluster.org/#/c/12163/ On executing `getfattr -n replica.split-brain-status ` on mount, there is a possibility that the mount hangs. To avoid this hang, fetch the split-brain-status of a file in synctask. >Change-Id: I87b781419ffc63248f915325b845e3233143d385 >BUG: 1262345 >Signed-off-by: Anuradha Talur Change-Id: I9f4f4b54e108d3a0017264353b8272e072170c16 BUG: 1262547 Signed-off-by: Anuradha Talur Reviewed-on: http://review.gluster.org/12166 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri --- xlators/cluster/afr/src/afr.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'xlators/cluster/afr/src/afr.h') diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 008839a7312..870d26b7689 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -755,6 +755,11 @@ typedef struct afr_spbc_timeout { int spb_child_index; } afr_spbc_timeout_t; +typedef struct afr_spb_status { + call_frame_t *frame; + loc_t *loc; +} afr_spb_status_t; + typedef struct afr_read_subvol_args { ia_type_t ia_type; uuid_t gfid; @@ -1050,14 +1055,16 @@ gf_boolean_t afr_is_xattr_ignorable (char *key); int -afr_get_heal_info (call_frame_t *frame, xlator_t *this, loc_t *loc, - dict_t *xdata); +afr_get_heal_info (call_frame_t *frame, xlator_t *this, loc_t *loc); int afr_heal_splitbrain_file(call_frame_t *frame, xlator_t *this, loc_t *loc); int -afr_get_split_brain_status (call_frame_t *frame, xlator_t *this, loc_t *loc); +afr_get_split_brain_status (void *opaque); + +int +afr_get_split_brain_status_cbk (int ret, call_frame_t *frame, void *opaque); int afr_inode_split_brain_choice_set (inode_t *inode, xlator_t *this, -- cgit