diff options
author | Anuradha Talur <atalur@redhat.com> | 2015-09-11 18:43:36 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-09-15 19:22:58 -0700 |
commit | 57dfa97d4f84d426969591d3c0c674bdd54de450 (patch) | |
tree | 4113e9d980021daee61df39f3c53338a832f74cc /xlators/cluster/afr/src/afr.h | |
parent | 2e65b7aa6fe8fd03c1bea83d8b1d81ed4a774207 (diff) |
afr : get split-brain-status in a synctask
Backport of: http://review.gluster.org/#/c/12163/
On executing `getfattr -n replica.split-brain-status <file>` 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 <atalur@redhat.com>
Change-Id: I9f4f4b54e108d3a0017264353b8272e072170c16
BUG: 1262547
Signed-off-by: Anuradha Talur <atalur@redhat.com>
Reviewed-on: http://review.gluster.org/12166
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 13 |
1 files changed, 10 insertions, 3 deletions
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, |