summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/call-stub.h
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2017-08-22 13:44:52 +0530
committerAmar Tumballi <amarts@redhat.com>2017-12-05 21:23:57 +0000
commitefad78260379f0ca836e8a2327b97dd620acd098 (patch)
treea80201543e9e1851fa05580b0f9b7f1e75b2e9b1 /libglusterfs/src/call-stub.h
parentee20190a3a6e36b97c4914e0fa486017e72b0375 (diff)
rio/everywhere: add icreate/namelink fop
icreate creates inode, while namelink links the basename to it's parent gfid. For now mkdir is the primary user of these fops. Better distribution is acheived by creating the inode on ,(say) mds1 and linking the basename to it's parent gfid on mds2. The inode serves readdirp, stat etc. More details about the fops are present at: https://review.gluster.org/#/c/13395/3/design/DHT2/DHT2_Icreate_Namelink_Notes.md This backport of three patches from experimental branch. 1- https://review.gluster.org/#/c/18085/ 2- https://review.gluster.org/#/c/18086/ 3- https://review.gluster.org/#/c/18094/ Updates gluster/glusterfs#243 Change-Id: I1bd3d5a441a3cfab1acfeb52f15c6c867d362592 Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'libglusterfs/src/call-stub.h')
-rw-r--r--libglusterfs/src/call-stub.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/libglusterfs/src/call-stub.h b/libglusterfs/src/call-stub.h
index 4d86a517537..e20f6a5a096 100644
--- a/libglusterfs/src/call-stub.h
+++ b/libglusterfs/src/call-stub.h
@@ -78,6 +78,8 @@ typedef struct _call_stub {
fop_getactivelk_t getactivelk;
fop_setactivelk_t setactivelk;
fop_put_t put;
+ fop_icreate_t icreate;
+ fop_namelink_t namelink;
} fn;
union {
@@ -131,6 +133,8 @@ typedef struct _call_stub {
fop_getactivelk_cbk_t getactivelk;
fop_setactivelk_cbk_t setactivelk;
fop_put_cbk_t put;
+ fop_icreate_cbk_t icreate;
+ fop_namelink_cbk_t namelink;
} fn_cbk;
default_args_t args;
@@ -776,6 +780,26 @@ fop_put_cbk_stub (call_frame_t *frame, fop_put_cbk_t fn, int32_t op_ret,
struct iatt *preparent, struct iatt *postparent,
dict_t *xdata);
+call_stub_t *
+fop_icreate_stub (call_frame_t *frame, fop_icreate_t fn,
+ loc_t *loc, mode_t mode, dict_t *xdata);
+
+call_stub_t *
+fop_namelink_stub (call_frame_t *frame,
+ fop_namelink_t fn, loc_t *loc, dict_t *xdata);
+
+call_stub_t *
+fop_icreate_cbk_stub (call_frame_t *frame,
+ fop_icreate_cbk_t fn,
+ int32_t op_ret, int32_t op_errno,
+ inode_t *inode, struct iatt *buf, dict_t *xdata);
+
+call_stub_t *
+fop_namelink_cbk_stub (call_frame_t *frame,
+ fop_namelink_cbk_t fn,
+ int32_t op_ret, int32_t op_errno,
+ struct iatt *prebuf, struct iatt *postbuf, dict_t *xdata);
+
void call_resume (call_stub_t *stub);
void call_resume_keep_stub (call_stub_t *stub);
void call_stub_destroy (call_stub_t *stub);