summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/call-stub.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-03-20 17:22:24 +0530
committerAnand Avati <avati@redhat.com>2012-03-22 16:40:27 -0700
commit9d3af972f516b6ba38d2736ce2016e34a452d569 (patch)
tree1dcdc620748a42cdfb5464c3adaae5a4a3a6f869 /libglusterfs/src/call-stub.c
parentafe542eca18888463798747d2a95e5a9d239a4a0 (diff)
core: adding extra data for fops
with this change, the xlator APIs will have a dictionary as extra argument, which is passed between all the layers. This can be utilized for overloading in some of the operations. Change-Id: I58a8186b3ef647650280e63f3e5e9b9de7827b40 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 782265 Reviewed-on: http://review.gluster.com/2960 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/call-stub.c')
-rw-r--r--libglusterfs/src/call-stub.c720
1 files changed, 468 insertions, 252 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c
index 9b3a9c348..01e919d69 100644
--- a/libglusterfs/src/call-stub.c
+++ b/libglusterfs/src/call-stub.c
@@ -55,7 +55,7 @@ call_stub_t *
fop_lookup_stub (call_frame_t *frame,
fop_lookup_t fn,
loc_t *loc,
- dict_t *xattr_req)
+ dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -67,10 +67,10 @@ fop_lookup_stub (call_frame_t *frame,
stub->args.lookup.fn = fn;
- if (xattr_req)
- stub->args.lookup.xattr_req = dict_ref (xattr_req);
-
loc_copy (&stub->args.lookup.loc, loc);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -83,7 +83,7 @@ fop_lookup_cbk_stub (call_frame_t *frame,
int32_t op_errno,
inode_t *inode,
struct iatt *buf,
- dict_t *dict,
+ dict_t *xdata,
struct iatt *postparent)
{
call_stub_t *stub = NULL;
@@ -100,10 +100,11 @@ fop_lookup_cbk_stub (call_frame_t *frame,
stub->args.lookup_cbk.inode = inode_ref (inode);
if (buf)
stub->args.lookup_cbk.buf = *buf;
- if (dict)
- stub->args.lookup_cbk.dict = dict_ref (dict);
if (postparent)
stub->args.lookup_cbk.postparent = *postparent;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -113,7 +114,7 @@ out:
call_stub_t *
fop_stat_stub (call_frame_t *frame,
fop_stat_t fn,
- loc_t *loc)
+ loc_t *loc, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -125,6 +126,9 @@ fop_stat_stub (call_frame_t *frame,
stub->args.stat.fn = fn;
loc_copy (&stub->args.stat.loc, loc);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -135,7 +139,7 @@ fop_stat_cbk_stub (call_frame_t *frame,
fop_stat_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- struct iatt *buf)
+ struct iatt *buf, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -149,6 +153,9 @@ fop_stat_cbk_stub (call_frame_t *frame,
stub->args.stat_cbk.op_errno = op_errno;
if (op_ret == 0)
stub->args.stat_cbk.buf = *buf;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -157,7 +164,7 @@ out:
call_stub_t *
fop_fstat_stub (call_frame_t *frame,
fop_fstat_t fn,
- fd_t *fd)
+ fd_t *fd, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -170,6 +177,9 @@ fop_fstat_stub (call_frame_t *frame,
if (fd)
stub->args.fstat.fd = fd_ref (fd);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -180,7 +190,7 @@ fop_fstat_cbk_stub (call_frame_t *frame,
fop_fstat_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- struct iatt *buf)
+ struct iatt *buf, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -194,6 +204,9 @@ fop_fstat_cbk_stub (call_frame_t *frame,
stub->args.fstat_cbk.op_errno = op_errno;
if (buf)
stub->args.fstat_cbk.buf = *buf;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -205,7 +218,7 @@ call_stub_t *
fop_truncate_stub (call_frame_t *frame,
fop_truncate_t fn,
loc_t *loc,
- off_t off)
+ off_t off, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -218,6 +231,9 @@ fop_truncate_stub (call_frame_t *frame,
stub->args.truncate.fn = fn;
loc_copy (&stub->args.truncate.loc, loc);
stub->args.truncate.off = off;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -229,7 +245,7 @@ fop_truncate_cbk_stub (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -245,6 +261,9 @@ fop_truncate_cbk_stub (call_frame_t *frame,
stub->args.truncate_cbk.prebuf = *prebuf;
if (postbuf)
stub->args.truncate_cbk.postbuf = *postbuf;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -254,7 +273,7 @@ call_stub_t *
fop_ftruncate_stub (call_frame_t *frame,
fop_ftruncate_t fn,
fd_t *fd,
- off_t off)
+ off_t off, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -268,6 +287,9 @@ fop_ftruncate_stub (call_frame_t *frame,
stub->args.ftruncate.fd = fd_ref (fd);
stub->args.ftruncate.off = off;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -279,7 +301,7 @@ fop_ftruncate_cbk_stub (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -295,6 +317,9 @@ fop_ftruncate_cbk_stub (call_frame_t *frame,
stub->args.ftruncate_cbk.prebuf = *prebuf;
if (postbuf)
stub->args.ftruncate_cbk.postbuf = *postbuf;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -304,7 +329,7 @@ call_stub_t *
fop_access_stub (call_frame_t *frame,
fop_access_t fn,
loc_t *loc,
- int32_t mask)
+ int32_t mask, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -317,6 +342,9 @@ fop_access_stub (call_frame_t *frame,
stub->args.access.fn = fn;
loc_copy (&stub->args.access.loc, loc);
stub->args.access.mask = mask;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -326,7 +354,7 @@ call_stub_t *
fop_access_cbk_stub (call_frame_t *frame,
fop_access_cbk_t fn,
int32_t op_ret,
- int32_t op_errno)
+ int32_t op_errno, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -338,6 +366,9 @@ fop_access_cbk_stub (call_frame_t *frame,
stub->args.access_cbk.fn = fn;
stub->args.access_cbk.op_ret = op_ret;
stub->args.access_cbk.op_errno = op_errno;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -347,7 +378,7 @@ call_stub_t *
fop_readlink_stub (call_frame_t *frame,
fop_readlink_t fn,
loc_t *loc,
- size_t size)
+ size_t size, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -360,6 +391,9 @@ fop_readlink_stub (call_frame_t *frame,
stub->args.readlink.fn = fn;
loc_copy (&stub->args.readlink.loc, loc);
stub->args.readlink.size = size;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -371,7 +405,7 @@ fop_readlink_cbk_stub (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
const char *path,
- struct iatt *sbuf)
+ struct iatt *sbuf, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -387,14 +421,17 @@ fop_readlink_cbk_stub (call_frame_t *frame,
stub->args.readlink_cbk.buf = gf_strdup (path);
if (sbuf)
stub->args.readlink_cbk.sbuf = *sbuf;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
call_stub_t *
-fop_mknod_stub (call_frame_t *frame, fop_mknod_t fn,
- loc_t *loc, mode_t mode, dev_t rdev, dict_t *params)
+fop_mknod_stub (call_frame_t *frame, fop_mknod_t fn, loc_t *loc, mode_t mode,
+ dev_t rdev, mode_t umask, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -408,8 +445,10 @@ fop_mknod_stub (call_frame_t *frame, fop_mknod_t fn,
loc_copy (&stub->args.mknod.loc, loc);
stub->args.mknod.mode = mode;
stub->args.mknod.rdev = rdev;
- if (params)
- stub->args.mknod.params = dict_ref (params);
+ stub->args.mknod.umask = umask;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -423,7 +462,7 @@ fop_mknod_cbk_stub (call_frame_t *frame,
inode_t *inode,
struct iatt *buf,
struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -443,6 +482,9 @@ fop_mknod_cbk_stub (call_frame_t *frame,
stub->args.mknod_cbk.preparent = *preparent;
if (postparent)
stub->args.mknod_cbk.postparent = *postparent;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -450,7 +492,7 @@ out:
call_stub_t *
fop_mkdir_stub (call_frame_t *frame, fop_mkdir_t fn,
- loc_t *loc, mode_t mode, dict_t *params)
+ loc_t *loc, mode_t mode, mode_t umask, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -462,9 +504,12 @@ fop_mkdir_stub (call_frame_t *frame, fop_mkdir_t fn,
stub->args.mkdir.fn = fn;
loc_copy (&stub->args.mkdir.loc, loc);
- stub->args.mkdir.mode = mode;
- if (params)
- stub->args.mkdir.params = dict_ref (params);
+ stub->args.mkdir.mode = mode;
+ stub->args.mkdir.umask = umask;
+
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -478,7 +523,7 @@ fop_mkdir_cbk_stub (call_frame_t *frame,
inode_t *inode,
struct iatt *buf,
struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -498,6 +543,9 @@ fop_mkdir_cbk_stub (call_frame_t *frame,
stub->args.mkdir_cbk.preparent = *preparent;
if (postparent)
stub->args.mkdir_cbk.postparent = *postparent;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -506,7 +554,7 @@ out:
call_stub_t *
fop_unlink_stub (call_frame_t *frame,
fop_unlink_t fn,
- loc_t *loc)
+ loc_t *loc, int xflag, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -518,6 +566,10 @@ fop_unlink_stub (call_frame_t *frame,
stub->args.unlink.fn = fn;
loc_copy (&stub->args.unlink.loc, loc);
+ stub->args.unlink.xflag = xflag;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -529,7 +581,7 @@ fop_unlink_cbk_stub (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -545,6 +597,9 @@ fop_unlink_cbk_stub (call_frame_t *frame,
stub->args.unlink_cbk.preparent = *preparent;
if (postparent)
stub->args.unlink_cbk.postparent = *postparent;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -553,7 +608,7 @@ out:
call_stub_t *
fop_rmdir_stub (call_frame_t *frame, fop_rmdir_t fn,
- loc_t *loc, int flags)
+ loc_t *loc, int flags, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -566,6 +621,9 @@ fop_rmdir_stub (call_frame_t *frame, fop_rmdir_t fn,
stub->args.rmdir.fn = fn;
loc_copy (&stub->args.rmdir.loc, loc);
stub->args.rmdir.flags = flags;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -577,7 +635,7 @@ fop_rmdir_cbk_stub (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -593,6 +651,9 @@ fop_rmdir_cbk_stub (call_frame_t *frame,
stub->args.rmdir_cbk.preparent = *preparent;
if (postparent)
stub->args.rmdir_cbk.postparent = *postparent;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -600,7 +661,7 @@ out:
call_stub_t *
fop_symlink_stub (call_frame_t *frame, fop_symlink_t fn,
- const char *linkname, loc_t *loc, dict_t *params)
+ const char *linkname, loc_t *loc, mode_t umask, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -613,9 +674,11 @@ fop_symlink_stub (call_frame_t *frame, fop_symlink_t fn,
stub->args.symlink.fn = fn;
stub->args.symlink.linkname = gf_strdup (linkname);
+ stub->args.symlink.umask = umask;
loc_copy (&stub->args.symlink.loc, loc);
- if (params)
- stub->args.symlink.params = dict_ref (params);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -629,7 +692,7 @@ fop_symlink_cbk_stub (call_frame_t *frame,
inode_t *inode,
struct iatt *buf,
struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -649,6 +712,9 @@ fop_symlink_cbk_stub (call_frame_t *frame,
stub->args.symlink_cbk.preparent = *preparent;
if (postparent)
stub->args.symlink_cbk.postparent = *postparent;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -658,7 +724,7 @@ call_stub_t *
fop_rename_stub (call_frame_t *frame,
fop_rename_t fn,
loc_t *oldloc,
- loc_t *newloc)
+ loc_t *newloc, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -672,6 +738,9 @@ fop_rename_stub (call_frame_t *frame,
stub->args.rename.fn = fn;
loc_copy (&stub->args.rename.old, oldloc);
loc_copy (&stub->args.rename.new, newloc);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -686,7 +755,7 @@ fop_rename_cbk_stub (call_frame_t *frame,
struct iatt *preoldparent,
struct iatt *postoldparent,
struct iatt *prenewparent,
- struct iatt *postnewparent)
+ struct iatt *postnewparent, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -708,6 +777,9 @@ fop_rename_cbk_stub (call_frame_t *frame,
stub->args.rename_cbk.prenewparent = *prenewparent;
if (postnewparent)
stub->args.rename_cbk.postnewparent = *postnewparent;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -717,7 +789,7 @@ call_stub_t *
fop_link_stub (call_frame_t *frame,
fop_link_t fn,
loc_t *oldloc,
- loc_t *newloc)
+ loc_t *newloc, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -732,6 +804,9 @@ fop_link_stub (call_frame_t *frame,
loc_copy (&stub->args.link.oldloc, oldloc);
loc_copy (&stub->args.link.newloc, newloc);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -745,7 +820,7 @@ fop_link_cbk_stub (call_frame_t *frame,
inode_t *inode,
struct iatt *buf,
struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -765,6 +840,9 @@ fop_link_cbk_stub (call_frame_t *frame,
stub->args.link_cbk.preparent = *preparent;
if (postparent)
stub->args.link_cbk.postparent = *postparent;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -773,7 +851,7 @@ out:
call_stub_t *
fop_create_stub (call_frame_t *frame, fop_create_t fn,
loc_t *loc, int32_t flags, mode_t mode,
- fd_t *fd, dict_t *params)
+ mode_t umask, fd_t *fd, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -787,10 +865,12 @@ fop_create_stub (call_frame_t *frame, fop_create_t fn,
loc_copy (&stub->args.create.loc, loc);
stub->args.create.flags = flags;
stub->args.create.mode = mode;
+ stub->args.create.umask = umask;
if (fd)
stub->args.create.fd = fd_ref (fd);
- if (params)
- stub->args.create.params = dict_ref (params);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -805,7 +885,7 @@ fop_create_cbk_stub (call_frame_t *frame,
inode_t *inode,
struct iatt *buf,
struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -827,6 +907,9 @@ fop_create_cbk_stub (call_frame_t *frame,
stub->args.create_cbk.preparent = *preparent;
if (postparent)
stub->args.create_cbk.postparent = *postparent;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -837,7 +920,7 @@ fop_open_stub (call_frame_t *frame,
fop_open_t fn,
loc_t *loc,
int32_t flags, fd_t *fd,
- int32_t wbflags)
+ dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -850,9 +933,11 @@ fop_open_stub (call_frame_t *frame,
stub->args.open.fn = fn;
loc_copy (&stub->args.open.loc, loc);
stub->args.open.flags = flags;
- stub->args.open.wbflags = wbflags;
if (fd)
stub->args.open.fd = fd_ref (fd);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -863,8 +948,7 @@ fop_open_cbk_stub (call_frame_t *frame,
fop_open_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- fd_t *fd)
-
+ fd_t *fd, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -878,6 +962,9 @@ fop_open_cbk_stub (call_frame_t *frame,
stub->args.open_cbk.op_errno = op_errno;
if (fd)
stub->args.open_cbk.fd = fd_ref (fd);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -888,7 +975,7 @@ fop_readv_stub (call_frame_t *frame,
fop_readv_t fn,
fd_t *fd,
size_t size,
- off_t off, uint32_t flags)
+ off_t off, uint32_t flags, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -904,6 +991,9 @@ fop_readv_stub (call_frame_t *frame,
stub->args.readv.off = off;
stub->args.readv.flags = flags;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -917,8 +1007,7 @@ fop_readv_cbk_stub (call_frame_t *frame,
struct iovec *vector,
int32_t count,
struct iatt *stbuf,
- struct iobref *iobref)
-
+ struct iobref *iobref, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -936,6 +1025,9 @@ fop_readv_cbk_stub (call_frame_t *frame,
stub->args.readv_cbk.stbuf = *stbuf;
stub->args.readv_cbk.iobref = iobref_ref (iobref);
}
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -948,7 +1040,7 @@ fop_writev_stub (call_frame_t *frame,
struct iovec *vector,
int32_t count,
off_t off, uint32_t flags,
- struct iobref *iobref)
+ struct iobref *iobref, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -966,6 +1058,8 @@ fop_writev_stub (call_frame_t *frame,
stub->args.writev.off = off;
stub->args.writev.flags = flags;
stub->args.writev.iobref = iobref_ref (iobref);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
out:
return stub;
@@ -978,8 +1072,7 @@ fop_writev_cbk_stub (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *prebuf,
- struct iatt *postbuf)
-
+ struct iatt *postbuf, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -995,6 +1088,9 @@ fop_writev_cbk_stub (call_frame_t *frame,
stub->args.writev_cbk.postbuf = *postbuf;
if (prebuf)
stub->args.writev_cbk.prebuf = *prebuf;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1004,7 +1100,7 @@ out:
call_stub_t *
fop_flush_stub (call_frame_t *frame,
fop_flush_t fn,
- fd_t *fd)
+ fd_t *fd, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1016,6 +1112,9 @@ fop_flush_stub (call_frame_t *frame,
stub->args.flush.fn = fn;
if (fd)
stub->args.flush.fd = fd_ref (fd);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1025,8 +1124,7 @@ call_stub_t *
fop_flush_cbk_stub (call_frame_t *frame,
fop_flush_cbk_t fn,
int32_t op_ret,
- int32_t op_errno)
-
+ int32_t op_errno, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1038,6 +1136,9 @@ fop_flush_cbk_stub (call_frame_t *frame,
stub->args.flush_cbk.fn = fn;
stub->args.flush_cbk.op_ret = op_ret;
stub->args.flush_cbk.op_errno = op_errno;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1049,7 +1150,7 @@ call_stub_t *
fop_fsync_stub (call_frame_t *frame,
fop_fsync_t fn,
fd_t *fd,
- int32_t datasync)
+ int32_t datasync, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1062,6 +1163,9 @@ fop_fsync_stub (call_frame_t *frame,
if (fd)
stub->args.fsync.fd = fd_ref (fd);
stub->args.fsync.datasync = datasync;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1073,7 +1177,7 @@ fop_fsync_cbk_stub (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1089,6 +1193,9 @@ fop_fsync_cbk_stub (call_frame_t *frame,
stub->args.fsync_cbk.prebuf = *prebuf;
if (postbuf)
stub->args.fsync_cbk.postbuf = *postbuf;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1097,7 +1204,7 @@ out:
call_stub_t *
fop_opendir_stub (call_frame_t *frame,
fop_opendir_t fn,
- loc_t *loc, fd_t *fd)
+ loc_t *loc, fd_t *fd, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1111,6 +1218,9 @@ fop_opendir_stub (call_frame_t *frame,
loc_copy (&stub->args.opendir.loc, loc);
if (fd)
stub->args.opendir.fd = fd_ref (fd);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1121,8 +1231,7 @@ fop_opendir_cbk_stub (call_frame_t *frame,
fop_opendir_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- fd_t *fd)
-
+ fd_t *fd, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1137,6 +1246,9 @@ fop_opendir_cbk_stub (call_frame_t *frame,
if (fd)
stub->args.opendir_cbk.fd = fd_ref (fd);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1146,7 +1258,7 @@ call_stub_t *
fop_fsyncdir_stub (call_frame_t *frame,
fop_fsyncdir_t fn,
fd_t *fd,
- int32_t datasync)
+ int32_t datasync, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1159,6 +1271,9 @@ fop_fsyncdir_stub (call_frame_t *frame,
if (fd)
stub->args.fsyncdir.fd = fd_ref (fd);
stub->args.fsyncdir.datasync = datasync;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1168,8 +1283,7 @@ call_stub_t *
fop_fsyncdir_cbk_stub (call_frame_t *frame,
fop_fsyncdir_cbk_t fn,
int32_t op_ret,
- int32_t op_errno)
-
+ int32_t op_errno, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1181,6 +1295,9 @@ fop_fsyncdir_cbk_stub (call_frame_t *frame,
stub->args.fsyncdir_cbk.fn = fn;
stub->args.fsyncdir_cbk.op_ret = op_ret;
stub->args.fsyncdir_cbk.op_errno = op_errno;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1189,7 +1306,7 @@ out:
call_stub_t *
fop_statfs_stub (call_frame_t *frame,
fop_statfs_t fn,
- loc_t *loc)
+ loc_t *loc, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1201,6 +1318,9 @@ fop_statfs_stub (call_frame_t *frame,
stub->args.statfs.fn = fn;
loc_copy (&stub->args.statfs.loc, loc);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1211,8 +1331,7 @@ fop_statfs_cbk_stub (call_frame_t *frame,
fop_statfs_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- struct statvfs *buf)
-
+ struct statvfs *buf, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1226,6 +1345,9 @@ fop_statfs_cbk_stub (call_frame_t *frame,
stub->args.statfs_cbk.op_errno = op_errno;
if (op_ret == 0)
stub->args.statfs_cbk.buf = *buf;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1236,7 +1358,7 @@ fop_setxattr_stub (call_frame_t *frame,
fop_setxattr_t fn,
loc_t *loc,
dict_t *dict,
- int32_t flags)
+ int32_t flags, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1252,6 +1374,9 @@ fop_setxattr_stub (call_frame_t *frame,
if (dict)
stub->args.setxattr.dict = dict_ref (dict);
stub->args.setxattr.flags = flags;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1261,7 +1386,7 @@ call_stub_t *
fop_setxattr_cbk_stub (call_frame_t *frame,
fop_setxattr_cbk_t fn,
int32_t op_ret,
- int32_t op_errno)
+ int32_t op_errno, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1273,6 +1398,9 @@ fop_setxattr_cbk_stub (call_frame_t *frame,
stub->args.setxattr_cbk.fn = fn;
stub->args.setxattr_cbk.op_ret = op_ret;
stub->args.setxattr_cbk.op_errno = op_errno;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1281,7 +1409,7 @@ call_stub_t *
fop_getxattr_stub (call_frame_t *frame,
fop_getxattr_t fn,
loc_t *loc,
- const char *name)
+ const char *name, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1296,6 +1424,9 @@ fop_getxattr_stub (call_frame_t *frame,
if (name)
stub->args.getxattr.name = gf_strdup (name);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1306,7 +1437,7 @@ fop_getxattr_cbk_stub (call_frame_t *frame,
fop_getxattr_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- dict_t *dict)
+ dict_t *dict, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1321,6 +1452,9 @@ fop_getxattr_cbk_stub (call_frame_t *frame,
/* TODO */
if (dict)
stub->args.getxattr_cbk.dict = dict_ref (dict);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1331,7 +1465,7 @@ fop_fsetxattr_stub (call_frame_t *frame,
fop_fsetxattr_t fn,
fd_t *fd,
dict_t *dict,
- int32_t flags)
+ int32_t flags, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1348,6 +1482,9 @@ fop_fsetxattr_stub (call_frame_t *frame,
if (dict)
stub->args.fsetxattr.dict = dict_ref (dict);
stub->args.fsetxattr.flags = flags;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1357,7 +1494,7 @@ call_stub_t *
fop_fsetxattr_cbk_stub (call_frame_t *frame,
fop_fsetxattr_cbk_t fn,
int32_t op_ret,
- int32_t op_errno)
+ int32_t op_errno, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1369,6 +1506,9 @@ fop_fsetxattr_cbk_stub (call_frame_t *frame,
stub->args.fsetxattr_cbk.fn = fn;
stub->args.fsetxattr_cbk.op_ret = op_ret;
stub->args.fsetxattr_cbk.op_errno = op_errno;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1378,7 +1518,7 @@ call_stub_t *
fop_fgetxattr_stub (call_frame_t *frame,
fop_fgetxattr_t fn,
fd_t *fd,
- const char *name)
+ const char *name, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1393,6 +1533,9 @@ fop_fgetxattr_stub (call_frame_t *frame,
if (name)
stub->args.fgetxattr.name = gf_strdup (name);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1403,7 +1546,7 @@ fop_fgetxattr_cbk_stub (call_frame_t *frame,
fop_fgetxattr_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- dict_t *dict)
+ dict_t *dict, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1419,6 +1562,9 @@ fop_fgetxattr_cbk_stub (call_frame_t *frame,
/* TODO */
if (dict)
stub->args.fgetxattr_cbk.dict = dict_ref (dict);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1428,7 +1574,7 @@ call_stub_t *
fop_removexattr_stub (call_frame_t *frame,
fop_removexattr_t fn,
loc_t *loc,
- const char *name)
+ const char *name, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1442,6 +1588,9 @@ fop_removexattr_stub (call_frame_t *frame,
stub->args.removexattr.fn = fn;
loc_copy (&stub->args.removexattr.loc, loc);
stub->args.removexattr.name = gf_strdup (name);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1451,7 +1600,7 @@ call_stub_t *
fop_removexattr_cbk_stub (call_frame_t *frame,
fop_removexattr_cbk_t fn,
int32_t op_ret,
- int32_t op_errno)
+ int32_t op_errno, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1463,6 +1612,9 @@ fop_removexattr_cbk_stub (call_frame_t *frame,
stub->args.removexattr_cbk.fn = fn;
stub->args.removexattr_cbk.op_ret = op_ret;
stub->args.removexattr_cbk.op_errno = op_errno;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1471,7 +1623,7 @@ call_stub_t *
fop_fremovexattr_stub (call_frame_t *frame,
fop_fremovexattr_t fn,
fd_t *fd,
- const char *name)
+ const char *name, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1485,6 +1637,9 @@ fop_fremovexattr_stub (call_frame_t *frame,
stub->args.fremovexattr.fn = fn;
stub->args.fremovexattr.fd = fd_ref (fd);
stub->args.fremovexattr.name = gf_strdup (name);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1494,7 +1649,7 @@ call_stub_t *
fop_fremovexattr_cbk_stub (call_frame_t *frame,
fop_fremovexattr_cbk_t fn,
int32_t op_ret,
- int32_t op_errno)
+ int32_t op_errno, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1506,6 +1661,9 @@ fop_fremovexattr_cbk_stub (call_frame_t *frame,
stub->args.fremovexattr_cbk.fn = fn;
stub->args.fremovexattr_cbk.op_ret = op_ret;
stub->args.fremovexattr_cbk.op_errno = op_errno;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1515,7 +1673,7 @@ fop_lk_stub (call_frame_t *frame,
fop_lk_t fn,
fd_t *fd,
int32_t cmd,
- struct gf_flock *lock)
+ struct gf_flock *lock, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1530,6 +1688,9 @@ fop_lk_stub (call_frame_t *frame,
stub->args.lk.fd = fd_ref (fd);
stub->args.lk.cmd = cmd;
stub->args.lk.lock = *lock;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1540,8 +1701,7 @@ fop_lk_cbk_stub (call_frame_t *frame,
fop_lk_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- struct gf_flock *lock)
-
+ struct gf_flock *lock, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1555,13 +1715,17 @@ fop_lk_cbk_stub (call_frame_t *frame,
stub->args.lk_cbk.op_errno = op_errno;
if (op_ret == 0)
stub->args.lk_cbk.lock = *lock;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
call_stub_t *
fop_inodelk_stub (call_frame_t *frame, fop_inodelk_t fn,
- const char *volume, loc_t *loc, int32_t cmd, struct gf_flock *lock)
+ const char *volume, loc_t *loc, int32_t cmd,
+ struct gf_flock *lock, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1579,13 +1743,16 @@ fop_inodelk_stub (call_frame_t *frame, fop_inodelk_t fn,
loc_copy (&stub->args.inodelk.loc, loc);
stub->args.inodelk.cmd = cmd;
stub->args.inodelk.lock = *lock;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
call_stub_t *
fop_inodelk_cbk_stub (call_frame_t *frame, fop_inodelk_cbk_t fn,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1598,6 +1765,9 @@ fop_inodelk_cbk_stub (call_frame_t *frame, fop_inodelk_cbk_t fn,
stub->args.inodelk_cbk.op_ret = op_ret;
stub->args.inodelk_cbk.op_errno = op_errno;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1605,7 +1775,8 @@ out:
call_stub_t *
fop_finodelk_stub (call_frame_t *frame, fop_finodelk_t fn,
- const char *volume, fd_t *fd, int32_t cmd, struct gf_flock *lock)
+ const char *volume, fd_t *fd, int32_t cmd,
+ struct gf_flock *lock, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1626,6 +1797,9 @@ fop_finodelk_stub (call_frame_t *frame, fop_finodelk_t fn,
stub->args.finodelk.cmd = cmd;
stub->args.finodelk.lock = *lock;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1633,7 +1807,7 @@ out:
call_stub_t *
fop_finodelk_cbk_stub (call_frame_t *frame, fop_inodelk_cbk_t fn,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1646,6 +1820,9 @@ fop_finodelk_cbk_stub (call_frame_t *frame, fop_inodelk_cbk_t fn,
stub->args.finodelk_cbk.op_ret = op_ret;
stub->args.finodelk_cbk.op_errno = op_errno;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1654,7 +1831,7 @@ out:
call_stub_t *
fop_entrylk_stub (call_frame_t *frame, fop_entrylk_t fn,
const char *volume, loc_t *loc, const char *name,
- entrylk_cmd cmd, entrylk_type type)
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1675,13 +1852,16 @@ fop_entrylk_stub (call_frame_t *frame, fop_entrylk_t fn,
if (name)
stub->args.entrylk.name = gf_strdup (name);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
call_stub_t *
fop_entrylk_cbk_stub (call_frame_t *frame, fop_entrylk_cbk_t fn,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1694,6 +1874,9 @@ fop_entrylk_cbk_stub (call_frame_t *frame, fop_entrylk_cbk_t fn,
stub->args.entrylk_cbk.op_ret = op_ret;
stub->args.entrylk_cbk.op_errno = op_errno;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1702,7 +1885,7 @@ out:
call_stub_t *
fop_fentrylk_stub (call_frame_t *frame, fop_fentrylk_t fn,
const char *volume, fd_t *fd, const char *name,
- entrylk_cmd cmd, entrylk_type type)
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1723,13 +1906,16 @@ fop_fentrylk_stub (call_frame_t *frame, fop_fentrylk_t fn,
if (name)
stub->args.fentrylk.name = gf_strdup (name);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
call_stub_t *
fop_fentrylk_cbk_stub (call_frame_t *frame, fop_fentrylk_cbk_t fn,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1742,6 +1928,9 @@ fop_fentrylk_cbk_stub (call_frame_t *frame, fop_fentrylk_cbk_t fn,
stub->args.fentrylk_cbk.op_ret = op_ret;
stub->args.fentrylk_cbk.op_errno = op_errno;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1752,7 +1941,7 @@ fop_readdirp_cbk_stub (call_frame_t *frame,
fop_readdirp_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- gf_dirent_t *entries)
+ gf_dirent_t *entries, dict_t *xdata)
{
call_stub_t *stub = NULL;
gf_dirent_t *stub_entry = NULL, *entry = NULL;
@@ -1784,6 +1973,9 @@ fop_readdirp_cbk_stub (call_frame_t *frame,
&stub->args.readdirp_cbk.entries.list);
}
}
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1794,7 +1986,7 @@ fop_readdir_cbk_stub (call_frame_t *frame,
fop_readdir_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- gf_dirent_t *entries)
+ gf_dirent_t *entries, dict_t *xdata)
{
call_stub_t *stub = NULL;
gf_dirent_t *stub_entry = NULL, *entry = NULL;
@@ -1826,6 +2018,9 @@ fop_readdir_cbk_stub (call_frame_t *frame,
&stub->args.readdir_cbk.entries.list);
}
}
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1835,7 +2030,7 @@ fop_readdir_stub (call_frame_t *frame,
fop_readdir_t fn,
fd_t *fd,
size_t size,
- off_t off)
+ off_t off, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1847,6 +2042,9 @@ fop_readdir_stub (call_frame_t *frame,
stub->args.readdir.size = size;
stub->args.readdir.off = off;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1857,7 +2055,7 @@ fop_readdirp_stub (call_frame_t *frame,
fd_t *fd,
size_t size,
off_t off,
- dict_t *dict)
+ dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1868,9 +2066,8 @@ fop_readdirp_stub (call_frame_t *frame,
stub->args.readdirp.fd = fd_ref (fd);
stub->args.readdirp.size = size;
stub->args.readdirp.off = off;
- if (dict != NULL) {
- stub->args.readdirp.dict = dict_ref (dict);
- }
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
out:
return stub;
@@ -1880,7 +2077,7 @@ call_stub_t *
fop_rchecksum_stub (call_frame_t *frame,
fop_rchecksum_t fn,
fd_t *fd, off_t offset,
- int32_t len)
+ int32_t len, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1894,6 +2091,9 @@ fop_rchecksum_stub (call_frame_t *frame,
stub->args.rchecksum.fd = fd_ref (fd);
stub->args.rchecksum.offset = offset;
stub->args.rchecksum.len = len;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1905,7 +2105,7 @@ fop_rchecksum_cbk_stub (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
uint32_t weak_checksum,
- uint8_t *strong_checksum)
+ uint8_t *strong_checksum, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1926,6 +2126,9 @@ fop_rchecksum_cbk_stub (call_frame_t *frame,
stub->args.rchecksum_cbk.strong_checksum =
memdup (strong_checksum, MD5_DIGEST_LEN);
}
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1935,7 +2138,7 @@ call_stub_t *
fop_xattrop_cbk_stub (call_frame_t *frame,
fop_xattrop_cbk_t fn,
int32_t op_ret,
- int32_t op_errno)
+ int32_t op_errno, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1948,6 +2151,9 @@ fop_xattrop_cbk_stub (call_frame_t *frame,
stub->args.xattrop_cbk.op_ret = op_ret;
stub->args.xattrop_cbk.op_errno = op_errno;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1958,7 +2164,7 @@ fop_fxattrop_cbk_stub (call_frame_t *frame,
fop_fxattrop_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- dict_t *xattr)
+ dict_t *xattr, dict_t *xdata)
{
call_stub_t *stub = NULL;
GF_VALIDATE_OR_GOTO ("call-stub", frame, out);
@@ -1972,6 +2178,9 @@ fop_fxattrop_cbk_stub (call_frame_t *frame,
if (xattr)
stub->args.fxattrop_cbk.xattr = dict_ref (xattr);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -1982,7 +2191,7 @@ fop_xattrop_stub (call_frame_t *frame,
fop_xattrop_t fn,
loc_t *loc,
gf_xattrop_flags_t optype,
- dict_t *xattr)
+ dict_t *xattr, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -1999,6 +2208,9 @@ fop_xattrop_stub (call_frame_t *frame,
stub->args.xattrop.optype = optype;
stub->args.xattrop.xattr = dict_ref (xattr);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -2008,7 +2220,7 @@ fop_fxattrop_stub (call_frame_t *frame,
fop_fxattrop_t fn,
fd_t *fd,
gf_xattrop_flags_t optype,
- dict_t *xattr)
+ dict_t *xattr, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -2025,6 +2237,9 @@ fop_fxattrop_stub (call_frame_t *frame,
stub->args.fxattrop.optype = optype;
stub->args.fxattrop.xattr = dict_ref (xattr);
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -2036,7 +2251,7 @@ fop_setattr_cbk_stub (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *statpre,
- struct iatt *statpost)
+ struct iatt *statpost, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -2055,6 +2270,9 @@ fop_setattr_cbk_stub (call_frame_t *frame,
if (statpost)
stub->args.setattr_cbk.statpost = *statpost;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -2065,7 +2283,7 @@ fop_fsetattr_cbk_stub (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *statpre,
- struct iatt *statpost)
+ struct iatt *statpost, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -2083,6 +2301,9 @@ fop_fsetattr_cbk_stub (call_frame_t *frame,
stub->args.setattr_cbk.statpre = *statpre;
if (statpost)
stub->args.fsetattr_cbk.statpost = *statpost;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -2092,7 +2313,7 @@ fop_setattr_stub (call_frame_t *frame,
fop_setattr_t fn,
loc_t *loc,
struct iatt *stbuf,
- int32_t valid)
+ int32_t valid, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -2111,6 +2332,9 @@ fop_setattr_stub (call_frame_t *frame,
stub->args.setattr.valid = valid;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -2120,7 +2344,7 @@ fop_fsetattr_stub (call_frame_t *frame,
fop_fsetattr_t fn,
fd_t *fd,
struct iatt *stbuf,
- int32_t valid)
+ int32_t valid, dict_t *xdata)
{
call_stub_t *stub = NULL;
@@ -2140,6 +2364,9 @@ fop_fsetattr_stub (call_frame_t *frame,
stub->args.fsetattr.valid = valid;
+ if (xdata)
+ stub->xdata = dict_ref (xdata);
+
out:
return stub;
}
@@ -2156,7 +2383,7 @@ call_resume_wind (call_stub_t *stub)
stub->frame->this,
&stub->args.open.loc,
stub->args.open.flags, stub->args.open.fd,
- stub->args.open.wbflags);
+ stub->xdata);
break;
}
case GF_FOP_CREATE:
@@ -2166,15 +2393,16 @@ call_resume_wind (call_stub_t *stub)
&stub->args.create.loc,
stub->args.create.flags,
stub->args.create.mode,
+ stub->args.create.umask,
stub->args.create.fd,
- stub->args.create.params);
+ stub->xdata);
break;
}
case GF_FOP_STAT:
{
stub->args.stat.fn (stub->frame,
stub->frame->this,
- &stub->args.stat.loc);
+ &stub->args.stat.loc, stub->xdata);
break;
}
case GF_FOP_READLINK:
@@ -2182,7 +2410,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.readlink.fn (stub->frame,
stub->frame->this,
&stub->args.readlink.loc,
- stub->args.readlink.size);
+ stub->args.readlink.size, stub->xdata);
break;
}
@@ -2192,7 +2420,7 @@ call_resume_wind (call_stub_t *stub)
&stub->args.mknod.loc,
stub->args.mknod.mode,
stub->args.mknod.rdev,
- stub->args.mknod.params);
+ stub->args.mknod.umask, stub->xdata);
}
break;
@@ -2201,7 +2429,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.mkdir.fn (stub->frame, stub->frame->this,
&stub->args.mkdir.loc,
stub->args.mkdir.mode,
- stub->args.mkdir.params);
+ stub->args.mkdir.umask, stub->xdata);
}
break;
@@ -2209,7 +2437,8 @@ call_resume_wind (call_stub_t *stub)
{
stub->args.unlink.fn (stub->frame,
stub->frame->this,
- &stub->args.unlink.loc);
+ &stub->args.unlink.loc,
+ stub->args.unlink.xflag, stub->xdata);
}
break;
@@ -2217,7 +2446,7 @@ call_resume_wind (call_stub_t *stub)
{
stub->args.rmdir.fn (stub->frame, stub->frame->this,
&stub->args.rmdir.loc,
- stub->args.rmdir.flags);
+ stub->args.rmdir.flags, stub->xdata);
}
break;
@@ -2227,7 +2456,7 @@ call_resume_wind (call_stub_t *stub)
stub->frame->this,
stub->args.symlink.linkname,
&stub->args.symlink.loc,
- stub->args.symlink.params);
+ stub->args.symlink.umask, stub->xdata);
}
break;
@@ -2236,7 +2465,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.rename.fn (stub->frame,
stub->frame->this,
&stub->args.rename.old,
- &stub->args.rename.new);
+ &stub->args.rename.new, stub->xdata);
}
break;
@@ -2245,7 +2474,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.link.fn (stub->frame,
stub->frame->this,
&stub->args.link.oldloc,
- &stub->args.link.newloc);
+ &stub->args.link.newloc, stub->xdata);
}
break;
@@ -2254,7 +2483,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.truncate.fn (stub->frame,
stub->frame->this,
&stub->args.truncate.loc,
- stub->args.truncate.off);
+ stub->args.truncate.off, stub->xdata);
break;
}
@@ -2265,7 +2494,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.readv.fd,
stub->args.readv.size,
stub->args.readv.off,
- stub->args.readv.flags);
+ stub->args.readv.flags, stub->xdata);
break;
}
@@ -2278,7 +2507,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.writev.count,
stub->args.writev.off,
stub->args.writev.flags,
- stub->args.writev.iobref);
+ stub->args.writev.iobref, stub->xdata);
break;
}
@@ -2286,14 +2515,14 @@ call_resume_wind (call_stub_t *stub)
{
stub->args.statfs.fn (stub->frame,
stub->frame->this,
- &stub->args.statfs.loc);
+ &stub->args.statfs.loc, stub->xdata);
break;
}
case GF_FOP_FLUSH:
{
stub->args.flush.fn (stub->frame,
stub->frame->this,
- stub->args.flush.fd);
+ stub->args.flush.fd, stub->xdata);
break;
}
@@ -2302,7 +2531,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.fsync.fn (stub->frame,
stub->frame->this,
stub->args.fsync.fd,
- stub->args.fsync.datasync);
+ stub->args.fsync.datasync, stub->xdata);
break;
}
@@ -2312,7 +2541,7 @@ call_resume_wind (call_stub_t *stub)
stub->frame->this,
&stub->args.setxattr.loc,
stub->args.setxattr.dict,
- stub->args.setxattr.flags);
+ stub->args.setxattr.flags, stub->xdata);
break;
}
@@ -2321,7 +2550,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.getxattr.fn (stub->frame,
stub->frame->this,
&stub->args.getxattr.loc,
- stub->args.getxattr.name);
+ stub->args.getxattr.name, stub->xdata);
break;
}
@@ -2331,7 +2560,7 @@ call_resume_wind (call_stub_t *stub)
stub->frame->this,
stub->args.fsetxattr.fd,
stub->args.fsetxattr.dict,
- stub->args.fsetxattr.flags);
+ stub->args.fsetxattr.flags, stub->xdata);
break;
}
@@ -2340,7 +2569,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.fgetxattr.fn (stub->frame,
stub->frame->this,
stub->args.fgetxattr.fd,
- stub->args.fgetxattr.name);
+ stub->args.fgetxattr.name, stub->xdata);
break;
}
@@ -2349,7 +2578,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.removexattr.fn (stub->frame,
stub->frame->this,
&stub->args.removexattr.loc,
- stub->args.removexattr.name);
+ stub->args.removexattr.name, stub->xdata);
break;
}
@@ -2358,7 +2587,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.fremovexattr.fn (stub->frame,
stub->frame->this,
stub->args.fremovexattr.fd,
- stub->args.fremovexattr.name);
+ stub->args.fremovexattr.name, stub->xdata);
break;
}
@@ -2367,7 +2596,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.opendir.fn (stub->frame,
stub->frame->this,
&stub->args.opendir.loc,
- stub->args.opendir.fd);
+ stub->args.opendir.fd, stub->xdata);
break;
}
@@ -2376,7 +2605,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.fsyncdir.fn (stub->frame,
stub->frame->this,
stub->args.fsyncdir.fd,
- stub->args.fsyncdir.datasync);
+ stub->args.fsyncdir.datasync, stub->xdata);
break;
}
@@ -2385,7 +2614,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.access.fn (stub->frame,
stub->frame->this,
&stub->args.access.loc,
- stub->args.access.mask);
+ stub->args.access.mask, stub->xdata);
break;
}
@@ -2394,7 +2623,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.ftruncate.fn (stub->frame,
stub->frame->this,
stub->args.ftruncate.fd,
- stub->args.ftruncate.off);
+ stub->args.ftruncate.off, stub->xdata);
break;
}
@@ -2402,7 +2631,7 @@ call_resume_wind (call_stub_t *stub)
{
stub->args.fstat.fn (stub->frame,
stub->frame->this,
- stub->args.fstat.fd);
+ stub->args.fstat.fd, stub->xdata);
break;
}
@@ -2412,7 +2641,7 @@ call_resume_wind (call_stub_t *stub)
stub->frame->this,
stub->args.lk.fd,
stub->args.lk.cmd,
- &stub->args.lk.lock);
+ &stub->args.lk.lock, stub->xdata);
break;
}
@@ -2423,7 +2652,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.inodelk.volume,
&stub->args.inodelk.loc,
stub->args.inodelk.cmd,
- &stub->args.inodelk.lock);
+ &stub->args.inodelk.lock, stub->xdata);
break;
}
@@ -2434,7 +2663,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.finodelk.volume,
stub->args.finodelk.fd,
stub->args.finodelk.cmd,
- &stub->args.finodelk.lock);
+ &stub->args.finodelk.lock, stub->xdata);
break;
}
@@ -2446,7 +2675,7 @@ call_resume_wind (call_stub_t *stub)
&stub->args.entrylk.loc,
stub->args.entrylk.name,
stub->args.entrylk.cmd,
- stub->args.entrylk.type);
+ stub->args.entrylk.type, stub->xdata);
break;
}
@@ -2458,7 +2687,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.fentrylk.fd,
stub->args.fentrylk.name,
stub->args.fentrylk.cmd,
- stub->args.fentrylk.type);
+ stub->args.fentrylk.type, stub->xdata);
break;
}
@@ -2469,7 +2698,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.lookup.fn (stub->frame,
stub->frame->this,
&stub->args.lookup.loc,
- stub->args.lookup.xattr_req);
+ stub->xdata);
break;
}
@@ -2479,7 +2708,7 @@ call_resume_wind (call_stub_t *stub)
stub->frame->this,
stub->args.rchecksum.fd,
stub->args.rchecksum.offset,
- stub->args.rchecksum.len);
+ stub->args.rchecksum.len, stub->xdata);
break;
}
@@ -2489,7 +2718,7 @@ call_resume_wind (call_stub_t *stub)
stub->frame->this,
stub->args.readdir.fd,
stub->args.readdir.size,
- stub->args.readdir.off);
+ stub->args.readdir.off, stub->xdata);
break;
}
@@ -2500,7 +2729,7 @@ call_resume_wind (call_stub_t *stub)
stub->args.readdirp.fd,
stub->args.readdirp.size,
stub->args.readdirp.off,
- stub->args.readdirp.dict);
+ stub->xdata);
break;
}
@@ -2510,7 +2739,7 @@ call_resume_wind (call_stub_t *stub)
stub->frame->this,
&stub->args.xattrop.loc,
stub->args.xattrop.optype,
- stub->args.xattrop.xattr);
+ stub->args.xattrop.xattr, stub->xdata);
break;
}
@@ -2520,7 +2749,7 @@ call_resume_wind (call_stub_t *stub)
stub->frame->this,
stub->args.fxattrop.fd,
stub->args.fxattrop.optype,
- stub->args.fxattrop.xattr);
+ stub->args.fxattrop.xattr, stub->xdata);
break;
}
@@ -2530,7 +2759,7 @@ call_resume_wind (call_stub_t *stub)
stub->frame->this,
&stub->args.setattr.loc,
&stub->args.setattr.stbuf,
- stub->args.setattr.valid);
+ stub->args.setattr.valid, stub->xdata);
break;
}
case GF_FOP_FSETATTR:
@@ -2539,7 +2768,7 @@ call_resume_wind (call_stub_t *stub)
stub->frame->this,
stub->args.fsetattr.fd,
&stub->args.fsetattr.stbuf,
- stub->args.fsetattr.valid);
+ stub->args.fsetattr.valid, stub->xdata);
break;
}
default:
@@ -2569,14 +2798,14 @@ call_resume_unwind (call_stub_t *stub)
STACK_UNWIND (stub->frame,
stub->args.open_cbk.op_ret,
stub->args.open_cbk.op_errno,
- stub->args.open_cbk.fd);
+ stub->args.open_cbk.fd, stub->xdata);
else
stub->args.open_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.open_cbk.op_ret,
stub->args.open_cbk.op_errno,
- stub->args.open_cbk.fd);
+ stub->args.open_cbk.fd, stub->xdata);
break;
}
@@ -2590,7 +2819,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.create_cbk.inode,
&stub->args.create_cbk.buf,
&stub->args.create_cbk.preparent,
- &stub->args.create_cbk.postparent);
+ &stub->args.create_cbk.postparent, stub->xdata);
else
stub->args.create_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2601,7 +2830,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.create_cbk.inode,
&stub->args.create_cbk.buf,
&stub->args.create_cbk.preparent,
- &stub->args.create_cbk.postparent);
+ &stub->args.create_cbk.postparent, stub->xdata);
break;
}
@@ -2612,14 +2841,14 @@ call_resume_unwind (call_stub_t *stub)
STACK_UNWIND (stub->frame,
stub->args.stat_cbk.op_ret,
stub->args.stat_cbk.op_errno,
- &stub->args.stat_cbk.buf);
+ &stub->args.stat_cbk.buf, stub->xdata);
else
stub->args.stat_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.stat_cbk.op_ret,
stub->args.stat_cbk.op_errno,
- &stub->args.stat_cbk.buf);
+ &stub->args.stat_cbk.buf, stub->xdata);
break;
}
@@ -2631,7 +2860,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.readlink_cbk.op_ret,
stub->args.readlink_cbk.op_errno,
stub->args.readlink_cbk.buf,
- &stub->args.readlink_cbk.sbuf);
+ &stub->args.readlink_cbk.sbuf, stub->xdata);
else
stub->args.readlink_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2639,7 +2868,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.readlink_cbk.op_ret,
stub->args.readlink_cbk.op_errno,
stub->args.readlink_cbk.buf,
- &stub->args.readlink_cbk.sbuf);
+ &stub->args.readlink_cbk.sbuf, stub->xdata);
break;
}
@@ -2653,7 +2882,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.mknod_cbk.inode,
&stub->args.mknod_cbk.buf,
&stub->args.mknod_cbk.preparent,
- &stub->args.mknod_cbk.postparent);
+ &stub->args.mknod_cbk.postparent, stub->xdata);
else
stub->args.mknod_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2663,7 +2892,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.mknod_cbk.inode,
&stub->args.mknod_cbk.buf,
&stub->args.mknod_cbk.preparent,
- &stub->args.mknod_cbk.postparent);
+ &stub->args.mknod_cbk.postparent, stub->xdata);
break;
}
@@ -2676,7 +2905,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.mkdir_cbk.inode,
&stub->args.mkdir_cbk.buf,
&stub->args.mkdir_cbk.preparent,
- &stub->args.mkdir_cbk.postparent);
+ &stub->args.mkdir_cbk.postparent, stub->xdata);
else
stub->args.mkdir_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2686,7 +2915,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.mkdir_cbk.inode,
&stub->args.mkdir_cbk.buf,
&stub->args.mkdir_cbk.preparent,
- &stub->args.mkdir_cbk.postparent);
+ &stub->args.mkdir_cbk.postparent, stub->xdata);
if (stub->args.mkdir_cbk.inode)
inode_unref (stub->args.mkdir_cbk.inode);
@@ -2701,7 +2930,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.unlink_cbk.op_ret,
stub->args.unlink_cbk.op_errno,
&stub->args.unlink_cbk.preparent,
- &stub->args.unlink_cbk.postparent);
+ &stub->args.unlink_cbk.postparent, stub->xdata);
else
stub->args.unlink_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2709,7 +2938,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.unlink_cbk.op_ret,
stub->args.unlink_cbk.op_errno,
&stub->args.unlink_cbk.preparent,
- &stub->args.unlink_cbk.postparent);
+ &stub->args.unlink_cbk.postparent, stub->xdata);
break;
}
@@ -2720,7 +2949,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.rmdir_cbk.op_ret,
stub->args.rmdir_cbk.op_errno,
&stub->args.rmdir_cbk.preparent,
- &stub->args.rmdir_cbk.postparent);
+ &stub->args.rmdir_cbk.postparent, stub->xdata);
else
stub->args.rmdir_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2728,7 +2957,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.rmdir_cbk.op_ret,
stub->args.rmdir_cbk.op_errno,
&stub->args.rmdir_cbk.preparent,
- &stub->args.rmdir_cbk.postparent);
+ &stub->args.rmdir_cbk.postparent, stub->xdata);
break;
}
@@ -2741,7 +2970,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.symlink_cbk.inode,
&stub->args.symlink_cbk.buf,
&stub->args.symlink_cbk.preparent,
- &stub->args.symlink_cbk.postparent);
+ &stub->args.symlink_cbk.postparent, stub->xdata);
else
stub->args.symlink_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2751,7 +2980,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.symlink_cbk.inode,
&stub->args.symlink_cbk.buf,
&stub->args.symlink_cbk.preparent,
- &stub->args.symlink_cbk.postparent);
+ &stub->args.symlink_cbk.postparent, stub->xdata);
}
break;
@@ -2765,7 +2994,7 @@ call_resume_unwind (call_stub_t *stub)
&stub->args.rename_cbk.preoldparent,
&stub->args.rename_cbk.postoldparent,
&stub->args.rename_cbk.prenewparent,
- &stub->args.rename_cbk.postnewparent);
+ &stub->args.rename_cbk.postnewparent, stub->xdata);
else
stub->args.rename_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2776,7 +3005,7 @@ call_resume_unwind (call_stub_t *stub)
&stub->args.rename_cbk.preoldparent,
&stub->args.rename_cbk.postoldparent,
&stub->args.rename_cbk.prenewparent,
- &stub->args.rename_cbk.postnewparent);
+ &stub->args.rename_cbk.postnewparent, stub->xdata);
break;
}
@@ -2787,7 +3016,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.link_cbk.op_ret,
stub->args.link_cbk.op_errno,
stub->args.link_cbk.inode,
- &stub->args.link_cbk.buf);
+ &stub->args.link_cbk.buf, stub->xdata);
else
stub->args.link_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2797,7 +3026,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.link_cbk.inode,
&stub->args.link_cbk.buf,
&stub->args.link_cbk.preparent,
- &stub->args.link_cbk.postparent);
+ &stub->args.link_cbk.postparent, stub->xdata);
break;
}
@@ -2808,7 +3037,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.truncate_cbk.op_ret,
stub->args.truncate_cbk.op_errno,
&stub->args.truncate_cbk.prebuf,
- &stub->args.truncate_cbk.postbuf);
+ &stub->args.truncate_cbk.postbuf, stub->xdata);
else
stub->args.truncate_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2816,7 +3045,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.truncate_cbk.op_ret,
stub->args.truncate_cbk.op_errno,
&stub->args.truncate_cbk.prebuf,
- &stub->args.truncate_cbk.postbuf);
+ &stub->args.truncate_cbk.postbuf, stub->xdata);
break;
}
@@ -2829,7 +3058,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.readv_cbk.vector,
stub->args.readv_cbk.count,
&stub->args.readv_cbk.stbuf,
- stub->args.readv_cbk.iobref);
+ stub->args.readv_cbk.iobref, stub->xdata);
else
stub->args.readv_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2839,7 +3068,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.readv_cbk.vector,
stub->args.readv_cbk.count,
&stub->args.readv_cbk.stbuf,
- stub->args.readv_cbk.iobref);
+ stub->args.readv_cbk.iobref, stub->xdata);
}
break;
@@ -2850,7 +3079,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.writev_cbk.op_ret,
stub->args.writev_cbk.op_errno,
&stub->args.writev_cbk.prebuf,
- &stub->args.writev_cbk.postbuf);
+ &stub->args.writev_cbk.postbuf, stub->xdata);
else
stub->args.writev_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2858,7 +3087,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.writev_cbk.op_ret,
stub->args.writev_cbk.op_errno,
&stub->args.writev_cbk.prebuf,
- &stub->args.writev_cbk.postbuf);
+ &stub->args.writev_cbk.postbuf, stub->xdata);
break;
}
@@ -2868,14 +3097,14 @@ call_resume_unwind (call_stub_t *stub)
STACK_UNWIND (stub->frame,
stub->args.statfs_cbk.op_ret,
stub->args.statfs_cbk.op_errno,
- &(stub->args.statfs_cbk.buf));
+ &(stub->args.statfs_cbk.buf), stub->xdata);
else
stub->args.statfs_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.statfs_cbk.op_ret,
stub->args.statfs_cbk.op_errno,
- &(stub->args.statfs_cbk.buf));
+ &(stub->args.statfs_cbk.buf), stub->xdata);
}
break;
@@ -2884,13 +3113,13 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.flush_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.flush_cbk.op_ret,
- stub->args.flush_cbk.op_errno);
+ stub->args.flush_cbk.op_errno, stub->xdata);
else
stub->args.flush_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.flush_cbk.op_ret,
- stub->args.flush_cbk.op_errno);
+ stub->args.flush_cbk.op_errno, stub->xdata);
break;
}
@@ -2902,7 +3131,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.fsync_cbk.op_ret,
stub->args.fsync_cbk.op_errno,
&stub->args.fsync_cbk.prebuf,
- &stub->args.fsync_cbk.postbuf);
+ &stub->args.fsync_cbk.postbuf, stub->xdata);
else
stub->args.fsync_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -2910,7 +3139,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.fsync_cbk.op_ret,
stub->args.fsync_cbk.op_errno,
&stub->args.fsync_cbk.prebuf,
- &stub->args.fsync_cbk.postbuf);
+ &stub->args.fsync_cbk.postbuf, stub->xdata);
break;
}
@@ -2919,14 +3148,14 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.setxattr_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.setxattr_cbk.op_ret,
- stub->args.setxattr_cbk.op_errno);
+ stub->args.setxattr_cbk.op_errno, stub->xdata);
else
stub->args.setxattr_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.setxattr_cbk.op_ret,
- stub->args.setxattr_cbk.op_errno);
+ stub->args.setxattr_cbk.op_errno, stub->xdata);
break;
}
@@ -2937,14 +3166,14 @@ call_resume_unwind (call_stub_t *stub)
STACK_UNWIND (stub->frame,
stub->args.getxattr_cbk.op_ret,
stub->args.getxattr_cbk.op_errno,
- stub->args.getxattr_cbk.dict);
+ stub->args.getxattr_cbk.dict, stub->xdata);
else
stub->args.getxattr_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.getxattr_cbk.op_ret,
stub->args.getxattr_cbk.op_errno,
- stub->args.getxattr_cbk.dict);
+ stub->args.getxattr_cbk.dict, stub->xdata);
break;
}
@@ -2953,14 +3182,14 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.fsetxattr_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.fsetxattr_cbk.op_ret,
- stub->args.fsetxattr_cbk.op_errno);
+ stub->args.fsetxattr_cbk.op_errno, stub->xdata);
else
stub->args.fsetxattr_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.fsetxattr_cbk.op_ret,
- stub->args.fsetxattr_cbk.op_errno);
+ stub->args.fsetxattr_cbk.op_errno, stub->xdata);
break;
}
@@ -2971,14 +3200,14 @@ call_resume_unwind (call_stub_t *stub)
STACK_UNWIND (stub->frame,
stub->args.fgetxattr_cbk.op_ret,
stub->args.fgetxattr_cbk.op_errno,
- stub->args.fgetxattr_cbk.dict);
+ stub->args.fgetxattr_cbk.dict, stub->xdata);
else
stub->args.fgetxattr_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.fgetxattr_cbk.op_ret,
stub->args.fgetxattr_cbk.op_errno,
- stub->args.fgetxattr_cbk.dict);
+ stub->args.fgetxattr_cbk.dict, stub->xdata);
break;
}
@@ -2987,13 +3216,13 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.removexattr_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.removexattr_cbk.op_ret,
- stub->args.removexattr_cbk.op_errno);
+ stub->args.removexattr_cbk.op_errno, stub->xdata);
else
stub->args.removexattr_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.removexattr_cbk.op_ret,
- stub->args.removexattr_cbk.op_errno);
+ stub->args.removexattr_cbk.op_errno, stub->xdata);
break;
}
@@ -3003,13 +3232,13 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.fremovexattr_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.fremovexattr_cbk.op_ret,
- stub->args.fremovexattr_cbk.op_errno);
+ stub->args.fremovexattr_cbk.op_errno, stub->xdata);
else
stub->args.fremovexattr_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.fremovexattr_cbk.op_ret,
- stub->args.fremovexattr_cbk.op_errno);
+ stub->args.fremovexattr_cbk.op_errno, stub->xdata);
break;
}
@@ -3020,14 +3249,14 @@ call_resume_unwind (call_stub_t *stub)
STACK_UNWIND (stub->frame,
stub->args.opendir_cbk.op_ret,
stub->args.opendir_cbk.op_errno,
- stub->args.opendir_cbk.fd);
+ stub->args.opendir_cbk.fd, stub->xdata);
else
stub->args.opendir_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.opendir_cbk.op_ret,
stub->args.opendir_cbk.op_errno,
- stub->args.opendir_cbk.fd);
+ stub->args.opendir_cbk.fd, stub->xdata);
break;
}
@@ -3036,13 +3265,13 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.fsyncdir_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.fsyncdir_cbk.op_ret,
- stub->args.fsyncdir_cbk.op_errno);
+ stub->args.fsyncdir_cbk.op_errno, stub->xdata);
else
stub->args.fsyncdir_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.fsyncdir_cbk.op_ret,
- stub->args.fsyncdir_cbk.op_errno);
+ stub->args.fsyncdir_cbk.op_errno, stub->xdata);
break;
}
@@ -3051,13 +3280,13 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.access_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.access_cbk.op_ret,
- stub->args.access_cbk.op_errno);
+ stub->args.access_cbk.op_errno, stub->xdata);
else
stub->args.access_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.access_cbk.op_ret,
- stub->args.access_cbk.op_errno);
+ stub->args.access_cbk.op_errno, stub->xdata);
break;
}
@@ -3069,7 +3298,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.ftruncate_cbk.op_ret,
stub->args.ftruncate_cbk.op_errno,
&stub->args.ftruncate_cbk.prebuf,
- &stub->args.ftruncate_cbk.postbuf);
+ &stub->args.ftruncate_cbk.postbuf, stub->xdata);
else
stub->args.ftruncate_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -3077,7 +3306,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.ftruncate_cbk.op_ret,
stub->args.ftruncate_cbk.op_errno,
&stub->args.ftruncate_cbk.prebuf,
- &stub->args.ftruncate_cbk.postbuf);
+ &stub->args.ftruncate_cbk.postbuf, stub->xdata);
break;
}
@@ -3087,14 +3316,14 @@ call_resume_unwind (call_stub_t *stub)
STACK_UNWIND (stub->frame,
stub->args.fstat_cbk.op_ret,
stub->args.fstat_cbk.op_errno,
- &stub->args.fstat_cbk.buf);
+ &stub->args.fstat_cbk.buf, stub->xdata);
else
stub->args.fstat_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.fstat_cbk.op_ret,
stub->args.fstat_cbk.op_errno,
- &stub->args.fstat_cbk.buf);
+ &stub->args.fstat_cbk.buf, stub->xdata);
break;
}
@@ -3105,14 +3334,14 @@ call_resume_unwind (call_stub_t *stub)
STACK_UNWIND (stub->frame,
stub->args.lk_cbk.op_ret,
stub->args.lk_cbk.op_errno,
- &stub->args.lk_cbk.lock);
+ &stub->args.lk_cbk.lock, stub->xdata);
else
stub->args.lk_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.lk_cbk.op_ret,
stub->args.lk_cbk.op_errno,
- &stub->args.lk_cbk.lock);
+ &stub->args.lk_cbk.lock, stub->xdata);
break;
}
@@ -3121,14 +3350,14 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.inodelk_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.inodelk_cbk.op_ret,
- stub->args.inodelk_cbk.op_errno);
+ stub->args.inodelk_cbk.op_errno, stub->xdata);
else
stub->args.inodelk_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.inodelk_cbk.op_ret,
- stub->args.inodelk_cbk.op_errno);
+ stub->args.inodelk_cbk.op_errno, stub->xdata);
break;
}
@@ -3137,14 +3366,14 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.finodelk_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.finodelk_cbk.op_ret,
- stub->args.finodelk_cbk.op_errno);
+ stub->args.finodelk_cbk.op_errno, stub->xdata);
else
stub->args.finodelk_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.finodelk_cbk.op_ret,
- stub->args.finodelk_cbk.op_errno);
+ stub->args.finodelk_cbk.op_errno, stub->xdata);
break;
}
@@ -3153,14 +3382,14 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.entrylk_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.entrylk_cbk.op_ret,
- stub->args.entrylk_cbk.op_errno);
+ stub->args.entrylk_cbk.op_errno, stub->xdata);
else
stub->args.entrylk_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.entrylk_cbk.op_ret,
- stub->args.entrylk_cbk.op_errno);
+ stub->args.entrylk_cbk.op_errno, stub->xdata);
break;
}
@@ -3169,14 +3398,14 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.fentrylk_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.fentrylk_cbk.op_ret,
- stub->args.fentrylk_cbk.op_errno);
+ stub->args.fentrylk_cbk.op_errno, stub->xdata);
else
stub->args.fentrylk_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.fentrylk_cbk.op_ret,
- stub->args.fentrylk_cbk.op_errno);
+ stub->args.fentrylk_cbk.op_errno, stub->xdata);
break;
}
@@ -3188,7 +3417,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.lookup_cbk.op_errno,
stub->args.lookup_cbk.inode,
&stub->args.lookup_cbk.buf,
- stub->args.lookup_cbk.dict,
+ stub->xdata,
&stub->args.lookup_cbk.postparent);
else
stub->args.lookup_cbk.fn (stub->frame,
@@ -3198,12 +3427,10 @@ call_resume_unwind (call_stub_t *stub)
stub->args.lookup_cbk.op_errno,
stub->args.lookup_cbk.inode,
&stub->args.lookup_cbk.buf,
- stub->args.lookup_cbk.dict,
+ stub->xdata,
&stub->args.lookup_cbk.postparent);
/* FIXME NULL should not be passed */
- if (stub->args.lookup_cbk.dict)
- dict_unref (stub->args.lookup_cbk.dict);
if (stub->args.lookup_cbk.inode)
inode_unref (stub->args.lookup_cbk.inode);
@@ -3217,7 +3444,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.rchecksum_cbk.op_ret,
stub->args.rchecksum_cbk.op_errno,
stub->args.rchecksum_cbk.weak_checksum,
- stub->args.rchecksum_cbk.strong_checksum);
+ stub->args.rchecksum_cbk.strong_checksum, stub->xdata);
else
stub->args.rchecksum_cbk.fn (stub->frame,
stub->frame->cookie,
@@ -3225,11 +3452,10 @@ call_resume_unwind (call_stub_t *stub)
stub->args.rchecksum_cbk.op_ret,
stub->args.rchecksum_cbk.op_errno,
stub->args.rchecksum_cbk.weak_checksum,
- stub->args.rchecksum_cbk.strong_checksum);
+ stub->args.rchecksum_cbk.strong_checksum, stub->xdata);
+
if (stub->args.rchecksum_cbk.op_ret >= 0)
- {
GF_FREE (stub->args.rchecksum_cbk.strong_checksum);
- }
break;
}
@@ -3240,14 +3466,14 @@ call_resume_unwind (call_stub_t *stub)
STACK_UNWIND (stub->frame,
stub->args.readdir_cbk.op_ret,
stub->args.readdir_cbk.op_errno,
- &stub->args.readdir_cbk.entries);
+ &stub->args.readdir_cbk.entries, stub->xdata);
else
stub->args.readdir_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.readdir_cbk.op_ret,
stub->args.readdir_cbk.op_errno,
- &stub->args.readdir_cbk.entries);
+ &stub->args.readdir_cbk.entries, stub->xdata);
if (stub->args.readdir_cbk.op_ret > 0)
gf_dirent_free (&stub->args.readdir_cbk.entries);
@@ -3261,14 +3487,14 @@ call_resume_unwind (call_stub_t *stub)
STACK_UNWIND (stub->frame,
stub->args.readdirp_cbk.op_ret,
stub->args.readdirp_cbk.op_errno,
- &stub->args.readdirp_cbk.entries);
+ &stub->args.readdirp_cbk.entries, stub->xdata);
else
stub->args.readdirp_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.readdirp_cbk.op_ret,
stub->args.readdirp_cbk.op_errno,
- &stub->args.readdirp_cbk.entries);
+ &stub->args.readdirp_cbk.entries, stub->xdata);
if (stub->args.readdirp_cbk.op_ret > 0)
gf_dirent_free (&stub->args.readdirp_cbk.entries);
@@ -3281,14 +3507,14 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.xattrop_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.xattrop_cbk.op_ret,
- stub->args.xattrop_cbk.op_errno);
+ stub->args.xattrop_cbk.op_errno, stub->xdata);
else
stub->args.xattrop_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.xattrop_cbk.op_ret,
stub->args.xattrop_cbk.op_errno,
- stub->args.xattrop_cbk.xattr);
+ stub->args.xattrop_cbk.xattr, stub->xdata);
if (stub->args.xattrop_cbk.xattr)
dict_unref (stub->args.xattrop_cbk.xattr);
@@ -3300,14 +3526,14 @@ call_resume_unwind (call_stub_t *stub)
if (!stub->args.fxattrop_cbk.fn)
STACK_UNWIND (stub->frame,
stub->args.fxattrop_cbk.op_ret,
- stub->args.fxattrop_cbk.op_errno);
+ stub->args.fxattrop_cbk.op_errno, stub->xdata);
else
stub->args.fxattrop_cbk.fn (stub->frame,
stub->frame->cookie,
stub->frame->this,
stub->args.fxattrop_cbk.op_ret,
stub->args.fxattrop_cbk.op_errno,
- stub->args.fxattrop_cbk.xattr);
+ stub->args.fxattrop_cbk.xattr, stub->xdata);
if (stub->args.fxattrop_cbk.xattr)
dict_unref (stub->args.fxattrop_cbk.xattr);
@@ -3321,7 +3547,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.setattr_cbk.op_ret,
stub->args.setattr_cbk.op_errno,
&stub->args.setattr_cbk.statpre,
- &stub->args.setattr_cbk.statpost);
+ &stub->args.setattr_cbk.statpost, stub->xdata);
else
stub->args.setattr_cbk.fn (
stub->frame,
@@ -3330,7 +3556,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.setattr_cbk.op_ret,
stub->args.setattr_cbk.op_errno,
&stub->args.setattr_cbk.statpre,
- &stub->args.setattr_cbk.statpost);
+ &stub->args.setattr_cbk.statpost, stub->xdata);
break;
}
case GF_FOP_FSETATTR:
@@ -3340,7 +3566,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.fsetattr_cbk.op_ret,
stub->args.fsetattr_cbk.op_errno,
&stub->args.fsetattr_cbk.statpre,
- &stub->args.fsetattr_cbk.statpost);
+ &stub->args.fsetattr_cbk.statpost, stub->xdata);
else
stub->args.fsetattr_cbk.fn (
stub->frame,
@@ -3349,7 +3575,7 @@ call_resume_unwind (call_stub_t *stub)
stub->args.fsetattr_cbk.op_ret,
stub->args.fsetattr_cbk.op_errno,
&stub->args.fsetattr_cbk.statpre,
- &stub->args.fsetattr_cbk.statpost);
+ &stub->args.fsetattr_cbk.statpost, stub->xdata);
break;
}
default:
@@ -3368,6 +3594,9 @@ out:
static void
call_stub_destroy_wind (call_stub_t *stub)
{
+ if (stub->xdata)
+ dict_unref (stub->xdata);
+
switch (stub->fop) {
case GF_FOP_OPEN:
{
@@ -3381,8 +3610,6 @@ call_stub_destroy_wind (call_stub_t *stub)
loc_wipe (&stub->args.create.loc);
if (stub->args.create.fd)
fd_unref (stub->args.create.fd);
- if (stub->args.create.params)
- dict_unref (stub->args.create.params);
break;
}
case GF_FOP_STAT:
@@ -3399,16 +3626,12 @@ call_stub_destroy_wind (call_stub_t *stub)
case GF_FOP_MKNOD:
{
loc_wipe (&stub->args.mknod.loc);
- if (stub->args.mknod.params)
- dict_unref (stub->args.mknod.params);
}
break;
case GF_FOP_MKDIR:
{
loc_wipe (&stub->args.mkdir.loc);
- if (stub->args.mkdir.params)
- dict_unref (stub->args.mkdir.params);
}
break;
@@ -3428,8 +3651,6 @@ call_stub_destroy_wind (call_stub_t *stub)
{
GF_FREE ((char *)stub->args.symlink.linkname);
loc_wipe (&stub->args.symlink.loc);
- if (stub->args.symlink.params)
- dict_unref (stub->args.symlink.params);
}
break;
@@ -3621,8 +3842,6 @@ call_stub_destroy_wind (call_stub_t *stub)
case GF_FOP_LOOKUP:
{
loc_wipe (&stub->args.lookup.loc);
- if (stub->args.lookup.xattr_req)
- dict_unref (stub->args.lookup.xattr_req);
break;
}
@@ -3645,9 +3864,6 @@ call_stub_destroy_wind (call_stub_t *stub)
if (stub->args.readdirp.fd)
fd_unref (stub->args.readdirp.fd);
- if (stub->args.readdirp.dict)
- dict_unref (stub->args.readdirp.dict);
-
break;
}
@@ -3689,6 +3905,9 @@ call_stub_destroy_wind (call_stub_t *stub)
static void
call_stub_destroy_unwind (call_stub_t *stub)
{
+ if (stub->xdata)
+ dict_unref (stub->xdata);
+
switch (stub->fop) {
case GF_FOP_OPEN:
{
@@ -3845,9 +4064,6 @@ call_stub_destroy_unwind (call_stub_t *stub)
{
if (stub->args.lookup_cbk.inode)
inode_unref (stub->args.lookup_cbk.inode);
-
- if (stub->args.lookup_cbk.dict)
- dict_unref (stub->args.lookup_cbk.dict);
}
break;