summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.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/xlator.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/xlator.h')
-rw-r--r--libglusterfs/src/xlator.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index a3115f09c52..81199bd1809 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -471,6 +471,16 @@ typedef int32_t (*fop_put_cbk_t) (call_frame_t *frame, void *cookie,
struct iatt *buf, struct iatt *preparent,
struct iatt *postparent, dict_t *xdata);
+typedef int32_t (*fop_icreate_cbk_t) (call_frame_t *frame, void *cookie,
+ xlator_t *this, int32_t op_ret,
+ int32_t op_errno, inode_t *inode,
+ struct iatt *buf, dict_t *xdata);
+
+typedef int32_t (*fop_namelink_cbk_t) (call_frame_t *frame, void *cookie,
+ xlator_t *this, int32_t op_ret,
+ int32_t op_errno, struct iatt *prebuf,
+ struct iatt *postbuf, dict_t *xdata);
+
typedef int32_t (*fop_lookup_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
@@ -737,6 +747,12 @@ typedef int32_t (*fop_put_t) (call_frame_t *frame, xlator_t *this, loc_t *loc,
struct iobref *iobref, dict_t *xattr,
dict_t *xdata);
+typedef int32_t (*fop_icreate_t) (call_frame_t *frame, xlator_t *this,
+ loc_t *loc, mode_t mode, dict_t *xdata);
+
+typedef int32_t (*fop_namelink_t) (call_frame_t *frame, xlator_t *this,
+ loc_t *loc, dict_t *xdata);
+
/* WARNING: make sure the list is in order with FOP definition in
`rpc/xdr/src/glusterfs-fops.x`.
If it is not in order, mainly the metrics related feature would be broken */
@@ -799,6 +815,8 @@ struct xlator_fops {
fop_getactivelk_t getactivelk;
fop_setactivelk_t setactivelk;
fop_put_t put;
+ fop_icreate_t icreate;
+ fop_namelink_t namelink;
/* these entries are used for a typechecking hack in STACK_WIND _only_ */
/* make sure to add _cbk variables only after defining regular fops as
@@ -861,6 +879,8 @@ struct xlator_fops {
fop_getactivelk_cbk_t getactivelk_cbk;
fop_setactivelk_cbk_t setactivelk_cbk;
fop_put_cbk_t put_cbk;
+ fop_icreate_cbk_t icreate_cbk;
+ fop_namelink_cbk_t namelink_cbk;
};
typedef int32_t (*cbk_forget_t) (xlator_t *this,