diff options
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 68087e0ea20..d32ff5f8d85 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -36,7 +36,8 @@ #define ARBITER_BRICK_INDEX 2 #define THIN_ARBITER_BRICK_INDEX 2 -#define THIN_ARBITER_DOM1 "afr.ta.domain-1" +#define AFR_TA_DOM_NOTIFY "afr.ta.dom-notify" +#define AFR_TA_DOM_MODIFY "afr.ta.dom-modify" #define AFR_HALO_MAX_LATENCY 99999 typedef int (*afr_lock_cbk_t) (call_frame_t *frame, xlator_t *this); @@ -73,6 +74,12 @@ typedef enum { AFR_FAV_CHILD_POLICY_MAX, } afr_favorite_child_policy; +typedef enum { + AFR_CHILD_UNKNOWN = -1, + AFR_CHILD_ZERO, + AFR_CHILD_ONE, +} afr_child_index; + struct afr_nfsd { gf_boolean_t iamnfsd; uint32_t halo_max_latency_msec; @@ -83,12 +90,16 @@ typedef struct _afr_private { unsigned int child_count; /* total number of children */ unsigned int arbiter_count; /*subset of child_count. Has to be 0 or 1.*/ - unsigned int thin_arbiter_count; /* 0 or 1 at the moment.*/ xlator_t **children; inode_t *root_inode; - uuid_t ta_gfid; /*For thin arbiter.*/ + + /* For thin-arbiter. */ + unsigned int thin_arbiter_count; /* 0 or 1 at the moment.*/ + uuid_t ta_gfid; + int ta_bad_child_index; + off_t ta_notify_dom_lock_offset; unsigned char *child_up; int64_t *child_latency; @@ -1229,4 +1240,13 @@ afr_write_subvol_reset (call_frame_t *frame, xlator_t *this); int afr_set_inode_local (xlator_t *this, afr_local_t *local, inode_t *inode); + +int +afr_fill_ta_loc (xlator_t *this, loc_t *loc); + +int +afr_ta_post_op_lock (xlator_t *this, loc_t *loc); + +int +afr_ta_post_op_unlock (xlator_t *this, loc_t *loc); #endif /* __AFR_H__ */ |