diff options
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 983f07fcce9..ff136c0b093 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -45,6 +45,10 @@ typedef int (*afr_inode_refresh_cbk_t) (call_frame_t *frame, xlator_t *this, int typedef int (*afr_changelog_resume_t) (call_frame_t *frame, xlator_t *this); +typedef int (*afr_compound_cbk_t) (call_frame_t *frame, void *cookie, + xlator_t *this, int op_ret, int op_errno, + void *data, dict_t *xdata); + #define AFR_COUNT(array,max) ({int __i; int __res = 0; for (__i = 0; __i < max; __i++) if (array[__i]) __res++; __res;}) #define AFR_INTERSECT(dst,src1,src2,max) ({int __i; for (__i = 0; __i < max; __i++) dst[__i] = src1[__i] && src2[__i];}) #define AFR_CMP(a1,a2,len) ({int __cmp = 0; int __i; for (__i = 0; __i < len; __i++) if (a1[__i] != a2[__i]) { __cmp = 1; break;} __cmp;}) @@ -153,6 +157,7 @@ typedef struct _afr_private { char *locking_scheme; gf_boolean_t esh_granular; gf_boolean_t consistent_io; + gf_boolean_t use_compound_fops; } afr_private_t; @@ -786,6 +791,7 @@ typedef struct _afr_local { call_frame_t *heal_frame; gf_boolean_t need_full_crawl; + gf_boolean_t compound; } afr_local_t; @@ -1181,4 +1187,36 @@ afr_is_consistent_io_possible (afr_local_t *local, afr_private_t *priv, void afr_handle_inconsistent_fop (call_frame_t *frame, int32_t *op_ret, int32_t *op_errno); + +void +afr_inode_write_fill (call_frame_t *frame, xlator_t *this, int child_index, + int32_t op_ret, int32_t op_errno, struct iatt *prebuf, + struct iatt *postbuf, dict_t *xdata); +void +afr_process_post_writev (call_frame_t *frame, xlator_t *this); + +void +afr_writev_unwind (call_frame_t *frame, xlator_t *this); + +void +afr_writev_copy_outvars (call_frame_t *src_frame, call_frame_t *dst_frame); + +void +afr_update_uninodelk (afr_local_t *local, afr_internal_lock_t *int_lock, + int32_t child_index); +gf_boolean_t +afr_can_compound_pre_op_and_op (afr_private_t *priv, glusterfs_fop_t fop); + +afr_compound_cbk_t +afr_pack_fop_args (call_frame_t *frame, compound_args_t *args, + glusterfs_fop_t fop, int index); +int +afr_is_inodelk_transaction(afr_local_t *local); + +afr_fd_ctx_t * +__afr_fd_ctx_get (fd_t *fd, xlator_t *this); + +void +afr_compound_cleanup (compound_args_t *args, dict_t *xdata, + dict_t *newloc_xdata); #endif /* __AFR_H__ */ |