summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.h
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2017-11-18 15:19:13 +0530
committerAmar Tumballi <amarts@redhat.com>2017-12-05 14:21:01 +0000
commitdc1258bfe46d30059119a3294285a114ec2bcd36 (patch)
tree4ff3cb254b5246e27b1eda32312e4ddeec897900 /libglusterfs/src/xlator.h
parent8a0b115b20cfa2dd3c5a9e22a8244c9c2f03e17b (diff)
libglusterfs: Add put fop
Problem: It had been a longtime request to implement put fop in gluster. put fop in gluster may not have the exact sementics of HTTP PUT, but can be easily extended to do so. The subsequent patches, will contain more semantics on the put fop and its guarentees. Why compound fop framework is not used for put? Compound fop framework currently doesn't allow compounding of entry fop and inode fops, i.e. fops on multiple inodes cannot be combined in compound fop. Updates #353 Change-Id: Idb7891b3e056d46d570bb7e31bad1b6a28656ada Signed-off-by: Poornima G <pgurusid@redhat.com>
Diffstat (limited to 'libglusterfs/src/xlator.h')
-rw-r--r--libglusterfs/src/xlator.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index de353fe702d..a3115f09c52 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -465,6 +465,12 @@ typedef int32_t (*fop_setactivelk_cbk_t) (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret,
int32_t op_errno, dict_t *xdata);
+typedef int32_t (*fop_put_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, struct iatt *preparent,
+ struct iatt *postparent, dict_t *xdata);
+
typedef int32_t (*fop_lookup_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
@@ -725,6 +731,12 @@ typedef int32_t (*fop_setactivelk_t) (call_frame_t *frame, xlator_t *this,
lock_migration_info_t *locklist,
dict_t *xdata);
+typedef int32_t (*fop_put_t) (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ mode_t mode, mode_t umask, uint32_t flags,
+ struct iovec *vector, int32_t count, off_t offset,
+ struct iobref *iobref, dict_t *xattr,
+ 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 */
@@ -786,6 +798,7 @@ struct xlator_fops {
fop_compound_t compound;
fop_getactivelk_t getactivelk;
fop_setactivelk_t setactivelk;
+ fop_put_t put;
/* these entries are used for a typechecking hack in STACK_WIND _only_ */
/* make sure to add _cbk variables only after defining regular fops as
@@ -847,6 +860,7 @@ struct xlator_fops {
fop_compound_cbk_t compound_cbk;
fop_getactivelk_cbk_t getactivelk_cbk;
fop_setactivelk_cbk_t setactivelk_cbk;
+ fop_put_cbk_t put_cbk;
};
typedef int32_t (*cbk_forget_t) (xlator_t *this,