summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.h
diff options
context:
space:
mode:
authorAnuradha Talur <atalur@redhat.com>2016-08-25 11:46:25 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-09-01 10:22:39 -0700
commitbefae0b48729894282b5b8b174907e24779c3442 (patch)
tree1f43412cb788a40ddc547e15fe71e16f39fd1442 /xlators/cluster/afr/src/afr.h
parent68b23745602e4cc6317d6dce72ed0392d4174972 (diff)
afr: Consume compound fops in afr transaction
Change-Id: Ib06ece3cce1b10d28d6d2953da28444f5c2457ad BUG: 1290304 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/15014 Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.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.h38
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__ */