summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/call-stub.c720
-rw-r--r--libglusterfs/src/call-stub.h187
-rw-r--r--libglusterfs/src/defaults.c563
-rw-r--r--libglusterfs/src/defaults.h320
-rw-r--r--libglusterfs/src/syncop.c122
-rw-r--r--libglusterfs/src/syncop.h1
-rw-r--r--libglusterfs/src/xlator.h177
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.c73
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.h32
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.x18
-rw-r--r--xlators/cluster/afr/src/afr-common.c143
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.c38
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.h6
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c115
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.h20
-rw-r--r--xlators/cluster/afr/src/afr-inode-read.c249
-rw-r--r--xlators/cluster/afr/src/afr-inode-read.h14
-rw-r--r--xlators/cluster/afr/src/afr-inode-write.c114
-rw-r--r--xlators/cluster/afr/src/afr-inode-write.h28
-rw-r--r--xlators/cluster/afr/src/afr-lk-common.c81
-rw-r--r--xlators/cluster/afr/src/afr-open.c27
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-algorithm.c15
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c14
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.h4
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c38
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c78
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-metadata.c30
-rw-r--r--xlators/cluster/afr/src/afr-transaction.c71
-rw-r--r--xlators/cluster/afr/src/afr.h13
-rw-r--r--xlators/cluster/afr/src/pump.c187
-rw-r--r--xlators/cluster/dht/src/dht-common.c329
-rw-r--r--xlators/cluster/dht/src/dht-common.h100
-rw-r--r--xlators/cluster/dht/src/dht-diskusage.c7
-rw-r--r--xlators/cluster/dht/src/dht-inode-read.c174
-rw-r--r--xlators/cluster/dht/src/dht-inode-write.c65
-rw-r--r--xlators/cluster/dht/src/dht-linkfile.c14
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c2
-rw-r--r--xlators/cluster/dht/src/dht-rename.c72
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c17
-rw-r--r--xlators/cluster/dht/src/nufa.c35
-rw-r--r--xlators/cluster/dht/src/switch.c34
-rw-r--r--xlators/cluster/stripe/src/Makefile.am4
-rw-r--r--xlators/cluster/stripe/src/stripe-helpers.c507
-rw-r--r--xlators/cluster/stripe/src/stripe.c966
-rw-r--r--xlators/cluster/stripe/src/stripe.h22
-rw-r--r--xlators/debug/error-gen/src/error-gen.c669
-rw-r--r--xlators/debug/io-stats/src/io-stats.c334
-rw-r--r--xlators/debug/trace/src/trace.c348
-rw-r--r--xlators/encryption/rot-13/src/rot-13.c18
-rw-r--r--xlators/features/Makefile.am2
-rw-r--r--xlators/features/index/src/index.c82
-rw-r--r--xlators/features/locks/src/clear.c9
-rw-r--r--xlators/features/locks/src/common.c6
-rw-r--r--xlators/features/locks/src/entrylk.c8
-rw-r--r--xlators/features/locks/src/inodelk.c6
-rw-r--r--xlators/features/locks/src/locks.h1
-rw-r--r--xlators/features/locks/src/posix.c194
-rw-r--r--xlators/features/locks/src/reservelk.c7
-rw-r--r--xlators/features/mac-compat/src/mac-compat.c25
-rw-r--r--xlators/features/marker/src/marker-quota.c164
-rw-r--r--xlators/features/marker/src/marker-quota.h2
-rw-r--r--xlators/features/marker/src/marker.c269
-rw-r--r--xlators/features/marker/src/marker.h2
-rw-r--r--xlators/features/quiesce/src/quiesce.c595
-rw-r--r--xlators/features/quota/src/quota.c309
-rw-r--r--xlators/features/read-only/src/read-only-common.c109
-rw-r--r--xlators/features/read-only/src/read-only-common.h52
-rw-r--r--xlators/features/read-only/src/worm.c11
-rw-r--r--xlators/lib/src/libxlator.c20
-rw-r--r--xlators/lib/src/libxlator.h7
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c188
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.h4
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c9
-rw-r--r--xlators/mount/fuse/src/fuse-resolve.c8
-rw-r--r--xlators/nfs/server/src/nfs-fops.c152
-rw-r--r--xlators/nfs/server/src/nfs-fops.h2
-rw-r--r--xlators/nfs/server/src/nfs-generics.c2
-rw-r--r--xlators/nfs/server/src/nfs-inodes.c46
-rw-r--r--xlators/nfs/server/src/nfs-inodes.h2
-rw-r--r--xlators/nfs/server/src/nfs3.c67
-rw-r--r--xlators/nfs/server/src/nlm4.c18
-rw-r--r--xlators/performance/io-cache/src/io-cache.c114
-rw-r--r--xlators/performance/io-cache/src/io-cache.h3
-rw-r--r--xlators/performance/io-cache/src/page.c7
-rw-r--r--xlators/performance/io-threads/src/io-threads.c625
-rw-r--r--xlators/performance/md-cache/src/md-cache.c243
-rw-r--r--xlators/performance/quick-read/src/quick-read.c328
-rw-r--r--xlators/performance/read-ahead/src/page.c7
-rw-r--r--xlators/performance/read-ahead/src/read-ahead.c105
-rw-r--r--xlators/performance/symlink-cache/src/symlink-cache.c34
-rw-r--r--xlators/performance/write-behind/src/write-behind.c207
-rw-r--r--xlators/protocol/client/src/client-handshake.c1
-rw-r--r--xlators/protocol/client/src/client-lk.c14
-rw-r--r--xlators/protocol/client/src/client.c233
-rw-r--r--xlators/protocol/client/src/client.h6
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c1237
-rw-r--r--xlators/protocol/server/src/server-helpers.c19
-rw-r--r--xlators/protocol/server/src/server-resolve.c5
-rw-r--r--xlators/protocol/server/src/server.h3
-rw-r--r--xlators/protocol/server/src/server3_1-fops.c1429
-rw-r--r--xlators/storage/posix/src/posix.c213
-rw-r--r--xlators/system/posix-acl/src/posix-acl.c258
102 files changed, 8422 insertions, 6262 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c
index 9b3a9c3..01e919d 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;
diff --git a/libglusterfs/src/call-stub.h b/libglusterfs/src/call-stub.h
index 081f6d2..85e04ec 100644
--- a/libglusterfs/src/call-stub.h
+++ b/libglusterfs/src/call-stub.h
@@ -34,21 +34,20 @@ typedef struct {
char wind;
call_frame_t *frame;
glusterfs_fop_t fop;
- struct mem_pool *stub_mem_pool; /* pointer to stub mempool in glusterfs ctx */
+ struct mem_pool *stub_mem_pool; /* pointer to stub mempool in ctx_t */
+ dict_t *xdata; /* common accross all the fops */
union {
/* lookup */
struct {
fop_lookup_t fn;
loc_t loc;
- dict_t *xattr_req;
} lookup;
struct {
fop_lookup_cbk_t fn;
int32_t op_ret, op_errno;
inode_t *inode;
struct iatt buf;
- dict_t *dict;
struct iatt postparent;
} lookup_cbk;
@@ -130,7 +129,7 @@ typedef struct {
loc_t loc;
mode_t mode;
dev_t rdev;
- dict_t *params;
+ mode_t umask;
} mknod;
struct {
fop_mknod_cbk_t fn;
@@ -146,7 +145,7 @@ typedef struct {
fop_mkdir_t fn;
loc_t loc;
mode_t mode;
- dict_t *params;
+ mode_t umask;
} mkdir;
struct {
fop_mkdir_cbk_t fn;
@@ -161,6 +160,7 @@ typedef struct {
struct {
fop_unlink_t fn;
loc_t loc;
+ int xflag;
} unlink;
struct {
fop_unlink_cbk_t fn;
@@ -187,7 +187,7 @@ typedef struct {
fop_symlink_t fn;
const char *linkname;
loc_t loc;
- dict_t *params;
+ mode_t umask;
} symlink;
struct {
fop_symlink_cbk_t fn;
@@ -236,7 +236,7 @@ typedef struct {
int32_t flags;
mode_t mode;
fd_t *fd;
- dict_t *params;
+ mode_t umask;
} create;
struct {
fop_create_cbk_t fn;
@@ -254,7 +254,6 @@ typedef struct {
loc_t loc;
int32_t flags;
fd_t *fd;
- int32_t wbflags;
} open;
struct {
fop_open_cbk_t fn;
@@ -516,7 +515,6 @@ typedef struct {
fd_t *fd;
size_t size;
off_t off;
- dict_t *dict;
} readdirp;
struct {
fop_readdirp_cbk_t fn;
@@ -603,7 +601,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 *
fop_lookup_cbk_stub (call_frame_t *frame,
@@ -612,34 +610,34 @@ 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 *
fop_stat_stub (call_frame_t *frame,
fop_stat_t fn,
- loc_t *loc);
+ loc_t *loc, dict_t *xdata);
call_stub_t *
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 *
fop_fstat_stub (call_frame_t *frame,
fop_fstat_t fn,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
call_stub_t *
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 *
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 *
fop_truncate_cbk_stub (call_frame_t *frame,
@@ -647,13 +645,13 @@ 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 *
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 *
fop_ftruncate_cbk_stub (call_frame_t *frame,
@@ -661,25 +659,25 @@ 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 *
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 *
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 *
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 *
fop_readlink_cbk_stub (call_frame_t *frame,
@@ -687,11 +685,11 @@ fop_readlink_cbk_stub (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
const char *path,
- struct iatt *buf);
+ struct iatt *buf, dict_t *xdata);
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 *
fop_mknod_cbk_stub (call_frame_t *frame,
@@ -701,11 +699,11 @@ 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 *
-fop_mkdir_stub (call_frame_t *frame, fop_mkdir_t fn,
- loc_t *loc, mode_t mode, dict_t *params);
+fop_mkdir_stub (call_frame_t *frame, fop_mkdir_t fn, loc_t *loc, mode_t mode,
+ mode_t umask, dict_t *xdata);
call_stub_t *
fop_mkdir_cbk_stub (call_frame_t *frame,
@@ -715,12 +713,11 @@ 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 *
-fop_unlink_stub (call_frame_t *frame,
- fop_unlink_t fn,
- loc_t *loc);
+fop_unlink_stub (call_frame_t *frame, fop_unlink_t fn,
+ loc_t *loc, int xflag, dict_t *xdata);
call_stub_t *
fop_unlink_cbk_stub (call_frame_t *frame,
@@ -728,11 +725,11 @@ 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 *
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 *
fop_rmdir_cbk_stub (call_frame_t *frame,
@@ -740,11 +737,11 @@ 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 *
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 *
fop_symlink_cbk_stub (call_frame_t *frame,
@@ -754,13 +751,13 @@ 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 *
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 *
fop_rename_cbk_stub (call_frame_t *frame,
@@ -771,13 +768,13 @@ 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 *
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 *
fop_link_cbk_stub (call_frame_t *frame,
@@ -787,12 +784,12 @@ 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 *
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 *
fop_create_cbk_stub (call_frame_t *frame,
@@ -803,7 +800,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 *
fop_open_stub (call_frame_t *frame,
@@ -811,21 +808,21 @@ fop_open_stub (call_frame_t *frame,
loc_t *loc,
int32_t flags,
fd_t *fd,
- int32_t wbflags);
+ dict_t *xdata);
call_stub_t *
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 *
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 *
fop_readv_cbk_stub (call_frame_t *frame,
@@ -835,7 +832,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 *
fop_writev_stub (call_frame_t *frame,
@@ -844,7 +841,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 *
fop_writev_cbk_stub (call_frame_t *frame,
@@ -852,24 +849,24 @@ 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 *
fop_flush_stub (call_frame_t *frame,
fop_flush_t fn,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
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 *
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 *
fop_fsync_cbk_stub (call_frame_t *frame,
@@ -877,177 +874,177 @@ 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 *
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 *
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 *
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 *
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 *
fop_statfs_stub (call_frame_t *frame,
fop_statfs_t fn,
- loc_t *loc);
+ loc_t *loc, dict_t *xdata);
call_stub_t *
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 *
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 *
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 *
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 *
fop_getxattr_cbk_stub (call_frame_t *frame,
fop_getxattr_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- dict_t *value);
+ dict_t *value, dict_t *xdata);
call_stub_t *
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 *
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 *
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 *
fop_fgetxattr_cbk_stub (call_frame_t *frame,
fop_fgetxattr_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
- dict_t *value);
+ dict_t *value, dict_t *xdata);
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 *
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 *
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 *
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 *
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 *
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 *
fop_inodelk_stub (call_frame_t *frame, fop_inodelk_t fn,
const char *volume, loc_t *loc, int32_t cmd,
- struct gf_flock *lock);
+ struct gf_flock *lock, dict_t *xdata);
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);
+ struct gf_flock *lock, dict_t *xdata);
call_stub_t *
fop_entrylk_stub (call_frame_t *frame, fop_entrylk_t fn,
const char *volume, loc_t *loc, const char *basename,
- entrylk_cmd cmd, entrylk_type type);
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata);
call_stub_t *
fop_fentrylk_stub (call_frame_t *frame, fop_fentrylk_t fn,
const char *volume, fd_t *fd, const char *basename,
- entrylk_cmd cmd, entrylk_type type);
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata);
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 *
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 *
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 *
fop_fentrylk_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 *
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 *
fop_readdirp_stub (call_frame_t *frame,
@@ -1055,27 +1052,27 @@ 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 *
fop_readdirp_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 *
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 *
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 *
fop_rchecksum_cbk_stub (call_frame_t *frame,
@@ -1083,40 +1080,40 @@ 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 *
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 *
fop_xattrop_stub_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 *
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 *
fop_fxattrop_stub_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 *
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 *
fop_setattr_cbk_stub (call_frame_t *frame,
@@ -1124,14 +1121,14 @@ 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 *
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 *
fop_fsetattr_cbk_stub (call_frame_t *frame,
@@ -1139,7 +1136,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);
void call_resume (call_stub_t *stub);
void call_stub_destroy (call_stub_t *stub);
diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c
index 387e910..a3f506d 100644
--- a/libglusterfs/src/defaults.c
+++ b/libglusterfs/src/defaults.c
@@ -41,18 +41,19 @@
int32_t
default_lookup_cbk (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 *dict, struct iatt *postparent)
+ struct iatt *buf, dict_t *xdata, struct iatt *postparent)
{
STACK_UNWIND_STRICT (lookup, frame, op_ret, op_errno, inode, buf,
- dict, postparent);
+ xdata, postparent);
return 0;
}
int32_t
default_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct iatt *buf)
+ int32_t op_ret, int32_t op_errno, struct iatt *buf,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (stat, frame, op_ret, op_errno, buf);
+ STACK_UNWIND_STRICT (stat, frame, op_ret, op_errno, buf, xdata);
return 0;
}
@@ -60,37 +61,41 @@ default_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t
default_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf,
+ dict_t *xdata)
{
STACK_UNWIND_STRICT (truncate, frame, op_ret, op_errno, prebuf,
- postbuf);
+ postbuf, xdata);
return 0;
}
int32_t
default_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf,
+ dict_t *xdata)
{
STACK_UNWIND_STRICT (ftruncate, frame, op_ret, op_errno, prebuf,
- postbuf);
+ postbuf, xdata);
return 0;
}
int32_t
default_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (access, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (access, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
default_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, const char *path,
- struct iatt *buf)
+ struct iatt *buf, dict_t *xdata)
{
- STACK_UNWIND_STRICT (readlink, frame, op_ret, op_errno, path, buf);
+ STACK_UNWIND_STRICT (readlink, frame, op_ret, op_errno, path, buf,
+ xdata);
return 0;
}
@@ -99,10 +104,10 @@ int32_t
default_mknod_cbk (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)
+ struct iatt *postparent, dict_t *xdata)
{
STACK_UNWIND_STRICT (mknod, frame, op_ret, op_errno, inode,
- buf, preparent, postparent);
+ buf, preparent, postparent, xdata);
return 0;
}
@@ -110,30 +115,31 @@ int32_t
default_mkdir_cbk (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)
+ struct iatt *postparent, dict_t *xdata)
{
STACK_UNWIND_STRICT (mkdir, frame, op_ret, op_errno, inode,
- buf, preparent, postparent);
+ buf, preparent, postparent, xdata);
return 0;
}
int32_t
default_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
STACK_UNWIND_STRICT (unlink, frame, op_ret, op_errno, preparent,
- postparent);
+ postparent, xdata);
return 0;
}
int32_t
default_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent,
+ dict_t *xdata)
{
STACK_UNWIND_STRICT (rmdir, frame, op_ret, op_errno, preparent,
- postparent);
+ postparent, xdata);
return 0;
}
@@ -142,10 +148,10 @@ int32_t
default_symlink_cbk (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)
+ struct iatt *postparent, dict_t *xdata)
{
STACK_UNWIND_STRICT (symlink, frame, op_ret, op_errno, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
@@ -154,10 +160,11 @@ int32_t
default_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *buf,
struct iatt *preoldparent, struct iatt *postoldparent,
- struct iatt *prenewparent, struct iatt *postnewparent)
+ struct iatt *prenewparent, struct iatt *postnewparent,
+ dict_t *xdata)
{
STACK_UNWIND_STRICT (rename, frame, op_ret, op_errno, buf, preoldparent,
- postoldparent, prenewparent, postnewparent);
+ postoldparent, prenewparent, postnewparent, xdata);
return 0;
}
@@ -166,10 +173,11 @@ int32_t
default_link_cbk (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)
+ struct iatt *postparent,
+ dict_t *xdata)
{
STACK_UNWIND_STRICT (link, frame, op_ret, op_errno, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
@@ -178,28 +186,31 @@ int32_t
default_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, fd_t *fd, inode_t *inode,
struct iatt *buf, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent,
+ dict_t *xdata)
{
STACK_UNWIND_STRICT (create, frame, op_ret, op_errno, fd, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
int32_t
default_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, fd_t *fd)
+ int32_t op_ret, int32_t op_errno, fd_t *fd,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (open, frame, op_ret, op_errno, fd);
+ STACK_UNWIND_STRICT (open, frame, op_ret, op_errno, fd, xdata);
return 0;
}
int32_t
default_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iovec *vector,
- int32_t count, struct iatt *stbuf, struct iobref *iobref)
+ int32_t count, struct iatt *stbuf, struct iobref *iobref,
+ dict_t *xdata)
{
STACK_UNWIND_STRICT (readv, frame, op_ret, op_errno, vector, count,
- stbuf, iobref);
+ stbuf, iobref, xdata);
return 0;
}
@@ -207,18 +218,20 @@ default_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t
default_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (writev, frame, op_ret, op_errno, prebuf, postbuf);
+ STACK_UNWIND_STRICT (writev, frame, op_ret, op_errno, prebuf, postbuf, xdata);
return 0;
}
int32_t
default_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (flush, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (flush, frame, op_ret, op_errno, xdata);
return 0;
}
@@ -227,59 +240,67 @@ default_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t
default_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (fsync, frame, op_ret, op_errno, prebuf, postbuf);
+ STACK_UNWIND_STRICT (fsync, frame, op_ret, op_errno, prebuf, postbuf,
+ xdata);
return 0;
}
int32_t
default_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct iatt *buf)
+ int32_t op_ret, int32_t op_errno, struct iatt *buf,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (fstat, frame, op_ret, op_errno, buf);
+ STACK_UNWIND_STRICT (fstat, frame, op_ret, op_errno, buf, xdata);
return 0;
}
int32_t
default_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, fd_t *fd)
+ int32_t op_ret, int32_t op_errno, fd_t *fd,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (opendir, frame, op_ret, op_errno, fd);
+ STACK_UNWIND_STRICT (opendir, frame, op_ret, op_errno, fd, xdata);
return 0;
}
int32_t
default_fsyncdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (fsyncdir, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (fsyncdir, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
default_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct statvfs *buf)
+ int32_t op_ret, int32_t op_errno, struct statvfs *buf,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (statfs, frame, op_ret, op_errno, buf);
+ STACK_UNWIND_STRICT (statfs, frame, op_ret, op_errno, buf, xdata);
return 0;
}
int32_t
default_setxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (setxattr, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (setxattr, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
default_fsetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (fsetxattr, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (fsetxattr, frame, op_ret, op_errno, xdata);
return 0;
}
@@ -287,93 +308,104 @@ default_fsetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t
default_fgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *dict)
+ int32_t op_ret, int32_t op_errno, dict_t *dict,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (fgetxattr, frame, op_ret, op_errno, dict);
+ STACK_UNWIND_STRICT (fgetxattr, frame, op_ret, op_errno, dict, xdata);
return 0;
}
int32_t
default_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *dict)
+ int32_t op_ret, int32_t op_errno, dict_t *dict,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (getxattr, frame, op_ret, op_errno, dict);
+ STACK_UNWIND_STRICT (getxattr, frame, op_ret, op_errno, dict, xdata);
return 0;
}
int32_t
default_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *dict)
+ int32_t op_ret, int32_t op_errno, dict_t *dict,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (xattrop, frame, op_ret, op_errno, dict);
+ STACK_UNWIND_STRICT (xattrop, frame, op_ret, op_errno, dict, xdata);
return 0;
}
int32_t
default_fxattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *dict)
+ int32_t op_ret, int32_t op_errno, dict_t *dict,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (fxattrop, frame, op_ret, op_errno, dict);
+ STACK_UNWIND_STRICT (fxattrop, frame, op_ret, op_errno, dict, xdata);
return 0;
}
int32_t
default_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (removexattr, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (removexattr, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
default_fremovexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (fremovexattr, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (fremovexattr, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
default_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct gf_flock *lock)
+ int32_t op_ret, int32_t op_errno, struct gf_flock *lock,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (lk, frame, op_ret, op_errno, lock);
+ STACK_UNWIND_STRICT (lk, frame, op_ret, op_errno, lock, xdata);
return 0;
}
int32_t
default_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (inodelk, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (inodelk, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
default_finodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (finodelk, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (finodelk, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
default_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (entrylk, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (entrylk, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
default_fentrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (fentrylk, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (fentrylk, frame, op_ret, op_errno, xdata);
return 0;
}
@@ -381,48 +413,53 @@ default_fentrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t
default_rchecksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, uint32_t weak_checksum,
- uint8_t *strong_checksum)
+ uint8_t *strong_checksum,
+ dict_t *xdata)
{
STACK_UNWIND_STRICT (rchecksum, frame, op_ret, op_errno, weak_checksum,
- strong_checksum);
+ strong_checksum, xdata);
return 0;
}
int32_t
default_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, gf_dirent_t *entries)
+ int32_t op_ret, int32_t op_errno, gf_dirent_t *entries,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (readdir, frame, op_ret, op_errno, entries);
+ STACK_UNWIND_STRICT (readdir, frame, op_ret, op_errno, entries, xdata);
return 0;
}
int32_t
default_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, gf_dirent_t *entries)
+ int32_t op_ret, int32_t op_errno, gf_dirent_t *entries,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (readdirp, frame, op_ret, op_errno, entries);
+ STACK_UNWIND_STRICT (readdirp, frame, op_ret, op_errno, entries, xdata);
return 0;
}
int32_t
default_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *statpre,
- struct iatt *statpost)
+ struct iatt *statpost,
+ dict_t *xdata)
{
STACK_UNWIND_STRICT (setattr, frame, op_ret, op_errno, statpre,
- statpost);
+ statpost, xdata);
return 0;
}
int32_t
default_fsetattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *statpre,
- struct iatt *statpost)
+ struct iatt *statpost,
+ dict_t *xdata)
{
STACK_UNWIND_STRICT (fsetattr, frame, op_ret, op_errno, statpre,
- statpost);
+ statpost, xdata);
return 0;
}
@@ -438,266 +475,271 @@ default_getspec_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t
default_fgetxattr_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- const char *name)
+ const char *name, dict_t *xdata)
{
STACK_WIND (frame, default_fgetxattr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fgetxattr, fd, name);
+ FIRST_CHILD(this)->fops->fgetxattr, fd, name, xdata);
return 0;
}
int32_t
default_fsetxattr_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- dict_t *dict, int32_t flags)
+ dict_t *dict, int32_t flags, dict_t *xdata)
{
STACK_WIND (frame, default_fsetxattr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fsetxattr, fd, dict, flags);
+ FIRST_CHILD(this)->fops->fsetxattr, fd, dict, flags, xdata);
return 0;
}
int32_t
default_setxattr_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- dict_t *dict, int32_t flags)
+ dict_t *dict, int32_t flags, dict_t *xdata)
{
STACK_WIND (frame, default_setxattr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->setxattr, loc, dict, flags);
+ FIRST_CHILD(this)->fops->setxattr, loc, dict, flags, xdata);
return 0;
}
int32_t
-default_statfs_resume (call_frame_t *frame, xlator_t *this, loc_t *loc)
+default_statfs_resume (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
STACK_WIND (frame, default_statfs_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->statfs, loc);
+ FIRST_CHILD(this)->fops->statfs, loc, xdata);
return 0;
}
int32_t
default_fsyncdir_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int32_t flags)
+ int32_t flags, dict_t *xdata)
{
STACK_WIND (frame, default_fsyncdir_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fsyncdir, fd, flags);
+ FIRST_CHILD(this)->fops->fsyncdir, fd, flags, xdata);
return 0;
}
int32_t
default_opendir_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- fd_t *fd)
+ fd_t *fd, dict_t *xdata)
{
STACK_WIND (frame, default_opendir_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->opendir, loc, fd);
+ FIRST_CHILD(this)->fops->opendir, loc, fd, xdata);
return 0;
}
int32_t
-default_fstat_resume (call_frame_t *frame, xlator_t *this, fd_t *fd)
+default_fstat_resume (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
STACK_WIND (frame, default_fstat_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fstat, fd);
+ FIRST_CHILD(this)->fops->fstat, fd, xdata);
return 0;
}
int32_t
default_fsync_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int32_t flags)
+ int32_t flags, dict_t *xdata)
{
STACK_WIND (frame, default_fsync_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fsync, fd, flags);
+ FIRST_CHILD(this)->fops->fsync, fd, flags, xdata);
return 0;
}
int32_t
-default_flush_resume (call_frame_t *frame, xlator_t *this, fd_t *fd)
+default_flush_resume (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
STACK_WIND (frame, default_flush_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->flush, fd);
+ FIRST_CHILD(this)->fops->flush, fd, xdata);
return 0;
}
int32_t
default_writev_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
struct iovec *vector, int32_t count, off_t off,
- uint32_t flags, struct iobref *iobref)
+ uint32_t flags, struct iobref *iobref, dict_t *xdata)
{
STACK_WIND (frame, default_writev_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->writev, fd, vector, count, off,
- flags, iobref);
+ flags, iobref, xdata);
return 0;
}
int32_t
default_readv_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- size_t size, off_t offset, uint32_t flags)
+ size_t size, off_t offset, uint32_t flags, dict_t *xdata)
{
STACK_WIND (frame, default_readv_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->readv, fd, size, offset, flags);
+ FIRST_CHILD(this)->fops->readv, fd, size, offset, flags, xdata);
return 0;
}
int32_t
default_open_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- int32_t flags, fd_t *fd, int32_t wbflags)
+ int32_t flags, fd_t *fd, dict_t *xdata)
{
STACK_WIND (frame, default_open_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->open, loc, flags, fd, wbflags);
+ FIRST_CHILD(this)->fops->open, loc, flags, fd, xdata);
return 0;
}
int32_t
default_create_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- int32_t flags, mode_t mode, fd_t *fd, dict_t *params)
+ int32_t flags, mode_t mode, mode_t umask, fd_t *fd,
+ dict_t *xdata)
{
STACK_WIND (frame, default_create_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->create, loc, flags, mode, fd,
- params);
+ FIRST_CHILD(this)->fops->create, loc, flags, mode, umask,
+ fd, xdata);
return 0;
}
int32_t
default_link_resume (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
- loc_t *newloc)
+ loc_t *newloc, dict_t *xdata)
{
STACK_WIND (frame, default_link_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->link, oldloc, newloc);
+ FIRST_CHILD(this)->fops->link, oldloc, newloc, xdata);
return 0;
}
int32_t
default_rename_resume (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
- loc_t *newloc)
+ loc_t *newloc, dict_t *xdata)
{
STACK_WIND (frame, default_rename_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->rename, oldloc, newloc);
+ FIRST_CHILD(this)->fops->rename, oldloc, newloc, xdata);
return 0;
}
int
default_symlink_resume (call_frame_t *frame, xlator_t *this,
- const char *linkpath, loc_t *loc, dict_t *params)
+ const char *linkpath, loc_t *loc, mode_t umask,
+ dict_t *xdata)
{
STACK_WIND (frame, default_symlink_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->symlink, linkpath, loc, params);
+ FIRST_CHILD(this)->fops->symlink, linkpath, loc, umask,
+ xdata);
return 0;
}
int32_t
default_rmdir_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- int flags)
+ int flags, dict_t *xdata)
{
STACK_WIND (frame, default_rmdir_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->rmdir, loc, flags);
+ FIRST_CHILD(this)->fops->rmdir, loc, flags, xdata);
return 0;
}
int32_t
-default_unlink_resume (call_frame_t *frame, xlator_t *this, loc_t *loc)
+default_unlink_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ int xflag, dict_t *xdata)
{
STACK_WIND (frame, default_unlink_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->unlink, loc);
+ FIRST_CHILD(this)->fops->unlink, loc, xflag, xdata);
return 0;
}
int
default_mkdir_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- mode_t mode, dict_t *params)
+ mode_t mode, mode_t umask, dict_t *xdata)
{
STACK_WIND (frame, default_mkdir_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->mkdir, loc, mode, params);
+ FIRST_CHILD(this)->fops->mkdir, loc, mode, umask, xdata);
return 0;
}
int
default_mknod_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- mode_t mode, dev_t rdev, dict_t *parms)
+ mode_t mode, dev_t rdev, mode_t umask, dict_t *xdata)
{
STACK_WIND (frame, default_mknod_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->mknod, loc, mode, rdev, parms);
+ FIRST_CHILD(this)->fops->mknod, loc, mode, rdev, umask,
+ xdata);
return 0;
}
int32_t
default_readlink_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- size_t size)
+ size_t size, dict_t *xdata)
{
STACK_WIND (frame, default_readlink_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->readlink, loc, size);
+ FIRST_CHILD(this)->fops->readlink, loc, size, xdata);
return 0;
}
int32_t
default_access_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- int32_t mask)
+ int32_t mask, dict_t *xdata)
{
STACK_WIND (frame, default_access_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->access, loc, mask);
+ FIRST_CHILD(this)->fops->access, loc, mask, xdata);
return 0;
}
int32_t
default_ftruncate_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- off_t offset)
+ off_t offset, dict_t *xdata)
{
STACK_WIND (frame, default_ftruncate_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->ftruncate, fd, offset);
+ FIRST_CHILD(this)->fops->ftruncate, fd, offset, xdata);
return 0;
}
int32_t
default_getxattr_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- const char *name)
+ const char *name, dict_t *xdata)
{
STACK_WIND (frame, default_getxattr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->getxattr, loc, name);
+ FIRST_CHILD(this)->fops->getxattr, loc, name, xdata);
return 0;
}
int32_t
default_xattrop_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- gf_xattrop_flags_t flags, dict_t *dict)
+ gf_xattrop_flags_t flags, dict_t *dict, dict_t *xdata)
{
STACK_WIND (frame, default_xattrop_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->xattrop, loc, flags, dict);
+ FIRST_CHILD(this)->fops->xattrop, loc, flags, dict, xdata);
return 0;
}
int32_t
default_fxattrop_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- gf_xattrop_flags_t flags, dict_t *dict)
+ gf_xattrop_flags_t flags, dict_t *dict, dict_t *xdata)
{
STACK_WIND (frame, default_fxattrop_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fxattrop, fd, flags, dict);
+ FIRST_CHILD(this)->fops->fxattrop, fd, flags, dict, xdata);
return 0;
}
int32_t
default_removexattr_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- const char *name)
+ const char *name, dict_t *xdata)
{
STACK_WIND (frame, default_removexattr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->removexattr, loc, name);
+ FIRST_CHILD(this)->fops->removexattr, loc, name, xdata);
return 0;
}
int32_t
default_fremovexattr_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- const char *name)
+ const char *name, dict_t *xdata)
{
STACK_WIND (frame, default_fremovexattr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fremovexattr, fd, name);
+ FIRST_CHILD(this)->fops->fremovexattr, fd, name, xdata);
return 0;
}
int32_t
default_lk_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int32_t cmd, struct gf_flock *lock)
+ int32_t cmd, struct gf_flock *lock, dict_t *xdata)
{
STACK_WIND (frame, default_lk_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->lk, fd, cmd, lock);
+ FIRST_CHILD(this)->fops->lk, fd, cmd, lock, xdata);
return 0;
}
@@ -705,117 +747,127 @@ default_lk_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
int32_t
default_inodelk_resume (call_frame_t *frame, xlator_t *this,
const char *volume, loc_t *loc, int32_t cmd,
- struct gf_flock *lock)
+ struct gf_flock *lock,
+ dict_t *xdata)
{
STACK_WIND (frame, default_inodelk_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->inodelk,
- volume, loc, cmd, lock);
+ volume, loc, cmd, lock, xdata);
return 0;
}
int32_t
default_finodelk_resume (call_frame_t *frame, xlator_t *this,
const char *volume, fd_t *fd, int32_t cmd,
- struct gf_flock *lock)
+ struct gf_flock *lock,
+ dict_t *xdata)
{
STACK_WIND (frame, default_finodelk_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->finodelk,
- volume, fd, cmd, lock);
+ volume, fd, cmd, lock, xdata);
return 0;
}
int32_t
default_entrylk_resume (call_frame_t *frame, xlator_t *this,
const char *volume, loc_t *loc, const char *basename,
- entrylk_cmd cmd, entrylk_type type)
+ entrylk_cmd cmd, entrylk_type type,
+ dict_t *xdata)
{
STACK_WIND (frame, default_entrylk_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->entrylk,
- volume, loc, basename, cmd, type);
+ volume, loc, basename, cmd, type, xdata);
return 0;
}
int32_t
default_fentrylk_resume (call_frame_t *frame, xlator_t *this,
const char *volume, fd_t *fd, const char *basename,
- entrylk_cmd cmd, entrylk_type type)
+ entrylk_cmd cmd, entrylk_type type,
+ dict_t *xdata)
{
STACK_WIND (frame, default_fentrylk_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->fentrylk,
- volume, fd, basename, cmd, type);
+ volume, fd, basename, cmd, type, xdata);
return 0;
}
int32_t
default_rchecksum_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- off_t offset, int32_t len)
+ off_t offset, int32_t len,
+ dict_t *xdata)
{
STACK_WIND (frame, default_rchecksum_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->rchecksum, fd, offset, len);
+ FIRST_CHILD(this)->fops->rchecksum, fd, offset, len, xdata);
return 0;
}
int32_t
default_readdir_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- size_t size, off_t off)
+ size_t size, off_t off,
+ dict_t *xdata)
{
STACK_WIND (frame, default_readdir_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->readdir, fd, size, off);
+ FIRST_CHILD(this)->fops->readdir, fd, size, off, xdata);
return 0;
}
int32_t
default_readdirp_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- size_t size, off_t off, dict_t *dict)
+ size_t size, off_t off, dict_t *xdata)
{
STACK_WIND (frame, default_readdirp_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->readdirp, fd, size, off, dict);
+ FIRST_CHILD(this)->fops->readdirp, fd, size, off, xdata);
return 0;
}
int32_t
default_setattr_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- struct iatt *stbuf, int32_t valid)
+ struct iatt *stbuf, int32_t valid,
+ dict_t *xdata)
{
STACK_WIND (frame, default_setattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->setattr, loc, stbuf, valid);
+ FIRST_CHILD (this)->fops->setattr, loc, stbuf, valid, xdata);
return 0;
}
int32_t
default_truncate_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- off_t offset)
+ off_t offset,
+ dict_t *xdata)
{
STACK_WIND (frame, default_truncate_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->truncate, loc, offset);
+ FIRST_CHILD(this)->fops->truncate, loc, offset, xdata);
return 0;
}
int32_t
-default_stat_resume (call_frame_t *frame, xlator_t *this, loc_t *loc)
+default_stat_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ dict_t *xdata)
{
STACK_WIND (frame, default_stat_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->stat, loc);
+ FIRST_CHILD(this)->fops->stat, loc, xdata);
return 0;
}
int32_t
default_lookup_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
- dict_t *xattr_req)
+ dict_t *xdata)
{
STACK_WIND (frame, default_lookup_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->lookup, loc, xattr_req);
+ FIRST_CHILD(this)->fops->lookup, loc, xdata);
return 0;
}
int32_t
default_fsetattr_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
- struct iatt *stbuf, int32_t valid)
+ struct iatt *stbuf, int32_t valid,
+ dict_t *xdata)
{
STACK_WIND (frame, default_fsetattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fsetattr, fd, stbuf, valid);
+ FIRST_CHILD (this)->fops->fsetattr, fd, stbuf, valid, xdata);
return 0;
}
@@ -823,258 +875,263 @@ default_fsetattr_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
int32_t
default_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
- const char *name)
+ const char *name, dict_t *xdata)
{
STACK_WIND (frame, default_fgetxattr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fgetxattr, fd, name);
+ FIRST_CHILD(this)->fops->fgetxattr, fd, name, xdata);
return 0;
}
int32_t
default_fsetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *dict,
- int32_t flags)
+ int32_t flags, dict_t *xdata)
{
STACK_WIND (frame, default_fsetxattr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fsetxattr, fd, dict, flags);
+ FIRST_CHILD(this)->fops->fsetxattr, fd, dict, flags, xdata);
return 0;
}
int32_t
default_setxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *dict,
- int32_t flags)
+ int32_t flags, dict_t *xdata)
{
STACK_WIND (frame, default_setxattr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->setxattr, loc, dict, flags);
+ FIRST_CHILD(this)->fops->setxattr, loc, dict, flags, xdata);
return 0;
}
int32_t
-default_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc)
+default_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
STACK_WIND (frame, default_statfs_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->statfs, loc);
+ FIRST_CHILD(this)->fops->statfs, loc, xdata);
return 0;
}
int32_t
-default_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags)
+default_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags, dict_t *xdata)
{
STACK_WIND (frame, default_fsyncdir_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fsyncdir, fd, flags);
+ FIRST_CHILD(this)->fops->fsyncdir, fd, flags, xdata);
return 0;
}
int32_t
-default_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd)
+default_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd, dict_t *xdata)
{
STACK_WIND (frame, default_opendir_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->opendir, loc, fd);
+ FIRST_CHILD(this)->fops->opendir, loc, fd, xdata);
return 0;
}
int32_t
-default_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
+default_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
STACK_WIND (frame, default_fstat_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fstat, fd);
+ FIRST_CHILD(this)->fops->fstat, fd, xdata);
return 0;
}
int32_t
-default_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags)
+default_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags, dict_t *xdata)
{
STACK_WIND (frame, default_fsync_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fsync, fd, flags);
+ FIRST_CHILD(this)->fops->fsync, fd, flags, xdata);
return 0;
}
int32_t
-default_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
+default_flush (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
STACK_WIND (frame, default_flush_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->flush, fd);
+ FIRST_CHILD(this)->fops->flush, fd, xdata);
return 0;
}
int32_t
default_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
struct iovec *vector, int32_t count, off_t off, uint32_t flags,
- struct iobref *iobref)
+ struct iobref *iobref, dict_t *xdata)
{
STACK_WIND (frame, default_writev_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->writev, fd, vector, count, off,
- flags, iobref);
+ flags, iobref, xdata);
return 0;
}
int32_t
default_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
- off_t offset, uint32_t flags)
+ off_t offset, uint32_t flags, dict_t *xdata)
{
STACK_WIND (frame, default_readv_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->readv, fd, size, offset, flags);
+ FIRST_CHILD(this)->fops->readv, fd, size, offset, flags, xdata);
return 0;
}
int32_t
default_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
- fd_t *fd, int32_t wbflags)
+ fd_t *fd, dict_t *xdata)
{
STACK_WIND (frame, default_open_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->open, loc, flags, fd, wbflags);
+ FIRST_CHILD(this)->fops->open, loc, flags, fd, xdata);
return 0;
}
int32_t
default_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
- mode_t mode, fd_t *fd, dict_t *params)
+ mode_t mode, mode_t umask, fd_t *fd, dict_t *xdata)
{
STACK_WIND (frame, default_create_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->create, loc, flags, mode, fd,
- params);
+ FIRST_CHILD(this)->fops->create, loc, flags, mode, umask,
+ fd, xdata);
return 0;
}
int32_t
-default_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc)
+default_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc,
+ dict_t *xdata)
{
STACK_WIND (frame, default_link_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->link, oldloc, newloc);
+ FIRST_CHILD(this)->fops->link, oldloc, newloc, xdata);
return 0;
}
int32_t
default_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
- loc_t *newloc)
+ loc_t *newloc, dict_t *xdata)
{
STACK_WIND (frame, default_rename_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->rename, oldloc, newloc);
+ FIRST_CHILD(this)->fops->rename, oldloc, newloc, xdata);
return 0;
}
int
default_symlink (call_frame_t *frame, xlator_t *this, const char *linkpath,
- loc_t *loc, dict_t *params)
+ loc_t *loc, mode_t umask, dict_t *xdata)
{
STACK_WIND (frame, default_symlink_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->symlink, linkpath, loc, params);
+ FIRST_CHILD(this)->fops->symlink, linkpath, loc, umask,
+ xdata);
return 0;
}
int32_t
-default_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags)
+default_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags,
+ dict_t *xdata)
{
STACK_WIND (frame, default_rmdir_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->rmdir, loc, flags);
+ FIRST_CHILD(this)->fops->rmdir, loc, flags, xdata);
return 0;
}
int32_t
-default_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc)
+default_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag,
+ dict_t *xdata)
{
STACK_WIND (frame, default_unlink_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->unlink, loc);
+ FIRST_CHILD(this)->fops->unlink, loc, xflag, xdata);
return 0;
}
int
default_mkdir (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
- dict_t *params)
+ mode_t umask, dict_t *xdata)
{
STACK_WIND (frame, default_mkdir_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->mkdir, loc, mode, params);
+ FIRST_CHILD(this)->fops->mkdir, loc, mode, umask, xdata);
return 0;
}
int
default_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
- dev_t rdev, dict_t *parms)
+ dev_t rdev, mode_t umask, dict_t *xdata)
{
STACK_WIND (frame, default_mknod_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->mknod, loc, mode, rdev, parms);
+ FIRST_CHILD(this)->fops->mknod, loc, mode, rdev, umask,
+ xdata);
return 0;
}
int32_t
-default_readlink (call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size)
+default_readlink (call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size, dict_t *xdata)
{
STACK_WIND (frame, default_readlink_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->readlink, loc, size);
+ FIRST_CHILD(this)->fops->readlink, loc, size, xdata);
return 0;
}
int32_t
-default_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask)
+default_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask, dict_t *xdata)
{
STACK_WIND (frame, default_access_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->access, loc, mask);
+ FIRST_CHILD(this)->fops->access, loc, mask, xdata);
return 0;
}
int32_t
-default_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
+default_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, dict_t *xdata)
{
STACK_WIND (frame, default_ftruncate_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->ftruncate, fd, offset);
+ FIRST_CHILD(this)->fops->ftruncate, fd, offset, xdata);
return 0;
}
int32_t
default_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
- const char *name)
+ const char *name, dict_t *xdata)
{
STACK_WIND (frame, default_getxattr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->getxattr, loc, name);
+ FIRST_CHILD(this)->fops->getxattr, loc, name, xdata);
return 0;
}
int32_t
default_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc,
- gf_xattrop_flags_t flags, dict_t *dict)
+ gf_xattrop_flags_t flags, dict_t *dict, dict_t *xdata)
{
STACK_WIND (frame, default_xattrop_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->xattrop, loc, flags, dict);
+ FIRST_CHILD(this)->fops->xattrop, loc, flags, dict, xdata);
return 0;
}
int32_t
default_fxattrop (call_frame_t *frame, xlator_t *this, fd_t *fd,
- gf_xattrop_flags_t flags, dict_t *dict)
+ gf_xattrop_flags_t flags, dict_t *dict, dict_t *xdata)
{
STACK_WIND (frame, default_fxattrop_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fxattrop, fd, flags, dict);
+ FIRST_CHILD(this)->fops->fxattrop, fd, flags, dict, xdata);
return 0;
}
int32_t
default_removexattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
- const char *name)
+ const char *name, dict_t *xdata)
{
STACK_WIND (frame, default_removexattr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->removexattr, loc, name);
+ FIRST_CHILD(this)->fops->removexattr, loc, name, xdata);
return 0;
}
int32_t
default_fremovexattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
- const char *name)
+ const char *name, dict_t *xdata)
{
STACK_WIND (frame, default_fremovexattr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fremovexattr, fd, name);
+ FIRST_CHILD(this)->fops->fremovexattr, fd, name, xdata);
return 0;
}
int32_t
default_lk (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int32_t cmd, struct gf_flock *lock)
+ int32_t cmd, struct gf_flock *lock, dict_t *xdata)
{
STACK_WIND (frame, default_lk_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->lk, fd, cmd, lock);
+ FIRST_CHILD(this)->fops->lk, fd, cmd, lock, xdata);
return 0;
}
@@ -1082,115 +1139,125 @@ default_lk (call_frame_t *frame, xlator_t *this, fd_t *fd,
int32_t
default_inodelk (call_frame_t *frame, xlator_t *this,
const char *volume, loc_t *loc, int32_t cmd,
- struct gf_flock *lock)
+ struct gf_flock *lock,
+ dict_t *xdata)
{
STACK_WIND (frame, default_inodelk_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->inodelk,
- volume, loc, cmd, lock);
+ volume, loc, cmd, lock, xdata);
return 0;
}
int32_t
default_finodelk (call_frame_t *frame, xlator_t *this,
- 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)
{
STACK_WIND (frame, default_finodelk_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->finodelk,
- volume, fd, cmd, lock);
+ volume, fd, cmd, lock, xdata);
return 0;
}
int32_t
default_entrylk (call_frame_t *frame, xlator_t *this,
const char *volume, loc_t *loc, const char *basename,
- entrylk_cmd cmd, entrylk_type type)
+ entrylk_cmd cmd, entrylk_type type,
+ dict_t *xdata)
{
STACK_WIND (frame, default_entrylk_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->entrylk,
- volume, loc, basename, cmd, type);
+ volume, loc, basename, cmd, type, xdata);
return 0;
}
int32_t
default_fentrylk (call_frame_t *frame, xlator_t *this,
const char *volume, fd_t *fd, const char *basename,
- entrylk_cmd cmd, entrylk_type type)
+ entrylk_cmd cmd, entrylk_type type,
+ dict_t *xdata)
{
STACK_WIND (frame, default_fentrylk_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->fentrylk,
- volume, fd, basename, cmd, type);
+ volume, fd, basename, cmd, type, xdata);
return 0;
}
int32_t
default_rchecksum (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
- int32_t len)
+ int32_t len,
+ dict_t *xdata)
{
STACK_WIND (frame, default_rchecksum_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->rchecksum, fd, offset, len);
+ FIRST_CHILD(this)->fops->rchecksum, fd, offset, len, xdata);
return 0;
}
int32_t
default_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd,
- size_t size, off_t off)
+ size_t size, off_t off,
+ dict_t *xdata)
{
STACK_WIND (frame, default_readdir_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->readdir, fd, size, off);
+ FIRST_CHILD(this)->fops->readdir, fd, size, off, xdata);
return 0;
}
int32_t
default_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd,
- size_t size, off_t off, dict_t *dict)
+ size_t size, off_t off, dict_t *xdata)
{
STACK_WIND (frame, default_readdirp_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->readdirp, fd, size, off, dict);
+ FIRST_CHILD(this)->fops->readdirp, fd, size, off, xdata);
return 0;
}
int32_t
default_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
- struct iatt *stbuf, int32_t valid)
+ struct iatt *stbuf, int32_t valid,
+ dict_t *xdata)
{
STACK_WIND (frame, default_setattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->setattr, loc, stbuf, valid);
+ FIRST_CHILD (this)->fops->setattr, loc, stbuf, valid, xdata);
return 0;
}
int32_t
-default_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
+default_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset,
+ dict_t *xdata)
{
STACK_WIND (frame, default_truncate_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->truncate, loc, offset);
+ FIRST_CHILD(this)->fops->truncate, loc, offset, xdata);
return 0;
}
int32_t
-default_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
+default_stat (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ dict_t *xdata)
{
STACK_WIND (frame, default_stat_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->stat, loc);
+ FIRST_CHILD(this)->fops->stat, loc, xdata);
return 0;
}
int32_t
default_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
- dict_t *xattr_req)
+ dict_t *xdata)
{
STACK_WIND (frame, default_lookup_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->lookup, loc, xattr_req);
+ FIRST_CHILD(this)->fops->lookup, loc, xdata);
return 0;
}
int32_t
default_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
- struct iatt *stbuf, int32_t valid)
+ struct iatt *stbuf, int32_t valid,
+ dict_t *xdata)
{
STACK_WIND (frame, default_fsetattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fsetattr, fd, stbuf, valid);
+ FIRST_CHILD (this)->fops->fsetattr, fd, stbuf, valid, xdata);
return 0;
}
diff --git a/libglusterfs/src/defaults.h b/libglusterfs/src/defaults.h
index f30bd83..ae01fc2 100644
--- a/libglusterfs/src/defaults.h
+++ b/libglusterfs/src/defaults.h
@@ -31,6 +31,18 @@
#include "xlator.h"
+int32_t default_notify (xlator_t *this,
+ int32_t event,
+ void *data,
+ ...);
+
+int32_t default_forget (xlator_t *this, inode_t *inode);
+
+int32_t default_release (xlator_t *this, fd_t *fd);
+
+int32_t default_releasedir (xlator_t *this, fd_t *fd);
+
+
/* Management Operations */
int32_t default_getspec (call_frame_t *frame,
@@ -41,84 +53,85 @@ int32_t default_getspec (call_frame_t *frame,
int32_t default_rchecksum (call_frame_t *frame,
xlator_t *this,
fd_t *fd, off_t offset,
- int32_t len);
+ int32_t len, dict_t *xdata);
/* FileSystem operations */
int32_t default_lookup (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- dict_t *xattr_req);
+ dict_t *xdata);
int32_t default_stat (call_frame_t *frame,
xlator_t *this,
- loc_t *loc);
+ loc_t *loc, dict_t *xdata);
int32_t default_fstat (call_frame_t *frame,
xlator_t *this,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
int32_t default_truncate (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- off_t offset);
+ off_t offset, dict_t *xdata);
int32_t default_ftruncate (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- off_t offset);
+ off_t offset, dict_t *xdata);
int32_t default_access (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- int32_t mask);
+ int32_t mask, dict_t *xdata);
int32_t default_readlink (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- size_t size);
+ size_t size, dict_t *xdata);
-int32_t default_mknod (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dev_t rdev, dict_t *params);
+int32_t default_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ mode_t mode, dev_t rdev, mode_t umask, dict_t *xdata);
int32_t default_mkdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dict_t *params);
+ loc_t *loc, mode_t mode, mode_t umask, dict_t *xdata);
int32_t default_unlink (call_frame_t *frame,
xlator_t *this,
- loc_t *loc);
+ loc_t *loc, int xflag, dict_t *xdata);
int32_t default_rmdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int flags);
+ loc_t *loc, int xflag, dict_t *xdata);
int32_t default_symlink (call_frame_t *frame, xlator_t *this,
- const char *linkpath, loc_t *loc, dict_t *params);
+ const char *linkpath, loc_t *loc, mode_t umask,
+ dict_t *xdata);
int32_t default_rename (call_frame_t *frame,
xlator_t *this,
loc_t *oldloc,
- loc_t *newloc);
+ loc_t *newloc, dict_t *xdata);
int32_t default_link (call_frame_t *frame,
xlator_t *this,
loc_t *oldloc,
- loc_t *newloc);
+ loc_t *newloc, dict_t *xdata);
int32_t default_create (call_frame_t *frame, xlator_t *this,
loc_t *loc, int32_t flags, mode_t mode,
- fd_t *fd, dict_t *params);
+ mode_t umask, fd_t *fd, dict_t *xdata);
int32_t default_open (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
int32_t flags, fd_t *fd,
- int32_t wbflags);
+ dict_t *xdata);
int32_t default_readv (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
size_t size,
off_t offset,
- uint32_t flags);
+ uint32_t flags, dict_t *xdata);
int32_t default_writev (call_frame_t *frame,
xlator_t *this,
@@ -127,218 +140,205 @@ int32_t default_writev (call_frame_t *frame,
int32_t count,
off_t offset,
uint32_t flags,
- struct iobref *iobref);
+ struct iobref *iobref, dict_t *xdata);
int32_t default_flush (call_frame_t *frame,
xlator_t *this,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
int32_t default_fsync (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- int32_t datasync);
+ int32_t datasync, dict_t *xdata);
int32_t default_opendir (call_frame_t *frame,
xlator_t *this,
- loc_t *loc, fd_t *fd);
+ loc_t *loc, fd_t *fd, dict_t *xdata);
int32_t default_fsyncdir (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- int32_t datasync);
+ int32_t datasync, dict_t *xdata);
int32_t default_statfs (call_frame_t *frame,
xlator_t *this,
- loc_t *loc);
+ loc_t *loc, dict_t *xdata);
int32_t default_setxattr (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
dict_t *dict,
- int32_t flags);
+ int32_t flags, dict_t *xdata);
int32_t default_getxattr (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- const char *name);
+ const char *name, dict_t *xdata);
int32_t default_fsetxattr (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
dict_t *dict,
- int32_t flags);
+ int32_t flags, dict_t *xdata);
int32_t default_fgetxattr (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- const char *name);
+ const char *name, dict_t *xdata);
int32_t default_removexattr (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- const char *name);
+ const char *name, dict_t *xdata);
int32_t default_fremovexattr (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- const char *name);
+ const char *name, dict_t *xdata);
int32_t default_lk (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
int32_t cmd,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
int32_t default_inodelk (call_frame_t *frame, xlator_t *this,
const char *volume, loc_t *loc, int32_t cmd,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
int32_t default_finodelk (call_frame_t *frame, xlator_t *this,
const char *volume, fd_t *fd, int32_t cmd,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
int32_t default_entrylk (call_frame_t *frame, xlator_t *this,
const char *volume, loc_t *loc, const char *basename,
- entrylk_cmd cmd, entrylk_type type);
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata);
int32_t default_fentrylk (call_frame_t *frame, xlator_t *this,
const char *volume, fd_t *fd, const char *basename,
- entrylk_cmd cmd, entrylk_type type);
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata);
int32_t default_readdir (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- size_t size, off_t off);
+ size_t size, off_t off, dict_t *xdata);
int32_t default_readdirp (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- size_t size, off_t off, dict_t *dict);
+ size_t size, off_t off, dict_t *xdata);
int32_t default_xattrop (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
gf_xattrop_flags_t flags,
- dict_t *dict);
+ dict_t *dict, dict_t *xdata);
int32_t default_fxattrop (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
gf_xattrop_flags_t flags,
- dict_t *dict);
-
-int32_t default_notify (xlator_t *this,
- int32_t event,
- void *data,
- ...);
-
-int32_t default_forget (xlator_t *this,
- inode_t *inode);
-
-int32_t default_release (xlator_t *this,
- fd_t *fd);
-
-int32_t default_releasedir (xlator_t *this,
- fd_t *fd);
+ dict_t *dict, dict_t *xdata);
int32_t default_setattr (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
struct iatt *stbuf,
- int32_t valid);
+ int32_t valid, dict_t *xdata);
int32_t default_fsetattr (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
struct iatt *stbuf,
- int32_t valid);
+ int32_t valid, dict_t *xdata);
/* Resume */
-int32_t default_getspec (call_frame_t *frame,
- xlator_t *this,
- const char *key,
- int32_t flag);
+int32_t default_getspec_resume (call_frame_t *frame,
+ xlator_t *this,
+ const char *key,
+ int32_t flag);
-int32_t default_rchecksum (call_frame_t *frame,
+int32_t default_rchecksum_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd, off_t offset,
- int32_t len);
+ int32_t len, dict_t *xdata);
/* FileSystem operations */
int32_t default_lookup_resume (call_frame_t *frame,
- xlator_t *this,
- loc_t *loc,
- dict_t *xattr_req);
+ xlator_t *this,
+ loc_t *loc,
+ dict_t *xdata);
int32_t default_stat_resume (call_frame_t *frame,
xlator_t *this,
- loc_t *loc);
+ loc_t *loc, dict_t *xdata);
int32_t default_fstat_resume (call_frame_t *frame,
xlator_t *this,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
int32_t default_truncate_resume (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- off_t offset);
+ off_t offset, dict_t *xdata);
int32_t default_ftruncate_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- off_t offset);
+ off_t offset, dict_t *xdata);
int32_t default_access_resume (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- int32_t mask);
+ int32_t mask, dict_t *xdata);
int32_t default_readlink_resume (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- size_t size);
+ size_t size, dict_t *xdata);
-int32_t default_mknod_resume (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dev_t rdev, dict_t *params);
+int32_t default_mknod_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ mode_t mode, dev_t rdev, mode_t umask,
+ dict_t *xdata);
-int32_t default_mkdir_resume (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dict_t *params);
+int32_t default_mkdir_resume (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ mode_t mode, mode_t umask, dict_t *xdata);
int32_t default_unlink_resume (call_frame_t *frame,
- xlator_t *this,
- loc_t *loc);
+ xlator_t *this,
+ loc_t *loc, int xflag, dict_t *xdata);
int32_t default_rmdir_resume (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int flags);
+ loc_t *loc, int xflag, dict_t *xdata);
int32_t default_symlink_resume (call_frame_t *frame, xlator_t *this,
- const char *linkpath, loc_t *loc, dict_t *params);
+ const char *linkpath, loc_t *loc, mode_t umask,
+ dict_t *xdata);
int32_t default_rename_resume (call_frame_t *frame,
xlator_t *this,
loc_t *oldloc,
- loc_t *newloc);
+ loc_t *newloc, dict_t *xdata);
int32_t default_link_resume (call_frame_t *frame,
xlator_t *this,
loc_t *oldloc,
- loc_t *newloc);
+ loc_t *newloc, dict_t *xdata);
int32_t default_create_resume (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int32_t flags, mode_t mode,
- fd_t *fd, dict_t *params);
+ loc_t *loc, int32_t flags, mode_t mode,
+ mode_t umask, fd_t *fd, dict_t *xdata);
int32_t default_open_resume (call_frame_t *frame,
- xlator_t *this,
- loc_t *loc,
- int32_t flags, fd_t *fd,
- int32_t wbflags);
+ xlator_t *this,
+ loc_t *loc,
+ int32_t flags, fd_t *fd, dict_t *xdata);
int32_t default_readv_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
size_t size,
- off_t offset, uint32_t flags);
+ off_t offset, uint32_t flags, dict_t *xdata);
int32_t default_writev_resume (call_frame_t *frame,
xlator_t *this,
@@ -346,345 +346,331 @@ int32_t default_writev_resume (call_frame_t *frame,
struct iovec *vector,
int32_t count,
off_t offset, uint32_t flags,
- struct iobref *iobref);
+ struct iobref *iobref, dict_t *xdata);
int32_t default_flush_resume (call_frame_t *frame,
xlator_t *this,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
int32_t default_fsync_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- int32_t datasync);
+ int32_t datasync, dict_t *xdata);
int32_t default_opendir_resume (call_frame_t *frame,
xlator_t *this,
- loc_t *loc, fd_t *fd);
+ loc_t *loc, fd_t *fd, dict_t *xdata);
int32_t default_fsyncdir_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- int32_t datasync);
+ int32_t datasync, dict_t *xdata);
int32_t default_statfs_resume (call_frame_t *frame,
xlator_t *this,
- loc_t *loc);
+ loc_t *loc, dict_t *xdata);
int32_t default_setxattr_resume (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
dict_t *dict,
- int32_t flags);
+ int32_t flags, dict_t *xdata);
int32_t default_getxattr_resume (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- const char *name);
+ const char *name, dict_t *xdata);
int32_t default_fsetxattr_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
dict_t *dict,
- int32_t flags);
+ int32_t flags, dict_t *xdata);
int32_t default_fgetxattr_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- const char *name);
+ const char *name, dict_t *xdata);
int32_t default_removexattr_resume (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- const char *name);
+ const char *name, dict_t *xdata);
int32_t default_fremovexattr_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- const char *name);
+ const char *name, dict_t *xdata);
int32_t default_lk_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
int32_t cmd,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
int32_t default_inodelk_resume (call_frame_t *frame, xlator_t *this,
const char *volume, loc_t *loc, int32_t cmd,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
int32_t default_finodelk_resume (call_frame_t *frame, xlator_t *this,
const char *volume, fd_t *fd, int32_t cmd,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
int32_t default_entrylk_resume (call_frame_t *frame, xlator_t *this,
const char *volume, loc_t *loc, const char *basename,
- entrylk_cmd cmd, entrylk_type type);
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata);
int32_t default_fentrylk_resume (call_frame_t *frame, xlator_t *this,
const char *volume, fd_t *fd, const char *basename,
- entrylk_cmd cmd, entrylk_type type);
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata);
int32_t default_readdir_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- size_t size, off_t off);
+ size_t size, off_t off, dict_t *xdata);
int32_t default_readdirp_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- size_t size, off_t off, dict_t *dict);
+ size_t size, off_t off, dict_t *xdata);
int32_t default_xattrop_resume (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
gf_xattrop_flags_t flags,
- dict_t *dict);
+ dict_t *dict, dict_t *xdata);
int32_t default_fxattrop_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
gf_xattrop_flags_t flags,
- dict_t *dict);
+ dict_t *dict, dict_t *xdata);
int32_t default_rchecksum_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd, off_t offset,
- int32_t len);
-
-int32_t default_notify (xlator_t *this,
- int32_t event,
- void *data,
- ...);
-
-int32_t default_forget (xlator_t *this,
- inode_t *inode);
-
-int32_t default_release (xlator_t *this,
- fd_t *fd);
-
-int32_t default_releasedir (xlator_t *this,
- fd_t *fd);
+ int32_t len, dict_t *xdata);
int32_t default_setattr_resume (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
struct iatt *stbuf,
- int32_t valid);
+ int32_t valid, dict_t *xdata);
int32_t default_fsetattr_resume (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
struct iatt *stbuf,
- int32_t valid);
+ int32_t valid, dict_t *xdata);
/* _cbk */
int32_t
default_lookup_cbk (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 *dict, struct iatt *postparent);
+ struct iatt *buf, dict_t *xdata, struct iatt *postparent);
int32_t
default_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct iatt *buf);
+ int32_t op_ret, int32_t op_errno, struct iatt *buf, dict_t *xdata);
int32_t
default_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf);
+ struct iatt *postbuf, dict_t *xdata);
int32_t
default_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf);
+ struct iatt *postbuf, dict_t *xdata);
int32_t
default_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno);
+ int32_t op_ret, int32_t op_errno, dict_t *xdata);
int32_t
default_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, const char *path,
- struct iatt *buf);
+ struct iatt *buf, dict_t *xdata);
int32_t
default_mknod_cbk (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);
+ struct iatt *postparent, dict_t *xdata);
int32_t
default_mkdir_cbk (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);
+ struct iatt *postparent, dict_t *xdata);
int32_t
default_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *preparent,
- struct iatt *postparent);
+ struct iatt *postparent, dict_t *xdata);
int32_t
default_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *preparent,
- struct iatt *postparent);
+ struct iatt *postparent, dict_t *xdata);
int32_t
default_symlink_cbk (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);
+ struct iatt *postparent, dict_t *xdata);
int32_t
default_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *buf,
struct iatt *preoldparent, struct iatt *postoldparent,
- struct iatt *prenewparent, struct iatt *postnewparent);
+ struct iatt *prenewparent, struct iatt *postnewparent, dict_t *xdata);
int32_t
default_link_cbk (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);
+ struct iatt *postparent, dict_t *xdata);
int32_t
default_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, fd_t *fd, inode_t *inode,
struct iatt *buf, struct iatt *preparent,
- struct iatt *postparent);
+ struct iatt *postparent, dict_t *xdata);
int32_t
default_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, fd_t *fd);
+ int32_t op_ret, int32_t op_errno, fd_t *fd, dict_t *xdata);
int32_t
default_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iovec *vector,
- int32_t count, struct iatt *stbuf, struct iobref *iobref);
+ int32_t count, struct iatt *stbuf, struct iobref *iobref, dict_t *xdata);
int32_t
default_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf);
+ struct iatt *postbuf, dict_t *xdata);
int32_t
default_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno);
+ int32_t op_ret, int32_t op_errno, dict_t *xdata);
int32_t
default_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf);
+ struct iatt *postbuf, dict_t *xdata);
int32_t
default_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct iatt *buf);
+ int32_t op_ret, int32_t op_errno, struct iatt *buf, dict_t *xdata);
int32_t
default_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, fd_t *fd);
+ int32_t op_ret, int32_t op_errno, fd_t *fd, dict_t *xdata);
int32_t
default_fsyncdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno);
+ int32_t op_ret, int32_t op_errno, dict_t *xdata);
int32_t
default_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct statvfs *buf);
+ int32_t op_ret, int32_t op_errno, struct statvfs *buf, dict_t *xdata);
int32_t
default_setxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno);
+ int32_t op_ret, int32_t op_errno, dict_t *xdata);
int32_t
default_fsetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno);
+ int32_t op_ret, int32_t op_errno, dict_t *xdata);
int32_t
default_fgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *dict);
+ int32_t op_ret, int32_t op_errno, dict_t *dict, dict_t *xdata);
int32_t
default_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *dict);
+ int32_t op_ret, int32_t op_errno, dict_t *dict, dict_t *xdata);
int32_t
default_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *dict);
+ int32_t op_ret, int32_t op_errno, dict_t *dict, dict_t *xdata);
int32_t
default_fxattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *dict);
+ int32_t op_ret, int32_t op_errno, dict_t *dict, dict_t *xdata);
int32_t
default_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno);
+ int32_t op_ret, int32_t op_errno, dict_t *xdata);
int32_t
default_fremovexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno);
+ int32_t op_ret, int32_t op_errno, dict_t *xdata);
int32_t
default_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct gf_flock *lock);
+ int32_t op_ret, int32_t op_errno, struct gf_flock *lock, dict_t *xdata);
int32_t
default_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno);
+ int32_t op_ret, int32_t op_errno, dict_t *xdata);
int32_t
default_finodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno);
+ int32_t op_ret, int32_t op_errno, dict_t *xdata);
int32_t
default_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno);
+ int32_t op_ret, int32_t op_errno, dict_t *xdata);
int32_t
default_fentrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno);
+ int32_t op_ret, int32_t op_errno, dict_t *xdata);
int32_t
default_rchecksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, uint32_t weak_checksum,
- uint8_t *strong_checksum);
+ uint8_t *strong_checksum, dict_t *xdata);
int32_t
default_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, gf_dirent_t *entries);
+ int32_t op_ret, int32_t op_errno, gf_dirent_t *entries, dict_t *xdata);
int32_t
default_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, gf_dirent_t *entries);
+ int32_t op_ret, int32_t op_errno, gf_dirent_t *entries, dict_t *xdata);
int32_t
default_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *statpre,
- struct iatt *statpost);
+ struct iatt *statpost, dict_t *xdata);
int32_t
default_fsetattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *statpre,
- struct iatt *statpost);
+ struct iatt *statpost, dict_t *xdata);
int32_t
default_getspec_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index 47bb013..e407ab7 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -423,7 +423,7 @@ syncenv_new (size_t stacksize)
int
syncop_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, inode_t *inode,
- struct iatt *iatt, dict_t *xattr, struct iatt *parent)
+ struct iatt *iatt, dict_t *xdata, struct iatt *parent)
{
struct syncargs *args = NULL;
@@ -435,8 +435,8 @@ syncop_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == 0) {
args->iatt1 = *iatt;
args->iatt2 = *parent;
- if (xattr)
- args->xattr = dict_ref (xattr);
+ if (xdata)
+ args->xdata = dict_ref (xdata);
}
__wake (args);
@@ -446,22 +446,22 @@ syncop_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
-syncop_lookup (xlator_t *subvol, loc_t *loc, dict_t *xattr_req,
- struct iatt *iatt, dict_t **xattr_rsp, struct iatt *parent)
+syncop_lookup (xlator_t *subvol, loc_t *loc, dict_t *xdata_req,
+ struct iatt *iatt, dict_t **xdata_rsp, struct iatt *parent)
{
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_lookup_cbk, subvol->fops->lookup,
- loc, xattr_req);
+ loc, xdata_req);
if (iatt)
*iatt = args.iatt1;
if (parent)
*parent = args.iatt2;
- if (xattr_rsp)
- *xattr_rsp = args.xattr;
- else if (args.xattr)
- dict_unref (args.xattr);
+ if (xdata_rsp)
+ *xdata_rsp = args.xdata;
+ else if (args.xdata)
+ dict_unref (args.xdata);
errno = args.op_errno;
return args.op_ret;
@@ -488,7 +488,7 @@ syncop_readdirp_cbk (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- gf_dirent_t *entries)
+ gf_dirent_t *entries, dict_t *xdata)
{
struct syncargs *args = NULL;
gf_dirent_t *entry = NULL;
@@ -548,7 +548,7 @@ syncop_readdir_cbk (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- gf_dirent_t *entries)
+ gf_dirent_t *entries, dict_t *xdata)
{
struct syncargs *args = NULL;
gf_dirent_t *entry = NULL;
@@ -590,7 +590,7 @@ syncop_readdir (xlator_t *subvol,
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_readdir_cbk, subvol->fops->readdir,
- fd, size, off);
+ fd, size, off, NULL);
if (entries)
list_splice_init (&args.entries.list, &entries->list);
@@ -607,7 +607,7 @@ syncop_opendir_cbk (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- fd_t *fd)
+ fd_t *fd, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -629,7 +629,7 @@ syncop_opendir (xlator_t *subvol,
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_opendir_cbk, subvol->fops->opendir,
- loc, fd);
+ loc, fd, NULL);
errno = args.op_errno;
return args.op_ret;
@@ -638,7 +638,7 @@ syncop_opendir (xlator_t *subvol,
int
syncop_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -658,7 +658,7 @@ syncop_removexattr (xlator_t *subvol, loc_t *loc, const char *name)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_removexattr_cbk, subvol->fops->removexattr,
- loc, name);
+ loc, name, NULL);
errno = args.op_errno;
return args.op_ret;
@@ -666,7 +666,7 @@ syncop_removexattr (xlator_t *subvol, loc_t *loc, const char *name)
int
syncop_fremovexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -686,7 +686,7 @@ syncop_fremovexattr (xlator_t *subvol, fd_t *fd, const char *name)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_fremovexattr_cbk,
- subvol->fops->fremovexattr, fd, name);
+ subvol->fops->fremovexattr, fd, name, NULL);
errno = args.op_errno;
return args.op_ret;
@@ -694,7 +694,7 @@ syncop_fremovexattr (xlator_t *subvol, fd_t *fd, const char *name)
int
syncop_setxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -715,7 +715,7 @@ syncop_setxattr (xlator_t *subvol, loc_t *loc, dict_t *dict, int32_t flags)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_setxattr_cbk, subvol->fops->setxattr,
- loc, dict, flags);
+ loc, dict, flags, NULL);
errno = args.op_errno;
return args.op_ret;
@@ -723,7 +723,7 @@ syncop_setxattr (xlator_t *subvol, loc_t *loc, dict_t *dict, int32_t flags)
int
syncop_fsetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -744,7 +744,7 @@ syncop_fsetxattr (xlator_t *subvol, fd_t *fd, dict_t *dict, int32_t flags)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_fsetxattr_cbk, subvol->fops->fsetxattr,
- fd, dict, flags);
+ fd, dict, flags, NULL);
errno = args.op_errno;
return args.op_ret;
@@ -752,7 +752,7 @@ syncop_fsetxattr (xlator_t *subvol, fd_t *fd, dict_t *dict, int32_t flags)
int
syncop_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, dict_t *dict)
+ int op_ret, int op_errno, dict_t *dict, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -774,7 +774,7 @@ syncop_listxattr (xlator_t *subvol, loc_t *loc, dict_t **dict)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_getxattr_cbk, subvol->fops->getxattr,
- loc, NULL);
+ loc, NULL, NULL);
if (dict)
*dict = args.xattr;
@@ -791,7 +791,7 @@ syncop_getxattr (xlator_t *subvol, loc_t *loc, dict_t **dict, const char *key)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_getxattr_cbk, subvol->fops->getxattr,
- loc, key);
+ loc, key, NULL);
if (dict)
*dict = args.xattr;
@@ -808,7 +808,7 @@ syncop_fgetxattr (xlator_t *subvol, fd_t *fd, dict_t **dict, const char *key)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_getxattr_cbk, subvol->fops->fgetxattr,
- fd, key);
+ fd, key, NULL);
if (dict)
*dict = args.xattr;
@@ -822,7 +822,7 @@ syncop_fgetxattr (xlator_t *subvol, fd_t *fd, dict_t **dict, const char *key)
int
syncop_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
- struct statvfs *buf)
+ struct statvfs *buf, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -849,7 +849,7 @@ syncop_statfs (xlator_t *subvol, loc_t *loc, struct statvfs *buf)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_statfs_cbk, subvol->fops->statfs,
- loc);
+ loc, NULL);
if (buf)
*buf = args.statvfs_buf;
@@ -861,7 +861,7 @@ syncop_statfs (xlator_t *subvol, loc_t *loc, struct statvfs *buf)
int
syncop_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno,
- struct iatt *preop, struct iatt *postop)
+ struct iatt *preop, struct iatt *postop, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -888,7 +888,7 @@ syncop_setattr (xlator_t *subvol, loc_t *loc, struct iatt *iatt, int valid,
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_setattr_cbk, subvol->fops->setattr,
- loc, iatt, valid);
+ loc, iatt, valid, NULL);
if (preop)
*preop = args.iatt1;
@@ -907,7 +907,7 @@ syncop_fsetattr (xlator_t *subvol, fd_t *fd, struct iatt *iatt, int valid,
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_setattr_cbk, subvol->fops->fsetattr,
- fd, iatt, valid);
+ fd, iatt, valid, NULL);
if (preop)
*preop = args.iatt1;
@@ -921,7 +921,7 @@ syncop_fsetattr (xlator_t *subvol, fd_t *fd, struct iatt *iatt, int valid,
int32_t
syncop_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, fd_t *fd)
+ int32_t op_ret, int32_t op_errno, fd_t *fd, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -944,7 +944,7 @@ syncop_open (xlator_t *subvol, loc_t *loc, int32_t flags, fd_t *fd)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_open_cbk, subvol->fops->open,
- loc, flags, fd, 0);
+ loc, flags, fd, NULL);
errno = args.op_errno;
return args.op_ret;
@@ -955,7 +955,8 @@ syncop_open (xlator_t *subvol, loc_t *loc, int32_t flags, fd_t *fd)
int32_t
syncop_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iovec *vector,
- int32_t count, struct iatt *stbuf, struct iobref *iobref)
+ int32_t count, struct iatt *stbuf, struct iobref *iobref,
+ dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -987,7 +988,7 @@ syncop_readv (xlator_t *subvol, fd_t *fd, size_t size, off_t off,
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_readv_cbk, subvol->fops->readv,
- fd, size, off, flags);
+ fd, size, off, flags, NULL);
if (vector)
*vector = args.vector;
@@ -1011,7 +1012,7 @@ syncop_readv (xlator_t *subvol, fd_t *fd, size_t size, off_t off,
int
syncop_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -1033,7 +1034,7 @@ syncop_writev (xlator_t *subvol, fd_t *fd, struct iovec *vector,
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_writev_cbk, subvol->fops->writev,
- fd, vector, count, offset, flags, iobref);
+ fd, vector, count, offset, flags, iobref, NULL);
errno = args.op_errno;
return args.op_ret;
@@ -1049,7 +1050,7 @@ int syncop_write (xlator_t *subvol, fd_t *fd, const char *buf, int size,
vec.iov_base = (void *)buf;
SYNCOP (subvol, (&args), syncop_writev_cbk, subvol->fops->writev,
- fd, &vec, 1, offset, flags, iobref);
+ fd, &vec, 1, offset, flags, iobref, NULL);
errno = args.op_errno;
return args.op_ret;
@@ -1068,7 +1069,7 @@ int32_t
syncop_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, fd_t *fd, inode_t *inode,
struct iatt *buf, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -1087,12 +1088,12 @@ syncop_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
syncop_create (xlator_t *subvol, loc_t *loc, int32_t flags, mode_t mode,
- fd_t *fd, dict_t *dict)
+ fd_t *fd, dict_t *xdata)
{
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_create_cbk, subvol->fops->create,
- loc, flags, mode, fd, dict);
+ loc, flags, mode, 0, fd, xdata);
errno = args.op_errno;
return args.op_ret;
@@ -1102,7 +1103,7 @@ syncop_create (xlator_t *subvol, loc_t *loc, int32_t flags, mode_t mode,
int
syncop_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -1121,7 +1122,8 @@ syncop_unlink (xlator_t *subvol, loc_t *loc)
{
struct syncargs args = {0, };
- SYNCOP (subvol, (&args), syncop_unlink_cbk, subvol->fops->unlink, loc);
+ SYNCOP (subvol, (&args), syncop_unlink_cbk, subvol->fops->unlink, loc,
+ 0, NULL);
errno = args.op_errno;
return args.op_ret;
@@ -1131,7 +1133,7 @@ int
syncop_link_cbk (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)
+ struct iatt *postparent, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -1152,7 +1154,7 @@ syncop_link (xlator_t *subvol, loc_t *oldloc, loc_t *newloc)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_link_cbk, subvol->fops->link,
- oldloc, newloc);
+ oldloc, newloc, NULL);
errno = args.op_errno;
@@ -1162,7 +1164,7 @@ syncop_link (xlator_t *subvol, loc_t *oldloc, loc_t *newloc)
int
syncop_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -1182,7 +1184,7 @@ syncop_ftruncate (xlator_t *subvol, fd_t *fd, off_t offset)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_ftruncate_cbk, subvol->fops->ftruncate,
- fd, offset);
+ fd, offset, NULL);
errno = args.op_errno;
return args.op_ret;
@@ -1194,7 +1196,7 @@ syncop_truncate (xlator_t *subvol, loc_t *loc, off_t offset)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_ftruncate_cbk, subvol->fops->truncate,
- loc, offset);
+ loc, offset, NULL);
errno = args.op_errno;
return args.op_ret;
@@ -1203,7 +1205,7 @@ syncop_truncate (xlator_t *subvol, loc_t *loc, off_t offset)
int
syncop_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
- struct iatt *prebuf, struct iatt *postbuf)
+ struct iatt *prebuf, struct iatt *postbuf, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -1224,7 +1226,7 @@ syncop_fsync (xlator_t *subvol, fd_t *fd)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_fsync_cbk, subvol->fops->fsync,
- fd, 0);
+ fd, 0, NULL);
errno = args.op_errno;
return args.op_ret;
@@ -1233,7 +1235,7 @@ syncop_fsync (xlator_t *subvol, fd_t *fd)
int
syncop_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct iatt *stbuf)
+ int32_t op_ret, int32_t op_errno, struct iatt *stbuf, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -1256,7 +1258,7 @@ syncop_fstat (xlator_t *subvol, fd_t *fd, struct iatt *stbuf)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_fstat_cbk, subvol->fops->fstat,
- fd);
+ fd, NULL);
if (stbuf)
*stbuf = args.iatt1;
@@ -1272,7 +1274,7 @@ syncop_stat (xlator_t *subvol, loc_t *loc, struct iatt *stbuf)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_fstat_cbk, subvol->fops->stat,
- loc);
+ loc, NULL);
if (stbuf)
*stbuf = args.iatt1;
@@ -1286,7 +1288,7 @@ int32_t
syncop_symlink_cbk (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)
+ struct iatt *postparent, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -1306,7 +1308,7 @@ syncop_symlink (xlator_t *subvol, loc_t *loc, char *newpath, dict_t *dict)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_symlink_cbk, subvol->fops->symlink,
- newpath, loc, dict);
+ newpath, loc, 0, dict);
errno = args.op_errno;
return args.op_ret;
@@ -1316,7 +1318,7 @@ syncop_symlink (xlator_t *subvol, loc_t *loc, char *newpath, dict_t *dict)
int
syncop_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, const char *path,
- struct iatt *stbuf)
+ struct iatt *stbuf, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -1339,7 +1341,7 @@ syncop_readlink (xlator_t *subvol, loc_t *loc, char **buffer, size_t size)
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_readlink_cbk, subvol->fops->readlink,
- loc, size);
+ loc, size, NULL);
if (buffer)
*buffer = args.buffer;
@@ -1354,7 +1356,7 @@ int
syncop_mknod_cbk (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)
+ struct iatt *postparent, dict_t *xdata)
{
struct syncargs *args = NULL;
@@ -1375,7 +1377,7 @@ syncop_mknod (xlator_t *subvol, loc_t *loc, mode_t mode, dev_t rdev,
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_mknod_cbk, subvol->fops->mknod,
- loc, mode, rdev, dict);
+ loc, mode, rdev, 0, dict);
errno = args.op_errno;
return args.op_ret;
diff --git a/libglusterfs/src/syncop.h b/libglusterfs/src/syncop.h
index 69bd1d7..f095319 100644
--- a/libglusterfs/src/syncop.h
+++ b/libglusterfs/src/syncop.h
@@ -112,6 +112,7 @@ struct syncargs {
int count;
struct iobref *iobref;
char *buffer;
+ dict_t *xdata;
/* some more _cbk needs */
uuid_t uuid;
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index c0b56a7..bad328f 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -106,7 +106,8 @@ typedef int32_t (*fop_rchecksum_cbk_t) (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);
typedef int32_t (*fop_getspec_t) (call_frame_t *frame,
@@ -117,7 +118,7 @@ typedef int32_t (*fop_getspec_t) (call_frame_t *frame,
typedef int32_t (*fop_rchecksum_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd, off_t offset,
- int32_t len);
+ int32_t len, dict_t *xdata);
typedef int32_t (*fop_lookup_cbk_t) (call_frame_t *frame,
@@ -127,7 +128,7 @@ typedef int32_t (*fop_lookup_cbk_t) (call_frame_t *frame,
int32_t op_errno,
inode_t *inode,
struct iatt *buf,
- dict_t *xattr,
+ dict_t *xdata,
struct iatt *postparent);
typedef int32_t (*fop_stat_cbk_t) (call_frame_t *frame,
@@ -135,14 +136,14 @@ typedef int32_t (*fop_stat_cbk_t) (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- struct iatt *buf);
+ struct iatt *buf, dict_t *xdata);
typedef int32_t (*fop_fstat_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- struct iatt *buf);
+ struct iatt *buf, dict_t *xdata);
typedef int32_t (*fop_truncate_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -150,7 +151,7 @@ typedef int32_t (*fop_truncate_cbk_t) (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *prebuf,
- struct iatt *postbuf);
+ struct iatt *postbuf, dict_t *xdata);
typedef int32_t (*fop_ftruncate_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -158,13 +159,13 @@ typedef int32_t (*fop_ftruncate_cbk_t) (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *prebuf,
- struct iatt *postbuf);
+ struct iatt *postbuf, dict_t *xdata);
typedef int32_t (*fop_access_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno);
+ int32_t op_errno, dict_t *xdata);
typedef int32_t (*fop_readlink_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -172,7 +173,7 @@ typedef int32_t (*fop_readlink_cbk_t) (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
const char *path,
- struct iatt *buf);
+ struct iatt *buf, dict_t *xdata);
typedef int32_t (*fop_mknod_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -182,7 +183,7 @@ typedef int32_t (*fop_mknod_cbk_t) (call_frame_t *frame,
inode_t *inode,
struct iatt *buf,
struct iatt *preparent,
- struct iatt *postparent);
+ struct iatt *postparent, dict_t *xdata);
typedef int32_t (*fop_mkdir_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -192,7 +193,7 @@ typedef int32_t (*fop_mkdir_cbk_t) (call_frame_t *frame,
inode_t *inode,
struct iatt *buf,
struct iatt *preparent,
- struct iatt *postparent);
+ struct iatt *postparent, dict_t *xdata);
typedef int32_t (*fop_unlink_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -200,7 +201,7 @@ typedef int32_t (*fop_unlink_cbk_t) (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *preparent,
- struct iatt *postparent);
+ struct iatt *postparent, dict_t *xdata);
typedef int32_t (*fop_rmdir_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -208,7 +209,7 @@ typedef int32_t (*fop_rmdir_cbk_t) (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *preparent,
- struct iatt *postparent);
+ struct iatt *postparent, dict_t *xdata);
typedef int32_t (*fop_symlink_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -218,7 +219,7 @@ typedef int32_t (*fop_symlink_cbk_t) (call_frame_t *frame,
inode_t *inode,
struct iatt *buf,
struct iatt *preparent,
- struct iatt *postparent);
+ struct iatt *postparent, dict_t *xdata);
typedef int32_t (*fop_rename_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -229,7 +230,7 @@ typedef int32_t (*fop_rename_cbk_t) (call_frame_t *frame,
struct iatt *preoldparent,
struct iatt *postoldparent,
struct iatt *prenewparent,
- struct iatt *postnewparent);
+ struct iatt *postnewparent, dict_t *xdata);
typedef int32_t (*fop_link_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -239,7 +240,7 @@ typedef int32_t (*fop_link_cbk_t) (call_frame_t *frame,
inode_t *inode,
struct iatt *buf,
struct iatt *preparent,
- struct iatt *postparent);
+ struct iatt *postparent, dict_t *xdata);
typedef int32_t (*fop_create_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -250,14 +251,14 @@ typedef int32_t (*fop_create_cbk_t) (call_frame_t *frame,
inode_t *inode,
struct iatt *buf,
struct iatt *preparent,
- struct iatt *postparent);
+ struct iatt *postparent, dict_t *xdata);
typedef int32_t (*fop_open_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
typedef int32_t (*fop_readv_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -267,7 +268,7 @@ typedef int32_t (*fop_readv_cbk_t) (call_frame_t *frame,
struct iovec *vector,
int32_t count,
struct iatt *stbuf,
- struct iobref *iobref);
+ struct iobref *iobref, dict_t *xdata);
typedef int32_t (*fop_writev_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -275,13 +276,13 @@ typedef int32_t (*fop_writev_cbk_t) (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *prebuf,
- struct iatt *postbuf);
+ struct iatt *postbuf, dict_t *xdata);
typedef int32_t (*fop_flush_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno);
+ int32_t op_errno, dict_t *xdata);
typedef int32_t (*fop_fsync_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -289,124 +290,124 @@ typedef int32_t (*fop_fsync_cbk_t) (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *prebuf,
- struct iatt *postbuf);
+ struct iatt *postbuf, dict_t *xdata);
typedef int32_t (*fop_opendir_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
typedef int32_t (*fop_fsyncdir_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno);
+ int32_t op_errno, dict_t *xdata);
typedef int32_t (*fop_statfs_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- struct statvfs *buf);
+ struct statvfs *buf, dict_t *xdata);
typedef int32_t (*fop_setxattr_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno);
+ int32_t op_errno, dict_t *xdata);
typedef int32_t (*fop_getxattr_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- dict_t *dict);
+ dict_t *dict, dict_t *xdata);
typedef int32_t (*fop_fsetxattr_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno);
+ int32_t op_errno, dict_t *xdata);
typedef int32_t (*fop_fgetxattr_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- dict_t *dict);
+ dict_t *dict, dict_t *xdata);
typedef int32_t (*fop_removexattr_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno);
+ int32_t op_errno, dict_t *xdata);
typedef int32_t (*fop_fremovexattr_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno);
+ int32_t op_errno, dict_t *xdata);
typedef int32_t (*fop_lk_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
typedef int32_t (*fop_inodelk_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno);
+ int32_t op_errno, dict_t *xdata);
typedef int32_t (*fop_finodelk_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno);
+ int32_t op_errno, dict_t *xdata);
typedef int32_t (*fop_entrylk_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno);
+ int32_t op_errno, dict_t *xdata);
typedef int32_t (*fop_fentrylk_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno);
+ int32_t op_errno, dict_t *xdata);
typedef int32_t (*fop_readdir_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- gf_dirent_t *entries);
+ gf_dirent_t *entries, dict_t *xdata);
typedef int32_t (*fop_readdirp_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- gf_dirent_t *entries);
+ gf_dirent_t *entries, dict_t *xdata);
typedef int32_t (*fop_xattrop_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- dict_t *xattr);
+ dict_t *xattr, dict_t *xdata);
typedef int32_t (*fop_fxattrop_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- dict_t *xattr);
+ dict_t *xattr, dict_t *xdata);
typedef int32_t (*fop_setattr_cbk_t) (call_frame_t *frame,
@@ -415,7 +416,7 @@ typedef int32_t (*fop_setattr_cbk_t) (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *preop_stbuf,
- struct iatt *postop_stbuf);
+ struct iatt *postop_stbuf, dict_t *xdata);
typedef int32_t (*fop_fsetattr_cbk_t) (call_frame_t *frame,
void *cookie,
@@ -423,72 +424,71 @@ typedef int32_t (*fop_fsetattr_cbk_t) (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno,
struct iatt *preop_stbuf,
- struct iatt *postop_stbuf);
+ struct iatt *postop_stbuf, dict_t *xdata);
typedef int32_t (*fop_lookup_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- dict_t *xattr_req);
+ dict_t *xdata);
typedef int32_t (*fop_stat_t) (call_frame_t *frame,
xlator_t *this,
- loc_t *loc);
+ loc_t *loc, dict_t *xdata);
typedef int32_t (*fop_fstat_t) (call_frame_t *frame,
xlator_t *this,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
typedef int32_t (*fop_truncate_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- off_t offset);
+ off_t offset, dict_t *xdata);
typedef int32_t (*fop_ftruncate_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- off_t offset);
+ off_t offset, dict_t *xdata);
typedef int32_t (*fop_access_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- int32_t mask);
+ int32_t mask, dict_t *xdata);
typedef int32_t (*fop_readlink_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- size_t size);
+ size_t size, dict_t *xdata);
typedef int32_t (*fop_mknod_t) (call_frame_t *frame, xlator_t *this,
loc_t *loc, mode_t mode, dev_t rdev,
- dict_t *params);
+ mode_t umask, dict_t *xdata);
-typedef int32_t (*fop_mkdir_t) (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dict_t *params);
+typedef int32_t (*fop_mkdir_t) (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ mode_t mode, mode_t umask, dict_t *xdata);
-typedef int32_t (*fop_unlink_t) (call_frame_t *frame,
- xlator_t *this,
- loc_t *loc);
+typedef int32_t (*fop_unlink_t) (call_frame_t *frame, xlator_t *this,
+ loc_t *loc, int xflags, dict_t *xdata);
typedef int32_t (*fop_rmdir_t) (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int flags);
+ loc_t *loc, int xflags, dict_t *xdata);
typedef int32_t (*fop_symlink_t) (call_frame_t *frame, xlator_t *this,
const char *linkname, loc_t *loc,
- dict_t *params);
+ mode_t umask, dict_t *xdata);
typedef int32_t (*fop_rename_t) (call_frame_t *frame,
xlator_t *this,
loc_t *oldloc,
- loc_t *newloc);
+ loc_t *newloc, dict_t *xdata);
typedef int32_t (*fop_link_t) (call_frame_t *frame,
xlator_t *this,
loc_t *oldloc,
- loc_t *newloc);
+ loc_t *newloc, dict_t *xdata);
typedef int32_t (*fop_create_t) (call_frame_t *frame, xlator_t *this,
loc_t *loc, int32_t flags, mode_t mode,
- fd_t *fd, dict_t *params);
+ mode_t umask, fd_t *fd, dict_t *xdata);
/* Tell subsequent writes on the fd_t to fsync after every writev fop without
* requiring a fsync fop.
@@ -499,19 +499,16 @@ typedef int32_t (*fop_create_t) (call_frame_t *frame, xlator_t *this,
*/
#define GF_OPEN_NOWB 0x02
-typedef int32_t (*fop_open_t) (call_frame_t *frame,
- xlator_t *this,
- loc_t *loc,
- int32_t flags,
- fd_t *fd,
- int32_t wbflags);
+typedef int32_t (*fop_open_t) (call_frame_t *frame, xlator_t *this,
+ loc_t *loc, int32_t flags,
+ fd_t *fd, dict_t *xdata);
typedef int32_t (*fop_readv_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
size_t size,
off_t offset,
- uint32_t flags);
+ uint32_t flags, dict_t *xdata);
typedef int32_t (*fop_writev_t) (call_frame_t *frame,
xlator_t *this,
@@ -520,131 +517,131 @@ typedef int32_t (*fop_writev_t) (call_frame_t *frame,
int32_t count,
off_t offset,
uint32_t flags,
- struct iobref *iobref);
+ struct iobref *iobref, dict_t *xdata);
typedef int32_t (*fop_flush_t) (call_frame_t *frame,
xlator_t *this,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
typedef int32_t (*fop_fsync_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- int32_t datasync);
+ int32_t datasync, dict_t *xdata);
typedef int32_t (*fop_opendir_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
typedef int32_t (*fop_fsyncdir_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- int32_t datasync);
+ int32_t datasync, dict_t *xdata);
typedef int32_t (*fop_statfs_t) (call_frame_t *frame,
xlator_t *this,
- loc_t *loc);
+ loc_t *loc, dict_t *xdata);
typedef int32_t (*fop_setxattr_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
dict_t *dict,
- int32_t flags);
+ int32_t flags, dict_t *xdata);
typedef int32_t (*fop_getxattr_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- const char *name);
+ const char *name, dict_t *xdata);
typedef int32_t (*fop_fsetxattr_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
dict_t *dict,
- int32_t flags);
+ int32_t flags, dict_t *xdata);
typedef int32_t (*fop_fgetxattr_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- const char *name);
+ const char *name, dict_t *xdata);
typedef int32_t (*fop_removexattr_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- const char *name);
+ const char *name, dict_t *xdata);
typedef int32_t (*fop_fremovexattr_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- const char *name);
+ const char *name, dict_t *xdata);
typedef int32_t (*fop_lk_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
int32_t cmd,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
typedef int32_t (*fop_inodelk_t) (call_frame_t *frame,
xlator_t *this,
const char *volume,
loc_t *loc,
int32_t cmd,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
typedef int32_t (*fop_finodelk_t) (call_frame_t *frame,
xlator_t *this,
const char *volume,
fd_t *fd,
int32_t cmd,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
typedef int32_t (*fop_entrylk_t) (call_frame_t *frame,
xlator_t *this,
const char *volume, loc_t *loc,
const char *basename, entrylk_cmd cmd,
- entrylk_type type);
+ entrylk_type type, dict_t *xdata);
typedef int32_t (*fop_fentrylk_t) (call_frame_t *frame,
xlator_t *this,
const char *volume, fd_t *fd,
const char *basename, entrylk_cmd cmd,
- entrylk_type type);
+ entrylk_type type, dict_t *xdata);
typedef int32_t (*fop_readdir_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
size_t size,
- off_t offset);
+ off_t offset, dict_t *xdata);
typedef int32_t (*fop_readdirp_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
size_t size,
off_t offset,
- dict_t *dict);
+ dict_t *xdata);
typedef int32_t (*fop_xattrop_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
gf_xattrop_flags_t optype,
- dict_t *xattr);
+ dict_t *xattr, dict_t *xdata);
typedef int32_t (*fop_fxattrop_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
gf_xattrop_flags_t optype,
- dict_t *xattr);
+ dict_t *xattr, dict_t *xdata);
typedef int32_t (*fop_setattr_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
struct iatt *stbuf,
- int32_t valid);
+ int32_t valid, dict_t *xdata);
typedef int32_t (*fop_fsetattr_t) (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
struct iatt *stbuf,
- int32_t valid);
+ int32_t valid, dict_t *xdata);
struct xlator_fops {
diff --git a/rpc/xdr/src/glusterfs3-xdr.c b/rpc/xdr/src/glusterfs3-xdr.c
index 47d7328..5dffda3 100644
--- a/rpc/xdr/src/glusterfs3-xdr.c
+++ b/rpc/xdr/src/glusterfs3-xdr.c
@@ -317,9 +317,9 @@ xdr_gfs3_mknod_req (XDR *xdrs, gfs3_mknod_req *objp)
return FALSE;
if (!xdr_u_int (xdrs, &objp->mode))
return FALSE;
- if (!xdr_string (xdrs, &objp->bname, ~0))
+ if (!xdr_u_int (xdrs, &objp->umask))
return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
+ if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
@@ -357,9 +357,9 @@ xdr_gfs3_mkdir_req (XDR *xdrs, gfs3_mkdir_req *objp)
return FALSE;
if (!xdr_u_int (xdrs, &objp->mode))
return FALSE;
- if (!xdr_string (xdrs, &objp->bname, ~0))
+ if (!xdr_u_int (xdrs, &objp->umask))
return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
+ if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
@@ -397,6 +397,8 @@ xdr_gfs3_unlink_req (XDR *xdrs, gfs3_unlink_req *objp)
return FALSE;
if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
+ if (!xdr_u_int (xdrs, &objp->xflags))
+ return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -429,7 +431,7 @@ xdr_gfs3_rmdir_req (XDR *xdrs, gfs3_rmdir_req *objp)
if (!xdr_opaque (xdrs, objp->pargfid, 16))
return FALSE;
- if (!xdr_int (xdrs, &objp->flags))
+ if (!xdr_int (xdrs, &objp->xflags))
return FALSE;
if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
@@ -467,9 +469,9 @@ xdr_gfs3_symlink_req (XDR *xdrs, gfs3_symlink_req *objp)
return FALSE;
if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
- if (!xdr_string (xdrs, &objp->linkname, ~0))
+ if (!xdr_u_int (xdrs, &objp->umask))
return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
+ if (!xdr_string (xdrs, &objp->linkname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
@@ -623,8 +625,6 @@ xdr_gfs3_open_req (XDR *xdrs, gfs3_open_req *objp)
return FALSE;
if (!xdr_u_int (xdrs, &objp->flags))
return FALSE;
- if (!xdr_u_int (xdrs, &objp->wbflags))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -701,8 +701,6 @@ xdr_gfs3_lookup_req (XDR *xdrs, gfs3_lookup_req *objp)
return FALSE;
if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -722,8 +720,6 @@ xdr_gfs3_lookup_rsp (XDR *xdrs, gfs3_lookup_rsp *objp)
return FALSE;
if (!xdr_gf_iatt (xdrs, &objp->postparent))
return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
return TRUE;
@@ -1272,15 +1268,62 @@ xdr_gfs3_create_req (XDR *xdrs, gfs3_create_req *objp)
register int32_t *buf;
buf = NULL;
+
+ if (xdrs->x_op == XDR_ENCODE) {
+ if (!xdr_opaque (xdrs, objp->pargfid, 16))
+ return FALSE;
+ buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
+ if (buf == NULL) {
+ if (!xdr_u_int (xdrs, &objp->flags))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->mode))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->umask))
+ return FALSE;
+
+ } else {
+ IXDR_PUT_U_LONG(buf, objp->flags);
+ IXDR_PUT_U_LONG(buf, objp->mode);
+ IXDR_PUT_U_LONG(buf, objp->umask);
+ }
+ if (!xdr_string (xdrs, &objp->bname, ~0))
+ return FALSE;
+ if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
+ return FALSE;
+ return TRUE;
+ } else if (xdrs->x_op == XDR_DECODE) {
+ if (!xdr_opaque (xdrs, objp->pargfid, 16))
+ return FALSE;
+ buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
+ if (buf == NULL) {
+ if (!xdr_u_int (xdrs, &objp->flags))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->mode))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->umask))
+ return FALSE;
+
+ } else {
+ objp->flags = IXDR_GET_U_LONG(buf);
+ objp->mode = IXDR_GET_U_LONG(buf);
+ objp->umask = IXDR_GET_U_LONG(buf);
+ }
+ if (!xdr_string (xdrs, &objp->bname, ~0))
+ return FALSE;
+ if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
+ return FALSE;
+ return TRUE;
+ }
+
if (!xdr_opaque (xdrs, objp->pargfid, 16))
return FALSE;
if (!xdr_u_int (xdrs, &objp->flags))
return FALSE;
if (!xdr_u_int (xdrs, &objp->mode))
return FALSE;
- if (!xdr_string (xdrs, &objp->bname, ~0))
+ if (!xdr_u_int (xdrs, &objp->umask))
return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
+ if (!xdr_string (xdrs, &objp->bname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0))
return FALSE;
diff --git a/rpc/xdr/src/glusterfs3-xdr.h b/rpc/xdr/src/glusterfs3-xdr.h
index 49e9d6c..124b21e 100644
--- a/rpc/xdr/src/glusterfs3-xdr.h
+++ b/rpc/xdr/src/glusterfs3-xdr.h
@@ -137,12 +137,9 @@ struct gfs3_mknod_req {
char pargfid[16];
u_quad_t dev;
u_int mode;
+ u_int umask;
char *bname;
struct {
- u_int dict_len;
- char *dict_val;
- } dict;
- struct {
u_int xdata_len;
char *xdata_val;
} xdata;
@@ -165,12 +162,9 @@ typedef struct gfs3_mknod_rsp gfs3_mknod_rsp;
struct gfs3_mkdir_req {
char pargfid[16];
u_int mode;
+ u_int umask;
char *bname;
struct {
- u_int dict_len;
- char *dict_val;
- } dict;
- struct {
u_int xdata_len;
char *xdata_val;
} xdata;
@@ -193,6 +187,7 @@ typedef struct gfs3_mkdir_rsp gfs3_mkdir_rsp;
struct gfs3_unlink_req {
char pargfid[16];
char *bname;
+ u_int xflags;
struct {
u_int xdata_len;
char *xdata_val;
@@ -214,7 +209,7 @@ typedef struct gfs3_unlink_rsp gfs3_unlink_rsp;
struct gfs3_rmdir_req {
char pargfid[16];
- int flags;
+ int xflags;
char *bname;
struct {
u_int xdata_len;
@@ -238,12 +233,9 @@ typedef struct gfs3_rmdir_rsp gfs3_rmdir_rsp;
struct gfs3_symlink_req {
char pargfid[16];
char *bname;
+ u_int umask;
char *linkname;
struct {
- u_int dict_len;
- char *dict_val;
- } dict;
- struct {
u_int xdata_len;
char *xdata_val;
} xdata;
@@ -339,7 +331,6 @@ typedef struct gfs3_truncate_rsp gfs3_truncate_rsp;
struct gfs3_open_req {
char gfid[16];
u_int flags;
- u_int wbflags;
struct {
u_int xdata_len;
char *xdata_val;
@@ -389,10 +380,6 @@ struct gfs3_lookup_req {
u_int flags;
char *bname;
struct {
- u_int dict_len;
- char *dict_val;
- } dict;
- struct {
u_int xdata_len;
char *xdata_val;
} xdata;
@@ -405,10 +392,6 @@ struct gfs3_lookup_rsp {
struct gf_iatt stat;
struct gf_iatt postparent;
struct {
- u_int dict_len;
- char *dict_val;
- } dict;
- struct {
u_int xdata_len;
char *xdata_val;
} xdata;
@@ -789,12 +772,9 @@ struct gfs3_create_req {
char pargfid[16];
u_int flags;
u_int mode;
+ u_int umask;
char *bname;
struct {
- u_int dict_len;
- char *dict_val;
- } dict;
- struct {
u_int xdata_len;
char *xdata_val;
} xdata;
diff --git a/rpc/xdr/src/glusterfs3-xdr.x b/rpc/xdr/src/glusterfs3-xdr.x
index f35820b..64c2d20 100644
--- a/rpc/xdr/src/glusterfs3-xdr.x
+++ b/rpc/xdr/src/glusterfs3-xdr.x
@@ -73,8 +73,8 @@ struct gfs3_readlink_req {
opaque pargfid[16];
unsigned hyper dev;
unsigned int mode;
+ unsigned int umask;
string bname<>; /* NULL terminated */
- opaque dict<>;
opaque xdata<>; /* Extra data */
} ;
struct gfs3_mknod_rsp {
@@ -90,9 +90,9 @@ struct gfs3_readlink_req {
struct gfs3_mkdir_req {
opaque pargfid[16];
unsigned int mode;
+ unsigned int umask;
string bname<>; /* NULL terminated */
- opaque dict<>;
- opaque xdata<>; /* Extra data */
+ opaque xdata<>; /* Extra data */
} ;
struct gfs3_mkdir_rsp {
int op_ret;
@@ -107,6 +107,7 @@ struct gfs3_readlink_req {
struct gfs3_unlink_req {
opaque pargfid[16];
string bname<>; /* NULL terminated */
+ unsigned int xflags;
opaque xdata<>; /* Extra data */
};
struct gfs3_unlink_rsp {
@@ -120,9 +121,9 @@ struct gfs3_readlink_req {
struct gfs3_rmdir_req {
opaque pargfid[16];
- int flags;
+ int xflags;
string bname<>; /* NULL terminated */
- opaque xdata<>; /* Extra data */
+ opaque xdata<>; /* Extra data */
};
struct gfs3_rmdir_rsp {
int op_ret;
@@ -136,8 +137,8 @@ struct gfs3_readlink_req {
struct gfs3_symlink_req {
opaque pargfid[16];
string bname<>;
+ unsigned int umask;
string linkname<>;
- opaque dict<>;
opaque xdata<>; /* Extra data */
};
struct gfs3_symlink_rsp {
@@ -201,7 +202,6 @@ struct gfs3_readlink_req {
struct gfs3_open_req {
opaque gfid[16];
unsigned int flags;
- unsigned int wbflags;
opaque xdata<>; /* Extra data */
};
struct gfs3_open_rsp {
@@ -233,7 +233,6 @@ struct gfs3_lookup_req {
opaque pargfid[16];
unsigned int flags;
string bname<>;
- opaque dict<>;
opaque xdata<>; /* Extra data */
};
struct gfs3_lookup_rsp {
@@ -241,7 +240,6 @@ struct gfs3_lookup_req {
int op_errno;
struct gf_iatt stat;
struct gf_iatt postparent;
- opaque dict<>;
opaque xdata<>; /* Extra data */
} ;
@@ -482,8 +480,8 @@ struct gfs3_create_req {
opaque pargfid[16];
unsigned int flags;
unsigned int mode;
+ unsigned int umask;
string bname<>;
- opaque dict<>;
opaque xdata<>; /* Extra data */
} ;
struct gfs3_create_rsp {
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 22c7411..2cfe92a 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -955,6 +955,12 @@ afr_local_cleanup (afr_local_t *local, xlator_t *this)
if (local->cont.readdir.dict)
dict_unref (local->cont.readdir.dict);
}
+
+ if (local->xdata_req)
+ dict_unref (local->xdata_req);
+
+ if (local->xdata_rsp)
+ dict_unref (local->xdata_rsp);
}
@@ -2214,7 +2220,8 @@ afr_flush_unwind (call_frame_t *frame, xlator_t *this)
if (main_frame) {
AFR_STACK_UNWIND (flush, main_frame,
- local->op_ret, local->op_errno);
+ local->op_ret, local->op_errno,
+ NULL);
}
return 0;
@@ -2223,7 +2230,7 @@ afr_flush_unwind (call_frame_t *frame, xlator_t *this)
int
afr_flush_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
@@ -2293,7 +2300,7 @@ afr_flush_wind (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->flush,
- local->fd);
+ local->fd, NULL);
if (!--call_count)
break;
@@ -2320,7 +2327,7 @@ afr_flush_done (call_frame_t *frame, xlator_t *this)
int
-afr_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
+afr_flush (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -2373,7 +2380,7 @@ out:
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (flush, frame, -1, op_errno);
+ AFR_STACK_UNWIND (flush, frame, -1, op_errno, NULL);
}
return 0;
@@ -2459,7 +2466,7 @@ afr_release (xlator_t *this, fd_t *fd)
int
afr_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
afr_local_t *local = NULL;
int call_count = -1;
@@ -2501,7 +2508,8 @@ afr_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (call_count == 0) {
AFR_STACK_UNWIND (fsync, frame, local->op_ret, local->op_errno,
&local->cont.fsync.prebuf,
- &local->cont.fsync.postbuf);
+ &local->cont.fsync.postbuf,
+ NULL);
}
return 0;
@@ -2510,7 +2518,7 @@ afr_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
afr_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int32_t datasync)
+ int32_t datasync, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -2542,7 +2550,7 @@ afr_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd,
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->fsync,
- fd, datasync);
+ fd, datasync, xdata);
if (!--call_count)
break;
}
@@ -2551,7 +2559,7 @@ afr_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (fsync, frame, -1, op_errno, NULL, NULL);
+ AFR_STACK_UNWIND (fsync, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
@@ -2561,7 +2569,8 @@ out:
int32_t
afr_fsyncdir_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int32_t op_ret, int32_t op_errno)
+ xlator_t *this, int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
afr_local_t *local = NULL;
int call_count = -1;
@@ -2581,7 +2590,7 @@ afr_fsyncdir_cbk (call_frame_t *frame, void *cookie,
if (call_count == 0)
AFR_STACK_UNWIND (fsyncdir, frame, local->op_ret,
- local->op_errno);
+ local->op_errno, xdata);
return 0;
}
@@ -2589,7 +2598,7 @@ afr_fsyncdir_cbk (call_frame_t *frame, void *cookie,
int32_t
afr_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int32_t datasync)
+ int32_t datasync, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -2618,7 +2627,7 @@ afr_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, afr_fsyncdir_cbk,
priv->children[i],
priv->children[i]->fops->fsyncdir,
- fd, datasync);
+ fd, datasync, xdata);
if (!--call_count)
break;
}
@@ -2627,7 +2636,7 @@ afr_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (fsyncdir, frame, -1, op_errno);
+ AFR_STACK_UNWIND (fsyncdir, frame, -1, op_errno, NULL);
return 0;
}
@@ -2638,7 +2647,7 @@ out:
int32_t
afr_xattrop_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- dict_t *xattr)
+ dict_t *xattr, dict_t *xdata)
{
afr_local_t *local = NULL;
int call_count = -1;
@@ -2661,7 +2670,7 @@ afr_xattrop_cbk (call_frame_t *frame, void *cookie,
if (call_count == 0)
AFR_STACK_UNWIND (xattrop, frame, local->op_ret, local->op_errno,
- local->cont.xattrop.xattr);
+ local->cont.xattrop.xattr, xdata);
return 0;
}
@@ -2669,7 +2678,7 @@ afr_xattrop_cbk (call_frame_t *frame, void *cookie,
int32_t
afr_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc,
- gf_xattrop_flags_t optype, dict_t *xattr)
+ gf_xattrop_flags_t optype, dict_t *xattr, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -2698,7 +2707,7 @@ afr_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc,
STACK_WIND (frame, afr_xattrop_cbk,
priv->children[i],
priv->children[i]->fops->xattrop,
- loc, optype, xattr);
+ loc, optype, xattr, xdata);
if (!--call_count)
break;
}
@@ -2707,7 +2716,7 @@ afr_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (xattrop, frame, -1, op_errno, NULL);
+ AFR_STACK_UNWIND (xattrop, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -2718,7 +2727,7 @@ out:
int32_t
afr_fxattrop_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- dict_t *xattr)
+ dict_t *xattr, dict_t *xdata)
{
afr_local_t *local = NULL;
@@ -2743,7 +2752,7 @@ afr_fxattrop_cbk (call_frame_t *frame, void *cookie,
if (call_count == 0)
AFR_STACK_UNWIND (fxattrop, frame, local->op_ret, local->op_errno,
- local->cont.fxattrop.xattr);
+ local->cont.fxattrop.xattr, xdata);
return 0;
}
@@ -2751,7 +2760,7 @@ afr_fxattrop_cbk (call_frame_t *frame, void *cookie,
int32_t
afr_fxattrop (call_frame_t *frame, xlator_t *this, fd_t *fd,
- gf_xattrop_flags_t optype, dict_t *xattr)
+ gf_xattrop_flags_t optype, dict_t *xattr, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -2780,7 +2789,7 @@ afr_fxattrop (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, afr_fxattrop_cbk,
priv->children[i],
priv->children[i]->fops->fxattrop,
- fd, optype, xattr);
+ fd, optype, xattr, xdata);
if (!--call_count)
break;
}
@@ -2789,7 +2798,7 @@ afr_fxattrop (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (fxattrop, frame, -1, op_errno, NULL);
+ AFR_STACK_UNWIND (fxattrop, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -2798,7 +2807,7 @@ out:
int32_t
afr_inodelk_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int32_t op_ret, int32_t op_errno)
+ xlator_t *this, int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t *local = NULL;
@@ -2819,7 +2828,7 @@ afr_inodelk_cbk (call_frame_t *frame, void *cookie,
if (call_count == 0)
AFR_STACK_UNWIND (inodelk, frame, local->op_ret,
- local->op_errno);
+ local->op_errno, xdata);
return 0;
}
@@ -2827,7 +2836,8 @@ afr_inodelk_cbk (call_frame_t *frame, void *cookie,
int32_t
afr_inodelk (call_frame_t *frame, xlator_t *this,
- const char *volume, loc_t *loc, int32_t cmd, struct gf_flock *flock)
+ const char *volume, loc_t *loc, int32_t cmd,
+ struct gf_flock *flock, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -2856,7 +2866,7 @@ afr_inodelk (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, afr_inodelk_cbk,
priv->children[i],
priv->children[i]->fops->inodelk,
- volume, loc, cmd, flock);
+ volume, loc, cmd, flock, xdata);
if (!--call_count)
break;
@@ -2866,14 +2876,15 @@ afr_inodelk (call_frame_t *frame, xlator_t *this,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (inodelk, frame, -1, op_errno);
+ AFR_STACK_UNWIND (inodelk, frame, -1, op_errno, NULL);
return 0;
}
int32_t
afr_finodelk_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int32_t op_ret, int32_t op_errno)
+ xlator_t *this, int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
afr_local_t *local = NULL;
@@ -2894,7 +2905,7 @@ afr_finodelk_cbk (call_frame_t *frame, void *cookie,
if (call_count == 0)
AFR_STACK_UNWIND (finodelk, frame, local->op_ret,
- local->op_errno);
+ local->op_errno, xdata);
return 0;
}
@@ -2902,7 +2913,8 @@ afr_finodelk_cbk (call_frame_t *frame, void *cookie,
int32_t
afr_finodelk (call_frame_t *frame, xlator_t *this,
- const char *volume, fd_t *fd, int32_t cmd, struct gf_flock *flock)
+ const char *volume, fd_t *fd, int32_t cmd, struct gf_flock *flock,
+ dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -2931,7 +2943,7 @@ afr_finodelk (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, afr_finodelk_cbk,
priv->children[i],
priv->children[i]->fops->finodelk,
- volume, fd, cmd, flock);
+ volume, fd, cmd, flock, xdata);
if (!--call_count)
break;
@@ -2941,15 +2953,14 @@ afr_finodelk (call_frame_t *frame, xlator_t *this,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (finodelk, frame, -1, op_errno);
+ AFR_STACK_UNWIND (finodelk, frame, -1, op_errno, NULL);
return 0;
}
int32_t
-afr_entrylk_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int32_t op_ret, int32_t op_errno)
-
+afr_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t *local = NULL;
int call_count = -1;
@@ -2969,7 +2980,7 @@ afr_entrylk_cbk (call_frame_t *frame, void *cookie,
if (call_count == 0)
AFR_STACK_UNWIND (entrylk, frame, local->op_ret,
- local->op_errno);
+ local->op_errno, xdata);
return 0;
}
@@ -2978,7 +2989,8 @@ afr_entrylk_cbk (call_frame_t *frame, void *cookie,
int32_t
afr_entrylk (call_frame_t *frame, xlator_t *this,
const char *volume, loc_t *loc,
- const char *basename, entrylk_cmd cmd, entrylk_type type)
+ const char *basename, entrylk_cmd cmd, entrylk_type type,
+ dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -3007,7 +3019,7 @@ afr_entrylk (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, afr_entrylk_cbk,
priv->children[i],
priv->children[i]->fops->entrylk,
- volume, loc, basename, cmd, type);
+ volume, loc, basename, cmd, type, xdata);
if (!--call_count)
break;
@@ -3017,7 +3029,7 @@ afr_entrylk (call_frame_t *frame, xlator_t *this,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (entrylk, frame, -1, op_errno);
+ AFR_STACK_UNWIND (entrylk, frame, -1, op_errno, NULL);
return 0;
}
@@ -3025,7 +3037,7 @@ out:
int32_t
afr_fentrylk_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int32_t op_ret, int32_t op_errno)
+ xlator_t *this, int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t *local = NULL;
@@ -3046,7 +3058,7 @@ afr_fentrylk_cbk (call_frame_t *frame, void *cookie,
if (call_count == 0)
AFR_STACK_UNWIND (fentrylk, frame, local->op_ret,
- local->op_errno);
+ local->op_errno, xdata);
return 0;
}
@@ -3055,7 +3067,8 @@ afr_fentrylk_cbk (call_frame_t *frame, void *cookie,
int32_t
afr_fentrylk (call_frame_t *frame, xlator_t *this,
const char *volume, fd_t *fd,
- const char *basename, entrylk_cmd cmd, entrylk_type type)
+ const char *basename, entrylk_cmd cmd,
+ entrylk_type type, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -3084,7 +3097,7 @@ afr_fentrylk (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, afr_fentrylk_cbk,
priv->children[i],
priv->children[i]->fops->fentrylk,
- volume, fd, basename, cmd, type);
+ volume, fd, basename, cmd, type, xdata);
if (!--call_count)
break;
@@ -3094,14 +3107,14 @@ afr_fentrylk (call_frame_t *frame, xlator_t *this,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (fentrylk, frame, -1, op_errno);
+ AFR_STACK_UNWIND (fentrylk, frame, -1, op_errno, NULL);
return 0;
}
int32_t
afr_statfs_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- struct statvfs *statvfs)
+ struct statvfs *statvfs, dict_t *xdata)
{
afr_local_t *local = NULL;
int call_count = 0;
@@ -3132,7 +3145,7 @@ afr_statfs_cbk (call_frame_t *frame, void *cookie,
if (call_count == 0)
AFR_STACK_UNWIND (statfs, frame, local->op_ret, local->op_errno,
- &local->cont.statfs.buf);
+ &local->cont.statfs.buf, xdata);
return 0;
}
@@ -3140,7 +3153,7 @@ afr_statfs_cbk (call_frame_t *frame, void *cookie,
int32_t
afr_statfs (call_frame_t *frame, xlator_t *this,
- loc_t *loc)
+ loc_t *loc, dict_t *xdata)
{
afr_private_t * priv = NULL;
int child_count = 0;
@@ -3171,7 +3184,7 @@ afr_statfs (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, afr_statfs_cbk,
priv->children[i],
priv->children[i]->fops->statfs,
- loc);
+ loc, xdata);
if (!--call_count)
break;
}
@@ -3180,14 +3193,15 @@ afr_statfs (call_frame_t *frame, xlator_t *this,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (statfs, frame, -1, op_errno, NULL);
+ AFR_STACK_UNWIND (statfs, frame, -1, op_errno, NULL, NULL);
return 0;
}
int32_t
afr_lk_unlock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct gf_flock *lock)
+ int32_t op_ret, int32_t op_errno, struct gf_flock *lock,
+ dict_t *xdata)
{
afr_local_t * local = NULL;
int call_count = -1;
@@ -3197,7 +3211,7 @@ afr_lk_unlock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (call_count == 0)
AFR_STACK_UNWIND (lk, frame, local->op_ret, local->op_errno,
- lock);
+ lock, xdata);
return 0;
}
@@ -3219,7 +3233,7 @@ afr_lk_unlock (call_frame_t *frame, xlator_t *this)
if (call_count == 0) {
AFR_STACK_UNWIND (lk, frame, local->op_ret, local->op_errno,
- &local->cont.lk.ret_flock);
+ &local->cont.lk.ret_flock, NULL);
return 0;
}
@@ -3233,7 +3247,7 @@ afr_lk_unlock (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->lk,
local->fd, F_SETLK,
- &local->cont.lk.user_flock);
+ &local->cont.lk.user_flock, NULL);
if (!--call_count)
break;
@@ -3246,7 +3260,7 @@ afr_lk_unlock (call_frame_t *frame, xlator_t *this)
int32_t
afr_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct gf_flock *lock)
+ int32_t op_ret, int32_t op_errno, struct gf_flock *lock, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -3281,12 +3295,12 @@ afr_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
priv->children[child_index],
priv->children[child_index]->fops->lk,
local->fd, local->cont.lk.cmd,
- &local->cont.lk.user_flock);
+ &local->cont.lk.user_flock, xdata);
} else if (local->op_ret == -1) {
/* all nodes have gone down */
AFR_STACK_UNWIND (lk, frame, -1, ENOTCONN,
- &local->cont.lk.ret_flock);
+ &local->cont.lk.ret_flock, NULL);
} else {
/* locking has succeeded on all nodes that are up */
@@ -3304,7 +3318,7 @@ afr_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
*/
AFR_STACK_UNWIND (lk, frame, local->op_ret, local->op_errno,
- &local->cont.lk.ret_flock);
+ &local->cont.lk.ret_flock, NULL);
}
return 0;
@@ -3313,7 +3327,7 @@ afr_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
afr_lk (call_frame_t *frame, xlator_t *this,
- fd_t *fd, int32_t cmd, struct gf_flock *flock)
+ fd_t *fd, int32_t cmd, struct gf_flock *flock, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -3351,12 +3365,12 @@ afr_lk (call_frame_t *frame, xlator_t *this,
STACK_WIND_COOKIE (frame, afr_lk_cbk, (void *) (long) 0,
priv->children[i],
priv->children[i]->fops->lk,
- fd, cmd, flock);
+ fd, cmd, flock, xdata);
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (lk, frame, -1, op_errno, NULL);
+ AFR_STACK_UNWIND (lk, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -3911,7 +3925,7 @@ afr_set_low_priority (call_frame_t *frame)
int
afr_child_fd_ctx_set (xlator_t *this, fd_t *fd, int32_t child,
- int flags, int32_t wbflags)
+ int flags)
{
int ret = 0;
uint64_t ctx = 0;
@@ -3936,7 +3950,6 @@ afr_child_fd_ctx_set (xlator_t *this, fd_t *fd, int32_t child,
fd_ctx->opened_on[child] = AFR_FD_OPENED;
if (!IA_ISDIR (fd->inode->ia_type)) {
fd_ctx->flags = flags;
- fd_ctx->wbflags = wbflags;
}
ret = 0;
out:
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c
index ee9c5d8..5abbd9c 100644
--- a/xlators/cluster/afr/src/afr-dir-read.c
+++ b/xlators/cluster/afr/src/afr-dir-read.c
@@ -60,7 +60,7 @@ afr_examine_dir_sh_unwind (call_frame_t *frame, xlator_t *this, int32_t op_ret,
afr_set_opendir_done (this, local->fd->inode);
AFR_STACK_UNWIND (opendir, frame, local->op_ret,
- local->op_errno, local->fd);
+ local->op_errno, local->fd, NULL);
return 0;
}
@@ -99,7 +99,7 @@ __checksums_differ (uint32_t *checksum, int child_count,
int32_t
afr_examine_dir_readdir_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- gf_dirent_t *entries)
+ gf_dirent_t *entries, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -152,7 +152,7 @@ afr_examine_dir_readdir_cbk (call_frame_t *frame, void *cookie,
(void *) (long) child_index,
priv->children[child_index],
priv->children[child_index]->fops->readdir,
- local->fd, 131072, last_offset);
+ local->fd, 131072, last_offset, NULL);
return 0;
@@ -175,7 +175,7 @@ out:
afr_set_opendir_done (this, inode);
AFR_STACK_UNWIND (opendir, frame, local->op_ret,
- local->op_errno, local->fd);
+ local->op_errno, local->fd, NULL);
}
}
@@ -208,7 +208,7 @@ afr_examine_dir (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->readdir,
- local->fd, 131072, 0);
+ local->fd, 131072, 0, NULL);
if (!--call_count)
break;
@@ -222,7 +222,7 @@ afr_examine_dir (call_frame_t *frame, xlator_t *this)
int32_t
afr_opendir_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- fd_t *fd)
+ fd_t *fd, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -242,8 +242,7 @@ afr_opendir_cbk (call_frame_t *frame, void *cookie,
{
if (op_ret >= 0) {
local->op_ret = op_ret;
- ret = afr_child_fd_ctx_set (this, fd, child_index,
- 0, 0);
+ ret = afr_child_fd_ctx_set (this, fd, child_index, 0);
if (ret) {
local->op_ret = -1;
local->op_errno = -ret;
@@ -291,7 +290,7 @@ unlock:
out:
AFR_STACK_UNWIND (opendir, frame, local->op_ret,
- local->op_errno, local->fd);
+ local->op_errno, local->fd, NULL);
return 0;
}
@@ -336,7 +335,7 @@ afr_opendir (call_frame_t *frame, xlator_t *this,
(void*) (long) i,
priv->children[i],
priv->children[i]->fops->opendir,
- loc, fd);
+ loc, fd, NULL);
if (!--call_count)
break;
@@ -346,7 +345,7 @@ afr_opendir (call_frame_t *frame, xlator_t *this,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (opendir, frame, -1, op_errno, fd);
+ AFR_STACK_UNWIND (opendir, frame, -1, op_errno, fd, NULL);
return 0;
}
@@ -476,7 +475,7 @@ afr_forget_entries (fd_t *fd)
int32_t
afr_readdir_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- gf_dirent_t *entries)
+ gf_dirent_t *entries, dict_t *xdata)
{
afr_local_t * local = NULL;
gf_dirent_t * entry = NULL;
@@ -496,7 +495,7 @@ afr_readdir_cbk (call_frame_t *frame, void *cookie,
}
out:
- AFR_STACK_UNWIND (readdir, frame, op_ret, op_errno, entries);
+ AFR_STACK_UNWIND (readdir, frame, op_ret, op_errno, entries, NULL);
return 0;
}
@@ -504,7 +503,8 @@ out:
int32_t
afr_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, gf_dirent_t *entries)
+ int32_t op_ret, int32_t op_errno, gf_dirent_t *entries,
+ dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -623,7 +623,7 @@ afr_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
out:
- AFR_STACK_UNWIND (readdirp, frame, op_ret, op_errno, entries);
+ AFR_STACK_UNWIND (readdirp, frame, op_ret, op_errno, entries, NULL);
return 0;
}
@@ -706,7 +706,7 @@ afr_do_readdir (call_frame_t *frame, xlator_t *this,
(void *) (long) call_child,
children[call_child],
children[call_child]->fops->readdir, fd,
- size, offset);
+ size, offset, dict);
else
STACK_WIND_COOKIE (frame, afr_readdirp_cbk,
(void *) (long) call_child,
@@ -717,16 +717,16 @@ afr_do_readdir (call_frame_t *frame, xlator_t *this,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (readdir, frame, -1, op_errno, NULL);
+ AFR_STACK_UNWIND (readdir, frame, -1, op_errno, NULL, NULL);
return 0;
}
int32_t
afr_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
- off_t offset)
+ off_t offset, dict_t *xdata)
{
- afr_do_readdir (frame, this, fd, size, offset, GF_FOP_READDIR, NULL);
+ afr_do_readdir (frame, this, fd, size, offset, GF_FOP_READDIR, xdata);
return 0;
}
diff --git a/xlators/cluster/afr/src/afr-dir-read.h b/xlators/cluster/afr/src/afr-dir-read.h
index 7e50a1c..2ab126a 100644
--- a/xlators/cluster/afr/src/afr-dir-read.h
+++ b/xlators/cluster/afr/src/afr-dir-read.h
@@ -23,14 +23,14 @@
int32_t
afr_opendir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, fd_t *fd);
+ loc_t *loc, fd_t *fd, dict_t *xdata);
int32_t
afr_releasedir (xlator_t *this, fd_t *fd);
int32_t
afr_readdir (call_frame_t *frame, xlator_t *this,
- fd_t *fd, size_t size, off_t offset);
+ fd_t *fd, size_t size, off_t offset, dict_t *xdata);
int32_t
@@ -39,7 +39,7 @@ afr_readdirp (call_frame_t *frame, xlator_t *this,
int32_t
afr_checksum (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int32_t flags);
+ loc_t *loc, int32_t flags, dict_t *xdata);
#endif /* __DIR_READ_H__ */
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index 1cd447e..37d86ee 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -106,7 +106,8 @@ afr_create_unwind (call_frame_t *frame, xlator_t *this)
local->cont.create.fd,
local->cont.create.inode,
unwind_buf, &local->cont.create.preparent,
- &local->cont.create.postparent);
+ &local->cont.create.postparent,
+ NULL);
}
return 0;
@@ -117,7 +118,8 @@ int
afr_create_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
fd_t *fd, inode_t *inode, struct iatt *buf,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -235,8 +237,9 @@ afr_create_wind (call_frame_t *frame, xlator_t *this)
&local->loc,
local->cont.create.flags,
local->cont.create.mode,
+ local->umask,
local->cont.create.fd,
- local->cont.create.params);
+ local->xdata_req);
if (!--call_count)
break;
}
@@ -264,7 +267,7 @@ afr_create_done (call_frame_t *frame, xlator_t *this)
int
afr_create (call_frame_t *frame, xlator_t *this,
loc_t *loc, int32_t flags, mode_t mode,
- fd_t *fd, dict_t *params)
+ mode_t umask, fd_t *fd, dict_t *params)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -305,8 +308,9 @@ afr_create (call_frame_t *frame, xlator_t *this,
local->cont.create.flags = flags;
local->cont.create.mode = mode;
local->cont.create.fd = fd_ref (fd);
+ local->umask = umask;
if (params)
- local->cont.create.params = dict_ref (params);
+ local->xdata_req = dict_ref (params);
local->transaction.fop = afr_create_wind;
local->transaction.done = afr_create_done;
@@ -328,7 +332,7 @@ out:
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
AFR_STACK_UNWIND (create, frame, -1, op_errno,
- NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL, NULL);
}
return 0;
@@ -367,7 +371,8 @@ afr_mknod_unwind (call_frame_t *frame, xlator_t *this)
local->op_ret, local->op_errno,
local->cont.mknod.inode,
unwind_buf, &local->cont.mknod.preparent,
- &local->cont.mknod.postparent);
+ &local->cont.mknod.postparent,
+ NULL);
}
return 0;
@@ -378,7 +383,7 @@ int
afr_mknod_wind_cbk (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)
+ struct iatt *postparent, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -463,7 +468,8 @@ afr_mknod_wind (call_frame_t *frame, xlator_t *this)
priv->children[i]->fops->mknod,
&local->loc, local->cont.mknod.mode,
local->cont.mknod.dev,
- local->cont.mknod.params);
+ local->umask,
+ local->xdata_req);
if (!--call_count)
break;
}
@@ -488,8 +494,8 @@ afr_mknod_done (call_frame_t *frame, xlator_t *this)
int
-afr_mknod (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dev_t dev, dict_t *params)
+afr_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
+ dev_t dev, mode_t umask, dict_t *params)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -529,8 +535,9 @@ afr_mknod (call_frame_t *frame, xlator_t *this,
local->cont.mknod.mode = mode;
local->cont.mknod.dev = dev;
+ local->umask = umask;
if (params)
- local->cont.mknod.params = dict_ref (params);
+ local->xdata_req = dict_ref (params);
local->transaction.fop = afr_mknod_wind;
local->transaction.done = afr_mknod_done;
@@ -552,7 +559,7 @@ out:
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
AFR_STACK_UNWIND (mknod, frame, -1, op_errno,
- NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
}
return 0;
@@ -592,7 +599,8 @@ afr_mkdir_unwind (call_frame_t *frame, xlator_t *this)
local->op_ret, local->op_errno,
local->cont.mkdir.inode,
unwind_buf, &local->cont.mkdir.preparent,
- &local->cont.mkdir.postparent);
+ &local->cont.mkdir.postparent,
+ NULL);
}
return 0;
@@ -603,7 +611,7 @@ int
afr_mkdir_wind_cbk (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)
+ struct iatt *postparent, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -688,7 +696,8 @@ afr_mkdir_wind (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->mkdir,
&local->loc, local->cont.mkdir.mode,
- local->cont.mkdir.params);
+ local->umask,
+ local->xdata_req);
if (!--call_count)
break;
}
@@ -715,7 +724,7 @@ afr_mkdir_done (call_frame_t *frame, xlator_t *this)
int
afr_mkdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dict_t *params)
+ loc_t *loc, mode_t mode, mode_t umask, dict_t *params)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -754,8 +763,9 @@ afr_mkdir (call_frame_t *frame, xlator_t *this,
UNLOCK (&priv->read_child_lock);
local->cont.mkdir.mode = mode;
+ local->umask = umask;
if (params)
- local->cont.mkdir.params = dict_ref (params);
+ local->xdata_req = dict_ref (params);
local->transaction.fop = afr_mkdir_wind;
local->transaction.done = afr_mkdir_done;
@@ -778,7 +788,7 @@ out:
AFR_STACK_DESTROY (transaction_frame);
AFR_STACK_UNWIND (mkdir, frame, -1, op_errno,
- NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
}
return 0;
@@ -818,7 +828,8 @@ afr_link_unwind (call_frame_t *frame, xlator_t *this)
local->op_ret, local->op_errno,
local->cont.link.inode,
unwind_buf, &local->cont.link.preparent,
- &local->cont.link.postparent);
+ &local->cont.link.postparent,
+ NULL);
}
return 0;
@@ -829,7 +840,7 @@ int
afr_link_wind_cbk (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)
+ struct iatt *postparent, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -914,7 +925,7 @@ afr_link_wind (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->link,
&local->loc,
- &local->newloc);
+ &local->newloc, local->xdata_req);
if (!--call_count)
break;
@@ -940,7 +951,7 @@ afr_link_done (call_frame_t *frame, xlator_t *this)
int
afr_link (call_frame_t *frame, xlator_t *this,
- loc_t *oldloc, loc_t *newloc)
+ loc_t *oldloc, loc_t *newloc, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -971,6 +982,8 @@ afr_link (call_frame_t *frame, xlator_t *this,
loc_copy (&local->loc, oldloc);
loc_copy (&local->newloc, newloc);
+ if (xdata)
+ local->xdata_req = dict_ref (xdata);
LOCK (&priv->read_child_lock);
{
@@ -999,7 +1012,7 @@ out:
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
AFR_STACK_UNWIND (link, frame, -1, op_errno,
- NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
}
return 0;
@@ -1039,7 +1052,8 @@ afr_symlink_unwind (call_frame_t *frame, xlator_t *this)
local->op_ret, local->op_errno,
local->cont.symlink.inode,
unwind_buf, &local->cont.symlink.preparent,
- &local->cont.symlink.postparent);
+ &local->cont.symlink.postparent,
+ NULL);
}
return 0;
@@ -1050,7 +1064,7 @@ int
afr_symlink_wind_cbk (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)
+ struct iatt *postparent, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -1136,7 +1150,8 @@ afr_symlink_wind (call_frame_t *frame, xlator_t *this)
priv->children[i]->fops->symlink,
local->cont.symlink.linkpath,
&local->loc,
- local->cont.symlink.params);
+ local->umask,
+ local->xdata_req);
if (!--call_count)
break;
@@ -1163,7 +1178,7 @@ afr_symlink_done (call_frame_t *frame, xlator_t *this)
int
afr_symlink (call_frame_t *frame, xlator_t *this,
- const char *linkpath, loc_t *loc, dict_t *params)
+ const char *linkpath, loc_t *loc, mode_t umask, dict_t *params)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -1202,8 +1217,9 @@ afr_symlink (call_frame_t *frame, xlator_t *this,
UNLOCK (&priv->read_child_lock);
local->cont.symlink.linkpath = gf_strdup (linkpath);
+ local->umask = umask;
if (params)
- local->cont.symlink.params = dict_ref (params);
+ local->xdata_req = dict_ref (params);
local->transaction.fop = afr_symlink_wind;
local->transaction.done = afr_symlink_done;
@@ -1225,7 +1241,7 @@ out:
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
AFR_STACK_UNWIND (symlink, frame, -1, op_errno,
- NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
}
return 0;
@@ -1266,7 +1282,8 @@ afr_rename_unwind (call_frame_t *frame, xlator_t *this)
&local->cont.rename.preoldparent,
&local->cont.rename.postoldparent,
&local->cont.rename.prenewparent,
- &local->cont.rename.postnewparent);
+ &local->cont.rename.postnewparent,
+ NULL);
}
return 0;
@@ -1277,7 +1294,8 @@ int
afr_rename_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *buf,
struct iatt *preoldparent, struct iatt *postoldparent,
- struct iatt *prenewparent, struct iatt *postnewparent)
+ struct iatt *prenewparent, struct iatt *postnewparent,
+ dict_t *xdata)
{
afr_local_t * local = NULL;
int call_count = -1;
@@ -1356,7 +1374,7 @@ afr_rename_wind (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->rename,
&local->loc,
- &local->newloc);
+ &local->newloc, NULL);
if (!--call_count)
break;
}
@@ -1381,7 +1399,7 @@ afr_rename_done (call_frame_t *frame, xlator_t *this)
int
afr_rename (call_frame_t *frame, xlator_t *this,
- loc_t *oldloc, loc_t *newloc)
+ loc_t *oldloc, loc_t *newloc, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -1441,7 +1459,7 @@ out:
AFR_STACK_DESTROY (transaction_frame);
AFR_STACK_UNWIND (rename, frame, -1, op_errno,
- NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL, NULL);
}
return 0;
@@ -1472,7 +1490,8 @@ afr_unlink_unwind (call_frame_t *frame, xlator_t *this)
AFR_STACK_UNWIND (unlink, main_frame,
local->op_ret, local->op_errno,
&local->cont.unlink.preparent,
- &local->cont.unlink.postparent);
+ &local->cont.unlink.postparent,
+ NULL);
}
return 0;
@@ -1482,7 +1501,7 @@ afr_unlink_unwind (call_frame_t *frame, xlator_t *this)
int
afr_unlink_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
afr_local_t * local = NULL;
int call_count = -1;
@@ -1557,7 +1576,8 @@ afr_unlink_wind (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->unlink,
- &local->loc);
+ &local->loc, local->xflag,
+ local->xdata_req);
if (!--call_count)
break;
@@ -1583,7 +1603,7 @@ afr_unlink_done (call_frame_t *frame, xlator_t *this)
int32_t
afr_unlink (call_frame_t *frame, xlator_t *this,
- loc_t *loc)
+ loc_t *loc, int xflag, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -1613,6 +1633,9 @@ afr_unlink (call_frame_t *frame, xlator_t *this,
goto out;
loc_copy (&local->loc, loc);
+ local->xflag = xflag;
+ if (xdata)
+ local->xdata_req = dict_ref (xdata);
local->transaction.fop = afr_unlink_wind;
local->transaction.done = afr_unlink_done;
@@ -1634,7 +1657,7 @@ out:
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
AFR_STACK_UNWIND (unlink, frame, -1, op_errno,
- NULL, NULL);
+ NULL, NULL, NULL);
}
return 0;
@@ -1667,7 +1690,8 @@ afr_rmdir_unwind (call_frame_t *frame, xlator_t *this)
AFR_STACK_UNWIND (rmdir, main_frame,
local->op_ret, local->op_errno,
&local->cont.rmdir.preparent,
- &local->cont.rmdir.postparent);
+ &local->cont.rmdir.postparent,
+ NULL);
}
return 0;
@@ -1677,7 +1701,7 @@ afr_rmdir_unwind (call_frame_t *frame, xlator_t *this)
int
afr_rmdir_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
afr_local_t * local = NULL;
int call_count = -1;
@@ -1753,7 +1777,8 @@ afr_rmdir_wind (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->rmdir,
- &local->loc, local->cont.rmdir.flags);
+ &local->loc, local->cont.rmdir.flags,
+ NULL);
if (!--call_count)
break;
@@ -1779,7 +1804,7 @@ afr_rmdir_done (call_frame_t *frame, xlator_t *this)
int
afr_rmdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int flags)
+ loc_t *loc, int flags, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -1830,7 +1855,7 @@ out:
if (ret < 0) {
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (rmdir, frame, -1, op_errno, NULL, NULL);
+ AFR_STACK_UNWIND (rmdir, frame, -1, op_errno, NULL, NULL, NULL);
}
return 0;
diff --git a/xlators/cluster/afr/src/afr-dir-write.h b/xlators/cluster/afr/src/afr-dir-write.h
index 0290c63..5a3494e 100644
--- a/xlators/cluster/afr/src/afr-dir-write.h
+++ b/xlators/cluster/afr/src/afr-dir-write.h
@@ -23,38 +23,34 @@
int32_t
afr_create (call_frame_t *frame, xlator_t *this,
loc_t *loc, int32_t flags, mode_t mode,
- fd_t *fd, dict_t *params);
+ mode_t umask, fd_t *fd, dict_t *xdata);
int32_t
afr_mknod (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dev_t dev, dict_t *params);
+ loc_t *loc, mode_t mode, dev_t dev, mode_t umask, dict_t *xdata);
int32_t
afr_mkdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dict_t *params);
+ loc_t *loc, mode_t mode, mode_t umask, dict_t *xdata);
int32_t
afr_unlink (call_frame_t *frame, xlator_t *this,
- loc_t *loc);
+ loc_t *loc, int xflag, dict_t *xdata);
int32_t
afr_rmdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int flags);
+ loc_t *loc, int flags, dict_t *xdata);
int32_t
afr_link (call_frame_t *frame, xlator_t *this,
- loc_t *oldloc, loc_t *newloc);
+ loc_t *oldloc, loc_t *newloc, dict_t *xdata);
int32_t
afr_rename (call_frame_t *frame, xlator_t *this,
- loc_t *oldloc, loc_t *newloc);
+ loc_t *oldloc, loc_t *newloc, dict_t *xdata);
int
afr_symlink (call_frame_t *frame, xlator_t *this,
- const char *linkpath, loc_t *oldloc, dict_t *params);
-
-int32_t
-afr_setdents (call_frame_t *frame, xlator_t *this,
- fd_t *fd, int32_t flags, dir_entry_t *entries, int32_t count);
+ const char *linkpath, loc_t *oldloc, mode_t umask, dict_t *params);
#endif /* __DIR_WRITE_H__ */
diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c
index 41ffcb9..097bba1 100644
--- a/xlators/cluster/afr/src/afr-inode-read.c
+++ b/xlators/cluster/afr/src/afr-inode-read.c
@@ -58,7 +58,7 @@
int32_t
afr_access_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int32_t op_ret, int32_t op_errno)
+ xlator_t *this, int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -92,12 +92,13 @@ afr_access_cbk (call_frame_t *frame, void *cookie,
(void *) (long) read_child,
children[next_call_child],
children[next_call_child]->fops->access,
- &local->loc, local->cont.access.mask);
+ &local->loc, local->cont.access.mask,
+ NULL);
}
out:
if (unwind) {
- AFR_STACK_UNWIND (access, frame, op_ret, op_errno);
+ AFR_STACK_UNWIND (access, frame, op_ret, op_errno, xdata);
}
return 0;
@@ -105,7 +106,8 @@ out:
int32_t
-afr_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask)
+afr_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask,
+ dict_t *xdata)
{
afr_private_t *priv = NULL;
xlator_t **children = NULL;
@@ -156,12 +158,12 @@ afr_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask)
(void *) (long) call_child,
children[call_child],
children[call_child]->fops->access,
- loc, mask);
+ loc, mask, xdata);
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (access, frame, -1, op_errno);
+ AFR_STACK_UNWIND (access, frame, -1, op_errno, NULL);
return 0;
}
@@ -173,7 +175,7 @@ out:
int32_t
afr_stat_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- struct iatt *buf)
+ struct iatt *buf, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -207,12 +209,12 @@ afr_stat_cbk (call_frame_t *frame, void *cookie,
(void *) (long) read_child,
children[next_call_child],
children[next_call_child]->fops->stat,
- &local->loc);
+ &local->loc, NULL);
}
out:
if (unwind) {
- AFR_STACK_UNWIND (stat, frame, op_ret, op_errno, buf);
+ AFR_STACK_UNWIND (stat, frame, op_ret, op_errno, buf, xdata);
}
return 0;
@@ -220,7 +222,7 @@ out:
int32_t
-afr_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
+afr_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -267,12 +269,12 @@ afr_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
STACK_WIND_COOKIE (frame, afr_stat_cbk, (void *) (long) call_child,
children[call_child],
children[call_child]->fops->stat,
- loc);
+ loc, xdata);
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (stat, frame, -1, op_errno, NULL);
+ AFR_STACK_UNWIND (stat, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -284,7 +286,8 @@ out:
int32_t
afr_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct iatt *buf)
+ int32_t op_ret, int32_t op_errno, struct iatt *buf,
+ dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -318,12 +321,12 @@ afr_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
(void *) (long) read_child,
children[next_call_child],
children[next_call_child]->fops->fstat,
- local->fd);
+ local->fd, NULL);
}
out:
if (unwind) {
- AFR_STACK_UNWIND (fstat, frame, op_ret, op_errno, buf);
+ AFR_STACK_UNWIND (fstat, frame, op_ret, op_errno, buf, xdata);
}
return 0;
@@ -332,7 +335,7 @@ out:
int32_t
afr_fstat (call_frame_t *frame, xlator_t *this,
- fd_t *fd)
+ fd_t *fd, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -391,12 +394,12 @@ afr_fstat (call_frame_t *frame, xlator_t *this,
STACK_WIND_COOKIE (frame, afr_fstat_cbk, (void *) (long) call_child,
children[call_child],
children[call_child]->fops->fstat,
- fd);
+ fd, xdata);
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (fstat, frame, -1, op_errno, NULL);
+ AFR_STACK_UNWIND (fstat, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -408,7 +411,7 @@ out:
int32_t
afr_readlink_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- const char *buf, struct iatt *sbuf)
+ const char *buf, struct iatt *sbuf, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -442,12 +445,13 @@ afr_readlink_cbk (call_frame_t *frame, void *cookie,
children[next_call_child],
children[next_call_child]->fops->readlink,
&local->loc,
- local->cont.readlink.size);
+ local->cont.readlink.size, NULL);
}
out:
if (unwind) {
- AFR_STACK_UNWIND (readlink, frame, op_ret, op_errno, buf, sbuf);
+ AFR_STACK_UNWIND (readlink, frame, op_ret, op_errno, buf, sbuf,
+ xdata);
}
return 0;
@@ -456,7 +460,7 @@ out:
int32_t
afr_readlink (call_frame_t *frame, xlator_t *this,
- loc_t *loc, size_t size)
+ loc_t *loc, size_t size, dict_t *xdata)
{
afr_private_t *priv = NULL;
xlator_t **children = NULL;
@@ -506,12 +510,12 @@ afr_readlink (call_frame_t *frame, xlator_t *this,
(void *) (long) call_child,
children[call_child],
children[call_child]->fops->readlink,
- loc, size);
+ loc, size, xdata);
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (readlink, frame, -1, op_errno, NULL, NULL);
+ AFR_STACK_UNWIND (readlink, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
@@ -574,7 +578,7 @@ __filter_xattrs (dict_t *dict)
int32_t
afr_getxattr_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- dict_t *dict)
+ dict_t *dict, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -608,7 +612,8 @@ afr_getxattr_cbk (call_frame_t *frame, void *cookie,
children[next_call_child],
children[next_call_child]->fops->getxattr,
&local->loc,
- local->cont.getxattr.name);
+ local->cont.getxattr.name,
+ NULL);
}
out:
@@ -616,25 +621,25 @@ out:
if (op_ret >= 0 && dict)
__filter_xattrs (dict);
- AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict);
+ AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict, xdata);
}
return 0;
}
int32_t
-afr_getxattr_unwind (call_frame_t *frame,
- int op_ret, int op_errno, dict_t *dict)
+afr_getxattr_unwind (call_frame_t *frame, int op_ret, int op_errno,
+ dict_t *dict, dict_t *xdata)
{
- AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict);
+ AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict, xdata);
return 0;
}
int32_t
afr_getxattr_clrlk_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- dict_t *dict)
+ dict_t *dict, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -711,7 +716,7 @@ unlock:
local->child_errno[cky] = op_errno;
op_errno = afr_resultant_errno_get (NULL, local->child_errno,
priv->child_count);
- AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, xattr);
+ AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, xattr, xdata);
if (xattr)
dict_unref (xattr);
@@ -726,7 +731,7 @@ unlock:
int32_t
afr_getxattr_node_uuid_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- dict_t *dict)
+ dict_t *dict, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -759,12 +764,13 @@ afr_getxattr_node_uuid_cbk (call_frame_t *frame, void *cookie,
children[curr_call_child],
children[curr_call_child]->fops->getxattr,
&local->loc,
- local->cont.getxattr.name);
+ local->cont.getxattr.name,
+ NULL);
}
unwind:
if (unwind)
- AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict);
+ AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict, NULL);
return 0;
}
@@ -772,7 +778,7 @@ afr_getxattr_node_uuid_cbk (call_frame_t *frame, void *cookie,
int32_t
afr_getxattr_pathinfo_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- dict_t *dict)
+ dict_t *dict, dict_t *xdata)
{
afr_local_t *local = NULL;
int32_t callcnt = 0;
@@ -871,7 +877,8 @@ afr_getxattr_pathinfo_cbk (call_frame_t *frame, void *cookie,
" key in dict");
unwind:
- AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, nxattr);
+ AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, nxattr,
+ xdata);
if (nxattr)
dict_unref (nxattr);
@@ -924,14 +931,14 @@ afr_getxattr_frm_all_children (xlator_t *this, call_frame_t *frame,
STACK_WIND_COOKIE (frame, cbk,
(void *) (long) i,
children[i], children[i]->fops->getxattr,
- loc, name);
+ loc, name, NULL);
}
return;
}
int32_t
afr_getxattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, const char *name)
+ loc_t *loc, const char *name, dict_t *xdata)
{
afr_private_t *priv = NULL;
xlator_t **children = NULL;
@@ -963,22 +970,71 @@ afr_getxattr (call_frame_t *frame, xlator_t *this,
goto out;
loc_copy (&local->loc, loc);
- if (name)
- local->cont.getxattr.name = gf_strdup (name);
+ if (!name)
+ goto no_name;
+
+ local->cont.getxattr.name = gf_strdup (name);
+
+ if (!strncmp (name, AFR_XATTR_PREFIX,
+ strlen (AFR_XATTR_PREFIX))) {
+ gf_log (this->name, GF_LOG_INFO,
+ "%s: no data present for key %s",
+ loc->path, name);
+ op_errno = ENODATA;
+ goto out;
+ }
+ if ((strcmp (GF_XATTR_MARKER_KEY, name) == 0)
+ && (-1 == frame->root->pid)) {
+
+ local->marker.call_count = priv->child_count;
+
+ sub_volumes = alloca ( priv->child_count * sizeof (xlator_t *));
+ for (i = 0, trav = this->children; trav ;
+ trav = trav->next, i++) {
+
+ *(sub_volumes + i) = trav->xlator;
+ }
+ if (cluster_getmarkerattr (frame, this, loc, name,
+ local, afr_getxattr_unwind,
+ sub_volumes,
+ priv->child_count,
+ MARKER_UUID_TYPE,
+ priv->vol_uuid)) {
- if (name) {
- if (!strncmp (name, AFR_XATTR_PREFIX,
- strlen (AFR_XATTR_PREFIX))) {
gf_log (this->name, GF_LOG_INFO,
- "%s: no data present for key %s",
+ "%s: failed to get marker attr (%s)",
loc->path, name);
- op_errno = ENODATA;
+ op_errno = EINVAL;
goto out;
}
- if ((strcmp (GF_XATTR_MARKER_KEY, name) == 0)
- && (-1 == frame->root->pid)) {
+ return 0;
+ }
+
+ /*
+ * if we are doing getxattr with pathinfo as the key then we
+ * collect information from all childs
+ */
+ if (afr_is_special_xattr (name, &cbk)) {
+ afr_getxattr_frm_all_children (this, frame, name,
+ loc, cbk);
+ return 0;
+ }
+
+ if (XATTR_IS_NODE_UUID (name)) {
+ i = 0;
+ STACK_WIND_COOKIE (frame, afr_getxattr_node_uuid_cbk,
+ (void *) (long) i,
+ children[i],
+ children[i]->fops->getxattr,
+ loc, name, xdata);
+ return 0;
+ }
+
+ if (*priv->vol_uuid) {
+ if ((match_uuid_local (name, priv->vol_uuid) == 0)
+ && (-1 == frame->root->pid)) {
local->marker.call_count = priv->child_count;
sub_volumes = alloca ( priv->child_count * sizeof (xlator_t *));
@@ -986,15 +1042,16 @@ afr_getxattr (call_frame_t *frame, xlator_t *this,
trav = trav->next, i++) {
*(sub_volumes + i) = trav->xlator;
+
}
- if (cluster_getmarkerattr (frame, this, loc, name,
- local, afr_getxattr_unwind,
+ if (cluster_getmarkerattr (frame, this, loc,
+ name, local,
+ afr_getxattr_unwind,
sub_volumes,
priv->child_count,
- MARKER_UUID_TYPE,
+ MARKER_XTIME_TYPE,
priv->vol_uuid)) {
-
gf_log (this->name, GF_LOG_INFO,
"%s: failed to get marker attr (%s)",
loc->path, name);
@@ -1004,60 +1061,9 @@ afr_getxattr (call_frame_t *frame, xlator_t *this,
return 0;
}
-
- /*
- * if we are doing getxattr with pathinfo as the key then we
- * collect information from all childs
- */
- if (afr_is_special_xattr (name, &cbk)) {
- afr_getxattr_frm_all_children (this, frame, name,
- loc, cbk);
- return 0;
- }
-
- if (XATTR_IS_NODE_UUID (name)) {
- i = 0;
- STACK_WIND_COOKIE (frame, afr_getxattr_node_uuid_cbk,
- (void *) (long) i,
- children[i],
- children[i]->fops->getxattr,
- loc, name);
- return 0;
- }
-
- if (*priv->vol_uuid) {
- if ((match_uuid_local (name, priv->vol_uuid) == 0)
- && (-1 == frame->root->pid)) {
-
- local->marker.call_count = priv->child_count;
-
- sub_volumes = alloca ( priv->child_count * sizeof (xlator_t *));
- for (i = 0, trav = this->children; trav ;
- trav = trav->next, i++) {
-
- *(sub_volumes + i) = trav->xlator;
-
- }
-
- if (cluster_getmarkerattr (frame, this, loc,
- name, local,
- afr_getxattr_unwind,
- sub_volumes,
- priv->child_count,
- MARKER_XTIME_TYPE,
- priv->vol_uuid)) {
- gf_log (this->name, GF_LOG_INFO,
- "%s: failed to get marker attr (%s)",
- loc->path, name);
- op_errno = EINVAL;
- goto out;
- }
-
- return 0;
- }
- }
}
+no_name:
local->fresh_children = afr_children_create (priv->child_count);
if (!local->fresh_children) {
op_errno = ENOMEM;
@@ -1078,12 +1084,12 @@ afr_getxattr (call_frame_t *frame, xlator_t *this,
(void *) (long) call_child,
children[call_child],
children[call_child]->fops->getxattr,
- loc, name);
+ loc, name, xdata);
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (getxattr, frame, -1, op_errno, NULL);
+ AFR_STACK_UNWIND (getxattr, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -1093,7 +1099,7 @@ out:
int32_t
afr_fgetxattr_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- dict_t *dict)
+ dict_t *dict, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -1127,7 +1133,8 @@ afr_fgetxattr_cbk (call_frame_t *frame, void *cookie,
children[next_call_child],
children[next_call_child]->fops->fgetxattr,
local->fd,
- local->cont.getxattr.name);
+ local->cont.getxattr.name,
+ NULL);
}
out:
@@ -1135,7 +1142,8 @@ out:
if (op_ret >= 0 && dict)
__filter_xattrs (dict);
- AFR_STACK_UNWIND (fgetxattr, frame, op_ret, op_errno, dict);
+ AFR_STACK_UNWIND (fgetxattr, frame, op_ret, op_errno, dict,
+ xdata);
}
return 0;
@@ -1143,16 +1151,16 @@ out:
int32_t
afr_fgetxattr_unwind (call_frame_t *frame,
- int op_ret, int op_errno, dict_t *dict)
+ int op_ret, int op_errno, dict_t *dict, dict_t *xdata)
{
- AFR_STACK_UNWIND (fgetxattr, frame, op_ret, op_errno, dict);
+ AFR_STACK_UNWIND (fgetxattr, frame, op_ret, op_errno, dict, xdata);
return 0;
}
int32_t
afr_fgetxattr (call_frame_t *frame, xlator_t *this,
- fd_t *fd, const char *name)
+ fd_t *fd, const char *name, dict_t *xdata)
{
afr_private_t *priv = NULL;
xlator_t **children = NULL;
@@ -1208,12 +1216,12 @@ afr_fgetxattr (call_frame_t *frame, xlator_t *this,
(void *) (long) call_child,
children[call_child],
children[call_child]->fops->fgetxattr,
- fd, name);
+ fd, name, xdata);
op_ret = 0;
out:
if (op_ret == -1) {
- AFR_STACK_UNWIND (fgetxattr, frame, op_ret, op_errno, NULL);
+ AFR_STACK_UNWIND (fgetxattr, frame, op_ret, op_errno, NULL, NULL);
}
return 0;
}
@@ -1239,7 +1247,7 @@ int32_t
afr_readv_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
struct iovec *vector, int32_t count, struct iatt *buf,
- struct iobref *iobref)
+ struct iobref *iobref, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -1281,13 +1289,14 @@ afr_readv_cbk (call_frame_t *frame, void *cookie,
children[next_call_child]->fops->readv,
local->fd, local->cont.readv.size,
local->cont.readv.offset,
- local->cont.readv.flags);
+ local->cont.readv.flags,
+ NULL);
}
out:
if (unwind) {
AFR_STACK_UNWIND (readv, frame, op_ret, op_errno,
- vector, count, buf, iobref);
+ vector, count, buf, iobref, xdata);
}
return 0;
@@ -1296,7 +1305,7 @@ out:
int32_t
afr_readv (call_frame_t *frame, xlator_t *this,
- fd_t *fd, size_t size, off_t offset, uint32_t flags)
+ fd_t *fd, size_t size, off_t offset, uint32_t flags, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -1352,13 +1361,13 @@ afr_readv (call_frame_t *frame, xlator_t *this,
(void *) (long) call_child,
children[call_child],
children[call_child]->fops->readv,
- fd, size, offset, flags);
+ fd, size, offset, flags, xdata);
ret = 0;
out:
if (ret < 0) {
AFR_STACK_UNWIND (readv, frame, -1, op_errno, NULL, 0, NULL,
- NULL);
+ NULL, NULL);
}
return 0;
}
diff --git a/xlators/cluster/afr/src/afr-inode-read.h b/xlators/cluster/afr/src/afr-inode-read.h
index 5ec7411..fb04ec4 100644
--- a/xlators/cluster/afr/src/afr-inode-read.h
+++ b/xlators/cluster/afr/src/afr-inode-read.h
@@ -22,30 +22,30 @@
int32_t
afr_access (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int32_t mask);
+ loc_t *loc, int32_t mask, dict_t *xdata);
int32_t
afr_stat (call_frame_t *frame, xlator_t *this,
- loc_t *loc);
+ loc_t *loc, dict_t *xdata);
int32_t
afr_fstat (call_frame_t *frame, xlator_t *this,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
int32_t
afr_readlink (call_frame_t *frame, xlator_t *this,
- loc_t *loc, size_t size);
+ loc_t *loc, size_t size, dict_t *xdata);
int32_t
afr_readv (call_frame_t *frame, xlator_t *this,
- fd_t *fd, size_t size, off_t offset, uint32_t flags);
+ fd_t *fd, size_t size, off_t offset, uint32_t flags, dict_t *xdata);
int32_t
afr_getxattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, const char *name);
+ loc_t *loc, const char *name, dict_t *xdata);
int32_t
afr_fgetxattr (call_frame_t *frame, xlator_t *this,
- fd_t *fd, const char *name);
+ fd_t *fd, const char *name, dict_t *xdata);
#endif /* __INODE_READ_H__ */
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c
index 1d25949..368a68b 100644
--- a/xlators/cluster/afr/src/afr-inode-write.c
+++ b/xlators/cluster/afr/src/afr-inode-write.c
@@ -70,7 +70,8 @@ afr_writev_unwind (call_frame_t *frame, xlator_t *this)
AFR_STACK_UNWIND (writev, main_frame,
local->op_ret, local->op_errno,
&local->cont.writev.prebuf,
- &local->cont.writev.postbuf);
+ &local->cont.writev.postbuf,
+ NULL);
}
return 0;
}
@@ -79,7 +80,7 @@ afr_writev_unwind (call_frame_t *frame, xlator_t *this)
int
afr_writev_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
afr_local_t * local = NULL;
int child_index = (long) cookie;
@@ -158,7 +159,8 @@ afr_writev_wind (call_frame_t *frame, xlator_t *this)
local->cont.writev.count,
local->cont.writev.offset,
local->cont.writev.flags,
- local->cont.writev.iobref);
+ local->cont.writev.iobref,
+ NULL);
if (!--call_count)
break;
@@ -231,7 +233,7 @@ out:
if (op_ret == -1) {
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (writev, frame, op_ret, op_errno, NULL, NULL);
+ AFR_STACK_UNWIND (writev, frame, op_ret, op_errno, NULL, NULL, NULL);
}
return 0;
@@ -442,7 +444,7 @@ out:
int
afr_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
struct iovec *vector, int32_t count, off_t offset,
- uint32_t flags, struct iobref *iobref)
+ uint32_t flags, struct iobref *iobref, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -482,7 +484,7 @@ afr_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (writev, frame, -1, op_errno, NULL, NULL);
+ AFR_STACK_UNWIND (writev, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
@@ -512,7 +514,8 @@ afr_truncate_unwind (call_frame_t *frame, xlator_t *this)
AFR_STACK_UNWIND (truncate, main_frame, local->op_ret,
local->op_errno,
&local->cont.truncate.prebuf,
- &local->cont.truncate.postbuf);
+ &local->cont.truncate.postbuf,
+ NULL);
}
return 0;
@@ -522,7 +525,7 @@ afr_truncate_unwind (call_frame_t *frame, xlator_t *this)
int
afr_truncate_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
@@ -609,7 +612,8 @@ afr_truncate_wind (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->truncate,
&local->loc,
- local->cont.truncate.offset);
+ local->cont.truncate.offset,
+ NULL);
if (!--call_count)
break;
@@ -637,7 +641,7 @@ afr_truncate_done (call_frame_t *frame, xlator_t *this)
int
afr_truncate (call_frame_t *frame, xlator_t *this,
- loc_t *loc, off_t offset)
+ loc_t *loc, off_t offset, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -685,7 +689,7 @@ out:
if (ret < 0) {
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (truncate, frame, -1, op_errno, NULL, NULL);
+ AFR_STACK_UNWIND (truncate, frame, -1, op_errno, NULL, NULL, NULL);
}
return 0;
@@ -717,7 +721,8 @@ afr_ftruncate_unwind (call_frame_t *frame, xlator_t *this)
AFR_STACK_UNWIND (ftruncate, main_frame, local->op_ret,
local->op_errno,
&local->cont.ftruncate.prebuf,
- &local->cont.ftruncate.postbuf);
+ &local->cont.ftruncate.postbuf,
+ NULL);
}
return 0;
}
@@ -726,7 +731,7 @@ afr_ftruncate_unwind (call_frame_t *frame, xlator_t *this)
int
afr_ftruncate_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
@@ -812,7 +817,9 @@ afr_ftruncate_wind (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->ftruncate,
- local->fd, local->cont.ftruncate.offset);
+ local->fd,
+ local->cont.ftruncate.offset,
+ NULL);
if (!--call_count)
break;
@@ -874,7 +881,8 @@ out:
if (op_ret == -1) {
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (ftruncate, frame, op_ret, op_errno, NULL, NULL);
+ AFR_STACK_UNWIND (ftruncate, frame, op_ret, op_errno, NULL,
+ NULL, NULL);
}
return 0;
@@ -883,7 +891,7 @@ out:
int
afr_ftruncate (call_frame_t *frame, xlator_t *this,
- fd_t *fd, off_t offset)
+ fd_t *fd, off_t offset, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -922,7 +930,7 @@ out:
if (ret < 0) {
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (ftruncate, frame, -1, op_errno, NULL, NULL);
+ AFR_STACK_UNWIND (ftruncate, frame, -1, op_errno, NULL, NULL, NULL);
}
return 0;
@@ -952,7 +960,8 @@ afr_setattr_unwind (call_frame_t *frame, xlator_t *this)
AFR_STACK_UNWIND (setattr, main_frame, local->op_ret,
local->op_errno,
&local->cont.setattr.preop_buf,
- &local->cont.setattr.postop_buf);
+ &local->cont.setattr.postop_buf,
+ NULL);
}
return 0;
@@ -962,7 +971,7 @@ afr_setattr_unwind (call_frame_t *frame, xlator_t *this)
int
afr_setattr_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
- struct iatt *preop, struct iatt *postop)
+ struct iatt *preop, struct iatt *postop, dict_t *xdata)
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
@@ -1050,7 +1059,8 @@ afr_setattr_wind (call_frame_t *frame, xlator_t *this)
priv->children[i]->fops->setattr,
&local->loc,
&local->cont.setattr.in_buf,
- local->cont.setattr.valid);
+ local->cont.setattr.valid,
+ NULL);
if (!--call_count)
break;
@@ -1078,7 +1088,7 @@ afr_setattr_done (call_frame_t *frame, xlator_t *this)
int
afr_setattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, struct iatt *buf, int32_t valid)
+ loc_t *loc, struct iatt *buf, int32_t valid, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -1127,7 +1137,7 @@ out:
if (ret < 0) {
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (setattr, frame, -1, op_errno, NULL, NULL);
+ AFR_STACK_UNWIND (setattr, frame, -1, op_errno, NULL, NULL, NULL);
}
return 0;
@@ -1155,7 +1165,8 @@ afr_fsetattr_unwind (call_frame_t *frame, xlator_t *this)
AFR_STACK_UNWIND (fsetattr, main_frame, local->op_ret,
local->op_errno,
&local->cont.fsetattr.preop_buf,
- &local->cont.fsetattr.postop_buf);
+ &local->cont.fsetattr.postop_buf,
+ NULL);
}
return 0;
@@ -1165,7 +1176,7 @@ afr_fsetattr_unwind (call_frame_t *frame, xlator_t *this)
int
afr_fsetattr_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
- struct iatt *preop, struct iatt *postop)
+ struct iatt *preop, struct iatt *postop, dict_t *xdata)
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
@@ -1253,7 +1264,8 @@ afr_fsetattr_wind (call_frame_t *frame, xlator_t *this)
priv->children[i]->fops->fsetattr,
local->fd,
&local->cont.fsetattr.in_buf,
- local->cont.fsetattr.valid);
+ local->cont.fsetattr.valid,
+ NULL);
if (!--call_count)
break;
@@ -1280,7 +1292,7 @@ afr_fsetattr_done (call_frame_t *frame, xlator_t *this)
int
afr_fsetattr (call_frame_t *frame, xlator_t *this,
- fd_t *fd, struct iatt *buf, int32_t valid)
+ fd_t *fd, struct iatt *buf, int32_t valid, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -1335,7 +1347,7 @@ out:
if (ret < 0) {
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (fsetattr, frame, -1, op_errno, NULL, NULL);
+ AFR_STACK_UNWIND (fsetattr, frame, -1, op_errno, NULL, NULL, NULL);
}
return 0;
@@ -1363,7 +1375,8 @@ afr_setxattr_unwind (call_frame_t *frame, xlator_t *this)
if (main_frame) {
AFR_STACK_UNWIND (setxattr, main_frame,
- local->op_ret, local->op_errno);
+ local->op_ret, local->op_errno,
+ NULL);
}
return 0;
}
@@ -1371,7 +1384,7 @@ afr_setxattr_unwind (call_frame_t *frame, xlator_t *this)
int
afr_setxattr_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -1440,7 +1453,8 @@ afr_setxattr_wind (call_frame_t *frame, xlator_t *this)
priv->children[i]->fops->setxattr,
&local->loc,
local->cont.setxattr.dict,
- local->cont.setxattr.flags);
+ local->cont.setxattr.flags,
+ NULL);
if (!--call_count)
break;
@@ -1465,7 +1479,7 @@ afr_setxattr_done (call_frame_t *frame, xlator_t *this)
int
afr_setxattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, dict_t *dict, int32_t flags)
+ loc_t *loc, dict_t *dict, int32_t flags, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -1521,7 +1535,7 @@ out:
if (ret < 0) {
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (setxattr, frame, -1, op_errno);
+ AFR_STACK_UNWIND (setxattr, frame, -1, op_errno, NULL);
}
return 0;
@@ -1548,7 +1562,8 @@ afr_fsetxattr_unwind (call_frame_t *frame, xlator_t *this)
if (main_frame) {
AFR_STACK_UNWIND (fsetxattr, main_frame,
- local->op_ret, local->op_errno);
+ local->op_ret, local->op_errno,
+ NULL);
}
return 0;
}
@@ -1556,7 +1571,7 @@ afr_fsetxattr_unwind (call_frame_t *frame, xlator_t *this)
int
afr_fsetxattr_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -1625,7 +1640,8 @@ afr_fsetxattr_wind (call_frame_t *frame, xlator_t *this)
priv->children[i]->fops->fsetxattr,
local->fd,
local->cont.fsetxattr.dict,
- local->cont.fsetxattr.flags);
+ local->cont.fsetxattr.flags,
+ NULL);
if (!--call_count)
break;
@@ -1650,7 +1666,7 @@ afr_fsetxattr_done (call_frame_t *frame, xlator_t *this)
int
afr_fsetxattr (call_frame_t *frame, xlator_t *this,
- fd_t *fd, dict_t *dict, int32_t flags)
+ fd_t *fd, dict_t *dict, int32_t flags, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -1711,7 +1727,7 @@ out:
if (ret < 0) {
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (fsetxattr, frame, -1, op_errno);
+ AFR_STACK_UNWIND (fsetxattr, frame, -1, op_errno, NULL);
}
return 0;
@@ -1741,7 +1757,8 @@ afr_removexattr_unwind (call_frame_t *frame, xlator_t *this)
if (main_frame) {
AFR_STACK_UNWIND (removexattr, main_frame,
- local->op_ret, local->op_errno);
+ local->op_ret, local->op_errno,
+ NULL);
}
return 0;
}
@@ -1749,7 +1766,7 @@ afr_removexattr_unwind (call_frame_t *frame, xlator_t *this)
int
afr_removexattr_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
@@ -1817,7 +1834,8 @@ afr_removexattr_wind (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->removexattr,
&local->loc,
- local->cont.removexattr.name);
+ local->cont.removexattr.name,
+ NULL);
if (!--call_count)
break;
@@ -1843,7 +1861,7 @@ afr_removexattr_done (call_frame_t *frame, xlator_t *this)
int
afr_removexattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, const char *name)
+ loc_t *loc, const char *name, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -1899,7 +1917,7 @@ out:
if (ret < 0) {
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (removexattr, frame, -1, op_errno);
+ AFR_STACK_UNWIND (removexattr, frame, -1, op_errno, NULL);
}
return 0;
@@ -1924,7 +1942,8 @@ afr_fremovexattr_unwind (call_frame_t *frame, xlator_t *this)
if (main_frame) {
AFR_STACK_UNWIND (fremovexattr, main_frame,
- local->op_ret, local->op_errno);
+ local->op_ret, local->op_errno,
+ NULL);
}
return 0;
}
@@ -1932,7 +1951,7 @@ afr_fremovexattr_unwind (call_frame_t *frame, xlator_t *this)
int
afr_fremovexattr_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
@@ -2000,7 +2019,8 @@ afr_fremovexattr_wind (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->fremovexattr,
local->fd,
- local->cont.removexattr.name);
+ local->cont.removexattr.name,
+ NULL);
if (!--call_count)
break;
@@ -2026,7 +2046,7 @@ afr_fremovexattr_done (call_frame_t *frame, xlator_t *this)
int
afr_fremovexattr (call_frame_t *frame, xlator_t *this,
- fd_t *fd, const char *name)
+ fd_t *fd, const char *name, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -2086,7 +2106,7 @@ out:
if (op_ret == -1) {
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (fremovexattr, frame, op_ret, op_errno);
+ AFR_STACK_UNWIND (fremovexattr, frame, op_ret, op_errno, NULL);
}
return 0;
diff --git a/xlators/cluster/afr/src/afr-inode-write.h b/xlators/cluster/afr/src/afr-inode-write.h
index 729a490..437ee68 100644
--- a/xlators/cluster/afr/src/afr-inode-write.h
+++ b/xlators/cluster/afr/src/afr-inode-write.h
@@ -22,59 +22,59 @@
int32_t
afr_chmod (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode);
+ loc_t *loc, mode_t mode, dict_t *xdata);
int32_t
afr_chown (call_frame_t *frame, xlator_t *this,
- loc_t *loc, uid_t uid, gid_t gid);
+ loc_t *loc, uid_t uid, gid_t gid, dict_t *xdata);
int
afr_fchown (call_frame_t *frame, xlator_t *this,
- fd_t *fd, uid_t uid, gid_t gid);
+ fd_t *fd, uid_t uid, gid_t gid, dict_t *xdata);
int32_t
afr_fchmod (call_frame_t *frame, xlator_t *this,
- fd_t *fd, mode_t mode);
+ fd_t *fd, mode_t mode, dict_t *xdata);
int32_t
afr_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
struct iovec *vector, int32_t count, off_t offset,
- uint32_t flags, struct iobref *iobref);
+ uint32_t flags, struct iobref *iobref, dict_t *xdata);
int32_t
afr_truncate (call_frame_t *frame, xlator_t *this,
- loc_t *loc, off_t offset);
+ loc_t *loc, off_t offset, dict_t *xdata);
int32_t
afr_ftruncate (call_frame_t *frame, xlator_t *this,
- fd_t *fd, off_t offset);
+ fd_t *fd, off_t offset, dict_t *xdata);
int32_t
afr_utimens (call_frame_t *frame, xlator_t *this,
- loc_t *loc, struct timespec tv[2]);
+ loc_t *loc, struct timespec tv[2], dict_t *xdata);
int
afr_setattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, struct iatt *buf, int32_t valid);
+ loc_t *loc, struct iatt *buf, int32_t valid, dict_t *xdata);
int
afr_fsetattr (call_frame_t *frame, xlator_t *this,
- fd_t *fd, struct iatt *buf, int32_t valid);
+ fd_t *fd, struct iatt *buf, int32_t valid, dict_t *xdata);
int32_t
afr_setxattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, dict_t *dict, int32_t flags);
+ loc_t *loc, dict_t *dict, int32_t flags, dict_t *xdata);
int32_t
afr_fsetxattr (call_frame_t *frame, xlator_t *this,
- fd_t *fd, dict_t *dict, int32_t flags);
+ fd_t *fd, dict_t *dict, int32_t flags, dict_t *xdata);
int32_t
afr_removexattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, const char *name);
+ loc_t *loc, const char *name, dict_t *xdata);
int32_t
afr_fremovexattr (call_frame_t *frame, xlator_t *this,
- fd_t *fd, const char *name);
+ fd_t *fd, const char *name, dict_t *xdata);
#endif /* __INODE_WRITE_H__ */
diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c
index 55dd60e..dfdde29 100644
--- a/xlators/cluster/afr/src/afr-lk-common.c
+++ b/xlators/cluster/afr/src/afr-lk-common.c
@@ -527,7 +527,7 @@ afr_locked_nodes_count (unsigned char *locked_nodes, int child_count)
/* FIXME: What if UNLOCK fails */
static int32_t
afr_unlock_common_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_internal_lock_t *int_lock = NULL;
@@ -553,7 +553,7 @@ afr_unlock_common_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
static int32_t
afr_unlock_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_internal_lock_t *int_lock = NULL;
@@ -577,7 +577,7 @@ afr_unlock_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (local->transaction.eager_lock)
local->transaction.eager_lock[child_index] = 0;
- afr_unlock_common_cbk (frame, cookie, this, op_ret, op_errno);
+ afr_unlock_common_cbk (frame, cookie, this, op_ret, op_errno, xdata);
return 0;
@@ -654,7 +654,7 @@ afr_unlock_inodelk (call_frame_t *frame, xlator_t *this)
if (piggyback) {
afr_unlock_inodelk_cbk (frame, (void *) (long) i,
- this, 1, 0);
+ this, 1, 0, NULL);
if (!--call_count)
break;
continue;
@@ -676,7 +676,7 @@ afr_unlock_inodelk (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->finodelk,
this->name, local->fd,
- F_SETLK, flock_use);
+ F_SETLK, flock_use, NULL);
if (!--call_count)
break;
@@ -691,7 +691,7 @@ afr_unlock_inodelk (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->inodelk,
this->name, &local->loc,
- F_SETLK, &flock);
+ F_SETLK, &flock, NULL);
if (!--call_count)
break;
@@ -703,7 +703,7 @@ out:
static int32_t
afr_unlock_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t *local = NULL;
int32_t child_index = (long)cookie;
@@ -720,7 +720,7 @@ afr_unlock_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local->loc.path, child_index, strerror (op_errno));
}
- afr_unlock_common_cbk (frame, cookie, this, op_ret, op_errno);
+ afr_unlock_common_cbk (frame, cookie, this, op_ret, op_errno, NULL);
return 0;
}
@@ -767,7 +767,7 @@ afr_unlock_entrylk (call_frame_t *frame, xlator_t *this)
priv->children[i]->fops->entrylk,
this->name,
loc, basename,
- ENTRYLK_UNLOCK, ENTRYLK_WRLCK);
+ ENTRYLK_UNLOCK, ENTRYLK_WRLCK, NULL);
if (!--call_count)
break;
@@ -781,7 +781,7 @@ out:
static int32_t
afr_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
@@ -824,20 +824,20 @@ afr_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
static int32_t
afr_blocking_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
AFR_TRACE_INODELK_OUT (frame, this, AFR_INODELK_TRANSACTION,
AFR_LOCK_OP, NULL, op_ret,
op_errno, (long) cookie);
- afr_lock_cbk (frame, cookie, this, op_ret, op_errno);
+ afr_lock_cbk (frame, cookie, this, op_ret, op_errno, xdata);
return 0;
}
static int32_t
afr_lock_lower_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_internal_lock_t *int_lock = NULL;
afr_private_t *priv = NULL;
@@ -901,7 +901,7 @@ afr_lock_lower_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
priv->children[child_index],
priv->children[child_index]->fops->entrylk,
this->name, higher, higher_name,
- ENTRYLK_LOCK, ENTRYLK_WRLCK);
+ ENTRYLK_LOCK, ENTRYLK_WRLCK, NULL);
out:
return 0;
@@ -909,13 +909,13 @@ out:
static int32_t
afr_blocking_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
AFR_TRACE_ENTRYLK_OUT (frame, this, AFR_ENTRYLK_TRANSACTION,
AFR_LOCK_OP, NULL, op_ret,
op_errno, (long)cookie);
- afr_lock_cbk (frame, cookie, this, op_ret, op_errno);
+ afr_lock_cbk (frame, cookie, this, op_ret, op_errno, xdata);
return 0;
}
@@ -1052,7 +1052,7 @@ afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index)
priv->children[child_index],
priv->children[child_index]->fops->finodelk,
this->name, local->fd,
- F_SETLKW, &flock);
+ F_SETLKW, &flock, NULL);
} else {
AFR_TRACE_INODELK_IN (frame, this,
@@ -1065,7 +1065,7 @@ afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index)
priv->children[child_index],
priv->children[child_index]->fops->inodelk,
this->name, &local->loc,
- F_SETLKW, &flock);
+ F_SETLKW, &flock, NULL);
}
break;
@@ -1090,7 +1090,7 @@ afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index)
priv->children[child_index],
priv->children[child_index]->fops->entrylk,
this->name, lower, lower_name,
- ENTRYLK_LOCK, ENTRYLK_WRLCK);
+ ENTRYLK_LOCK, ENTRYLK_WRLCK, NULL);
break;
}
@@ -1108,7 +1108,7 @@ afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index)
priv->children[child_index]->fops->fentrylk,
this->name, local->fd,
local->transaction.basename,
- ENTRYLK_LOCK, ENTRYLK_WRLCK);
+ ENTRYLK_LOCK, ENTRYLK_WRLCK, NULL);
} else {
AFR_TRACE_ENTRYLK_IN (frame, this,
AFR_ENTRYLK_TRANSACTION,
@@ -1122,7 +1122,7 @@ afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index)
this->name,
&local->transaction.parent_loc,
local->transaction.basename,
- ENTRYLK_LOCK, ENTRYLK_WRLCK);
+ ENTRYLK_LOCK, ENTRYLK_WRLCK, NULL);
}
break;
@@ -1166,7 +1166,7 @@ afr_blocking_lock (call_frame_t *frame, xlator_t *this)
static int32_t
afr_nonblocking_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
@@ -1305,7 +1305,8 @@ afr_nonblocking_entrylk (call_frame_t *frame, xlator_t *this)
priv->children[i]->fops->fentrylk,
this->name, local->fd,
basename,
- ENTRYLK_LOCK_NB, ENTRYLK_WRLCK);
+ ENTRYLK_LOCK_NB, ENTRYLK_WRLCK,
+ NULL);
}
}
} else {
@@ -1326,7 +1327,8 @@ afr_nonblocking_entrylk (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->entrylk,
this->name, loc, basename,
- ENTRYLK_LOCK_NB, ENTRYLK_WRLCK);
+ ENTRYLK_LOCK_NB, ENTRYLK_WRLCK,
+ NULL);
if (!--call_count)
break;
@@ -1340,7 +1342,7 @@ out:
int32_t
afr_nonblocking_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
@@ -1509,7 +1511,7 @@ afr_nonblocking_inodelk (call_frame_t *frame, xlator_t *this)
if (piggyback) {
/* (op_ret == 1) => indicate piggybacked lock */
afr_nonblocking_inodelk_cbk (frame, (void *) (long) i,
- this, 1, 0);
+ this, 1, 0, NULL);
if (!--call_count)
break;
continue;
@@ -1529,7 +1531,7 @@ afr_nonblocking_inodelk (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->finodelk,
this->name, local->fd,
- F_SETLK, flock_use);
+ F_SETLK, flock_use, NULL);
if (!--call_count)
break;
@@ -1551,7 +1553,7 @@ afr_nonblocking_inodelk (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->inodelk,
this->name, &local->loc,
- F_SETLK, &flock);
+ F_SETLK, &flock, NULL);
if (!--call_count)
break;
@@ -1646,7 +1648,7 @@ afr_unlock_lower_entrylk (call_frame_t *frame, xlator_t *this)
priv->children[i]->fops->entrylk,
this->name,
loc, basename,
- ENTRYLK_UNLOCK, ENTRYLK_WRLCK);
+ ENTRYLK_UNLOCK, ENTRYLK_WRLCK, NULL);
if (!--call_count)
break;
@@ -1939,10 +1941,12 @@ out:
int32_t
afr_get_locks_fd_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct gf_flock *lock);
+ int32_t op_ret, int32_t op_errno, struct gf_flock *lock,
+ dict_t *xdata);
int32_t
afr_recover_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct gf_flock *lock)
+ int32_t op_ret, int32_t op_errno, struct gf_flock *lock,
+ dict_t *xdata)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -1966,7 +1970,7 @@ afr_recover_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
(void *) (long) source_child,
priv->children[source_child],
priv->children[source_child]->fops->lk,
- local->fd, F_GETLK_FD, &flock);
+ local->fd, F_GETLK_FD, &flock, NULL);
return 0;
@@ -1994,7 +1998,7 @@ afr_recover_lock (call_frame_t *frame, xlator_t *this,
(void *) (long) lock_recovery_child,
priv->children[lock_recovery_child],
priv->children[lock_recovery_child]->fops->lk,
- local->fd, F_SETLK, flock);
+ local->fd, F_SETLK, flock, NULL);
return 0;
}
@@ -2012,7 +2016,8 @@ is_afr_lock_eol (struct gf_flock *lock)
int32_t
afr_get_locks_fd_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct gf_flock *lock)
+ int32_t op_ret, int32_t op_errno, struct gf_flock *lock,
+ dict_t *xdata)
{
if (op_ret) {
gf_log (this->name, GF_LOG_INFO,
@@ -2072,7 +2077,7 @@ afr_lock_recovery (call_frame_t *frame, xlator_t *this)
(void *) (long) source_child,
priv->children[source_child],
priv->children[source_child]->fops->lk,
- local->fd, F_GETLK_FD, &flock);
+ local->fd, F_GETLK_FD, &flock, NULL);
out:
return ret;
@@ -2100,7 +2105,8 @@ out:
int32_t
afr_lock_recovery_preopen_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, fd_t *fd)
+ int32_t op_ret, int32_t op_errno, fd_t *fd,
+ dict_t *xdata)
{
int32_t child_index = (long )cookie;
int ret = 0;
@@ -2172,8 +2178,7 @@ afr_lock_recovery_preopen (call_frame_t *frame, xlator_t *this)
(void *)(long) child_index,
priv->children[child_index],
priv->children[child_index]->fops->open,
- &loc, fdctx->flags, local->fd,
- fdctx->wbflags);
+ &loc, fdctx->flags, local->fd, NULL);
return 0;
}
diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c
index a203a36..370d50e 100644
--- a/xlators/cluster/afr/src/afr-open.c
+++ b/xlators/cluster/afr/src/afr-open.c
@@ -123,7 +123,7 @@ out:
int
afr_open_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
afr_local_t * local = frame->local;
afr_private_t *priv = NULL;
@@ -132,7 +132,7 @@ afr_open_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (afr_open_only_data_self_heal (priv->data_self_heal))
afr_perform_data_self_heal (frame, this);
AFR_STACK_UNWIND (open, frame, local->op_ret, local->op_errno,
- local->fd);
+ local->fd, xdata);
return 0;
}
@@ -140,7 +140,7 @@ afr_open_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
afr_open_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- fd_t *fd)
+ fd_t *fd, dict_t *xdata)
{
afr_local_t * local = NULL;
int ret = 0;
@@ -162,8 +162,7 @@ afr_open_cbk (call_frame_t *frame, void *cookie,
local->success_count++;
ret = afr_child_fd_ctx_set (this, fd, child_index,
- local->cont.open.flags,
- local->cont.open.wbflags);
+ local->cont.open.flags);
if (ret) {
local->op_ret = -1;
local->op_errno = -ret;
@@ -181,12 +180,12 @@ unlock:
&& (local->op_ret >= 0)) {
STACK_WIND (frame, afr_open_ftruncate_cbk,
this, this->fops->ftruncate,
- fd, 0);
+ fd, 0, NULL);
} else {
if (afr_open_only_data_self_heal (priv->data_self_heal))
afr_perform_data_self_heal (frame, this);
AFR_STACK_UNWIND (open, frame, local->op_ret,
- local->op_errno, local->fd);
+ local->op_errno, local->fd, xdata);
}
}
@@ -195,7 +194,7 @@ unlock:
int
afr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
- fd_t *fd, int32_t wbflags)
+ fd_t *fd, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -236,7 +235,6 @@ afr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
loc_copy (&local->loc, loc);
local->cont.open.flags = flags;
- local->cont.open.wbflags = wbflags;
local->fd = fd_ref (fd);
@@ -245,7 +243,7 @@ afr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
STACK_WIND_COOKIE (frame, afr_open_cbk, (void *) (long) i,
priv->children[i],
priv->children[i]->fops->open,
- loc, wind_flags, fd, wbflags);
+ loc, wind_flags, fd, xdata);
if (!--call_count)
break;
@@ -255,7 +253,7 @@ afr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (open, frame, -1, op_errno, fd);
+ AFR_STACK_UNWIND (open, frame, -1, op_errno, fd, xdata);
return 0;
}
@@ -308,7 +306,7 @@ afr_resume_calls (xlator_t *this, struct list_head *list)
int
afr_openfd_fix_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, fd_t *fd)
+ int32_t op_ret, int32_t op_errno, fd_t *fd, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -429,7 +427,8 @@ afr_fix_open (call_frame_t *frame, xlator_t *this, afr_fd_ctx_t *fd_ctx,
(void*) (long) i,
priv->children[i],
priv->children[i]->fops->opendir,
- &open_local->loc, open_local->fd);
+ &open_local->loc, open_local->fd,
+ NULL);
} else {
gf_log (this->name, GF_LOG_DEBUG,
"opening fd for file %s on subvolume %s",
@@ -440,7 +439,7 @@ afr_fix_open (call_frame_t *frame, xlator_t *this, afr_fd_ctx_t *fd_ctx,
priv->children[i],
priv->children[i]->fops->open,
&open_local->loc, fd_ctx->flags,
- open_local->fd, fd_ctx->wbflags);
+ open_local->fd, NULL);
}
}
diff --git a/xlators/cluster/afr/src/afr-self-heal-algorithm.c b/xlators/cluster/afr/src/afr-self-heal-algorithm.c
index 629822a..bf78733 100644
--- a/xlators/cluster/afr/src/afr-self-heal-algorithm.c
+++ b/xlators/cluster/afr/src/afr-self-heal-algorithm.c
@@ -410,7 +410,7 @@ sh_loop_return (call_frame_t *sh_frame, xlator_t *this, call_frame_t *loop_frame
static int
sh_loop_write_cbk (call_frame_t *loop_frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *buf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * loop_local = NULL;
@@ -461,7 +461,7 @@ static int
sh_loop_read_cbk (call_frame_t *loop_frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
struct iovec *vector, int32_t count, struct iatt *buf,
- struct iobref *iobref)
+ struct iobref *iobref, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * loop_local = NULL;
@@ -519,7 +519,7 @@ sh_loop_read_cbk (call_frame_t *loop_frame, void *cookie,
priv->children[i],
priv->children[i]->fops->writev,
loop_sh->healing_fd, vector, count,
- loop_sh->offset, 0, iobref);
+ loop_sh->offset, 0, iobref, NULL);
if (!--call_count)
break;
@@ -546,7 +546,7 @@ sh_loop_read (call_frame_t *loop_frame, xlator_t *this)
priv->children[loop_sh->source],
priv->children[loop_sh->source]->fops->readv,
loop_sh->healing_fd, loop_sh->block_size,
- loop_sh->offset, 0);
+ loop_sh->offset, 0, NULL);
return 0;
}
@@ -555,7 +555,8 @@ sh_loop_read (call_frame_t *loop_frame, xlator_t *this)
static int
sh_diff_checksum_cbk (call_frame_t *loop_frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
- uint32_t weak_checksum, uint8_t *strong_checksum)
+ uint32_t weak_checksum, uint8_t *strong_checksum,
+ dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *loop_local = NULL;
@@ -658,7 +659,7 @@ sh_diff_checksum (call_frame_t *loop_frame, xlator_t *this)
priv->children[loop_sh->source],
priv->children[loop_sh->source]->fops->rchecksum,
loop_sh->healing_fd,
- loop_sh->offset, loop_sh->block_size);
+ loop_sh->offset, loop_sh->block_size, NULL);
for (i = 0; i < priv->child_count; i++) {
if (loop_sh->sources[i] || !loop_local->child_up[i])
@@ -669,7 +670,7 @@ sh_diff_checksum (call_frame_t *loop_frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->rchecksum,
loop_sh->healing_fd,
- loop_sh->offset, loop_sh->block_size);
+ loop_sh->offset, loop_sh->block_size, NULL);
if (!--call_count)
break;
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index f9958e7..441d5d1 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -1422,7 +1422,8 @@ afr_sh_purge_stale_entries_done (call_frame_t *frame, xlator_t *this)
afr_sh_missing_entries_lookup_done,
sh->sh_gfid_req,
AFR_LOOKUP_FAIL_CONFLICTS|
- AFR_LOOKUP_FAIL_MISSING_GFIDS);
+ AFR_LOOKUP_FAIL_MISSING_GFIDS,
+ NULL);
} else {
//No need to set gfid so goto missing entries lookup done
//Behave as if you have done the lookup
@@ -1711,7 +1712,8 @@ afr_sh_find_fresh_parents (call_frame_t *frame, xlator_t *this,
afr_get_fresh_children (sh->success_children, sh->sources,
sh->fresh_parent_dirs, priv->child_count);
afr_sh_common_lookup (frame, this, &local->loc,
- afr_sh_children_lookup_done, NULL, 0);
+ afr_sh_children_lookup_done, NULL, 0,
+ NULL);
return;
out:
@@ -1745,7 +1747,7 @@ afr_sh_common_reset (afr_self_heal_t *sh, unsigned int child_count)
int
afr_sh_common_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
afr_lookup_done_cbk_t lookup_done , uuid_t gfid,
- int32_t flags)
+ int32_t flags, dict_t *xdata)
{
afr_local_t *local = NULL;
int i = 0;
@@ -1827,7 +1829,8 @@ afr_sh_post_nb_entrylk_conflicting_sh_cbk (call_frame_t *frame, xlator_t *this)
"Non blocking entrylks done. Proceeding to FOP");
afr_sh_common_lookup (frame, this, &sh->parent_loc,
afr_sh_find_fresh_parents,
- NULL, AFR_LOOKUP_FAIL_CONFLICTS);
+ NULL, AFR_LOOKUP_FAIL_CONFLICTS,
+ NULL);
}
return 0;
@@ -1854,7 +1857,8 @@ afr_sh_post_nb_entrylk_gfid_sh_cbk (call_frame_t *frame, xlator_t *this)
afr_sh_common_lookup (frame, this, &local->loc,
afr_sh_missing_entries_lookup_done,
sh->sh_gfid_req, AFR_LOOKUP_FAIL_CONFLICTS|
- AFR_LOOKUP_FAIL_MISSING_GFIDS);
+ AFR_LOOKUP_FAIL_MISSING_GFIDS,
+ NULL);
}
return 0;
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.h b/xlators/cluster/afr/src/afr-self-heal-common.h
index 24cac62..2979966 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.h
+++ b/xlators/cluster/afr/src/afr-self-heal-common.h
@@ -90,7 +90,7 @@ afr_sh_common_lookup_resp_handler (call_frame_t *frame, void *cookie,
int
afr_sh_common_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
afr_lookup_done_cbk_t lookup_cbk, uuid_t uuid,
- int32_t flags);
+ int32_t flags, dict_t *xdata);
int
afr_sh_entry_expunge_remove (call_frame_t *expunge_frame, xlator_t *this,
int active_src, struct iatt *buf,
@@ -118,7 +118,7 @@ afr_sh_mark_source_sinks (call_frame_t *frame, xlator_t *this);
typedef int
(*afr_fxattrop_cbk_t) (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- dict_t *xattr);
+ dict_t *xattr, dict_t *xdata);
int
afr_build_child_loc (xlator_t *this, loc_t *child, loc_t *parent, char *name);
int
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 765edd2..1c687a4 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -69,7 +69,7 @@ afr_sh_data_fxattrop (call_frame_t *frame, xlator_t *this,
int
afr_post_sh_data_fxattrop_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- dict_t *xattr);
+ dict_t *xattr, dict_t *xdata);
int
afr_sh_data_done (call_frame_t *frame, xlator_t *this)
@@ -88,7 +88,7 @@ afr_sh_data_done (call_frame_t *frame, xlator_t *this)
int
afr_sh_data_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -151,7 +151,7 @@ afr_sh_data_close (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->flush,
- sh->healing_fd);
+ sh->healing_fd, NULL);
if (!--call_count)
break;
@@ -163,7 +163,7 @@ afr_sh_data_close (call_frame_t *frame, xlator_t *this)
int
afr_sh_data_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *statpre,
- struct iatt *statpost)
+ struct iatt *statpost, dict_t *xdata)
{
afr_local_t *local = NULL;
@@ -237,7 +237,7 @@ afr_sh_data_setattr (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->setattr,
- &local->loc, &stbuf, valid);
+ &local->loc, &stbuf, valid, NULL);
if (!--call_count)
break;
@@ -249,7 +249,7 @@ afr_sh_data_setattr (call_frame_t *frame, xlator_t *this)
int
afr_sh_data_setattr_fstat_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- struct iatt *buf)
+ struct iatt *buf, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
@@ -286,7 +286,7 @@ afr_sh_set_timestamps (call_frame_t *frame, xlator_t *this)
(void *) (long) sh->source,
priv->children[sh->source],
priv->children[sh->source]->fops->fstat,
- sh->healing_fd);
+ sh->healing_fd, NULL);
return 0;
}
@@ -355,7 +355,7 @@ afr_sh_data_fail (call_frame_t *frame, xlator_t *this)
int
afr_sh_data_erase_pending_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret,
- int32_t op_errno, dict_t *xattr)
+ int32_t op_errno, dict_t *xattr, dict_t *xdata)
{
int call_count = 0;
afr_local_t *local = NULL;
@@ -429,7 +429,8 @@ afr_sh_data_erase_pending (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->fxattrop,
sh->healing_fd,
- GF_XATTROP_ADD_ARRAY, erase_xattr[i]);
+ GF_XATTROP_ADD_ARRAY, erase_xattr[i],
+ NULL);
if (!--call_count)
break;
}
@@ -547,7 +548,7 @@ afr_sh_data_sync_prepare (call_frame_t *frame, xlator_t *this)
int
afr_sh_data_trim_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -612,7 +613,8 @@ afr_sh_data_trim_sinks (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->ftruncate,
- sh->healing_fd, sh->file_size);
+ sh->healing_fd, sh->file_size,
+ NULL);
if (!--call_count)
break;
@@ -824,7 +826,7 @@ afr_sh_data_special_file_fix (call_frame_t *frame, xlator_t *this)
int
afr_sh_data_fstat_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- struct iatt *buf)
+ struct iatt *buf, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -894,7 +896,7 @@ afr_sh_data_fstat (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->fstat,
- sh->healing_fd);
+ sh->healing_fd, NULL);
if (!--call_count)
break;
@@ -937,7 +939,7 @@ afr_sh_common_fxattrop_resp_handler (call_frame_t *frame, void *cookie,
int
afr_post_sh_data_fxattrop_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- dict_t *xattr)
+ dict_t *xattr, dict_t *xdata)
{
int call_count = -1;
int ret = 0;
@@ -968,7 +970,7 @@ afr_post_sh_data_fxattrop_cbk (call_frame_t *frame, void *cookie,
int
afr_sh_data_fxattrop_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- dict_t *xattr)
+ dict_t *xattr, dict_t *xdata)
{
int call_count = -1;
@@ -1041,7 +1043,7 @@ afr_sh_data_fxattrop (call_frame_t *frame, xlator_t *this,
priv->children[i],
priv->children[i]->fops->fxattrop,
sh->healing_fd, GF_XATTROP_ADD_ARRAY,
- xattr_req);
+ xattr_req, NULL);
if (!--call_count)
break;
@@ -1211,7 +1213,7 @@ afr_sh_data_lock (call_frame_t *frame, xlator_t *this,
int
afr_sh_data_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, fd_t *fd)
+ int32_t op_ret, int32_t op_errno, fd_t *fd, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
@@ -1298,7 +1300,7 @@ afr_sh_data_open (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->open,
&local->loc,
- O_RDWR|O_LARGEFILE, fd, 0);
+ O_RDWR|O_LARGEFILE, fd, NULL);
if (!--call_count)
break;
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index 3aefd3b..7664746 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -111,7 +111,7 @@ afr_sh_entry_finish (call_frame_t *frame, xlator_t *this)
int
afr_sh_entry_erase_pending_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret,
- int32_t op_errno, dict_t *xattr)
+ int32_t op_errno, dict_t *xattr, dict_t *xdata)
{
long i = 0;
int call_count = 0;
@@ -216,7 +216,8 @@ afr_sh_entry_erase_pending (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->xattrop,
&local->loc,
- GF_XATTROP_ADD_ARRAY, erase_xattr[i]);
+ GF_XATTROP_ADD_ARRAY, erase_xattr[i],
+ NULL);
if (!--call_count)
break;
}
@@ -344,7 +345,8 @@ int
afr_sh_entry_expunge_parent_setattr_cbk (call_frame_t *expunge_frame,
void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
- struct iatt *preop, struct iatt *postop)
+ struct iatt *preop, struct iatt *postop,
+ dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *expunge_local = NULL;
@@ -380,7 +382,7 @@ afr_sh_entry_expunge_remove_cbk (call_frame_t *expunge_frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *expunge_local = NULL;
@@ -415,7 +417,7 @@ afr_sh_entry_expunge_remove_cbk (call_frame_t *expunge_frame, void *cookie,
priv->children[active_src]->fops->setattr,
&expunge_sh->parent_loc,
&expunge_sh->parentbuf,
- valid);
+ valid, NULL);
return 0;
}
@@ -439,7 +441,7 @@ afr_sh_entry_expunge_unlink (call_frame_t *expunge_frame, xlator_t *this,
(void *) (long) active_src,
priv->children[active_src],
priv->children[active_src]->fops->unlink,
- &expunge_local->loc);
+ &expunge_local->loc, 0, NULL);
return 0;
}
@@ -464,7 +466,7 @@ afr_sh_entry_expunge_rmdir (call_frame_t *expunge_frame, xlator_t *this,
(void *) (long) active_src,
priv->children[active_src],
priv->children[active_src]->fops->rmdir,
- &expunge_local->loc, 1);
+ &expunge_local->loc, 1, NULL);
return 0;
}
@@ -588,7 +590,7 @@ afr_sh_entry_expunge_purge (call_frame_t *expunge_frame, xlator_t *this,
(void *) (long) active_src,
priv->children[active_src],
priv->children[active_src]->fops->lookup,
- &expunge_local->loc, 0);
+ &expunge_local->loc, NULL);
return 0;
}
@@ -747,7 +749,7 @@ afr_sh_entry_expunge_entry (call_frame_t *frame, xlator_t *this,
(void *) (long) source,
priv->children[source],
priv->children[source]->fops->lookup,
- &expunge_local->loc, 0);
+ &expunge_local->loc, NULL);
ret = 0;
out:
@@ -762,7 +764,7 @@ int
afr_sh_entry_expunge_readdir_cbk (call_frame_t *frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
- gf_dirent_t *entries)
+ gf_dirent_t *entries, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -923,7 +925,8 @@ int
afr_sh_entry_impunge_setattr_cbk (call_frame_t *impunge_frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
- struct iatt *preop, struct iatt *postop)
+ struct iatt *preop, struct iatt *postop,
+ dict_t *xdata)
{
int call_count = 0;
afr_private_t *priv = NULL;
@@ -960,7 +963,8 @@ int
afr_sh_entry_impunge_parent_setattr_cbk (call_frame_t *setattr_frame,
void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
- struct iatt *preop, struct iatt *postop)
+ struct iatt *preop, struct iatt *postop,
+ dict_t *xdata)
{
int call_count = 0;
afr_local_t *setattr_local = NULL;
@@ -1024,7 +1028,7 @@ afr_sh_entry_impunge_setattr (call_frame_t *impunge_frame, xlator_t *this)
(void *) (long) i, priv->children[i],
priv->children[i]->fops->setattr,
&setattr_local->loc,
- &impunge_sh->parentbuf, valid);
+ &impunge_sh->parentbuf, valid, NULL);
valid = GF_SET_ATTR_UID | GF_SET_ATTR_GID |
GF_SET_ATTR_ATIME | GF_SET_ATTR_MTIME;
@@ -1033,7 +1037,7 @@ afr_sh_entry_impunge_setattr (call_frame_t *impunge_frame, xlator_t *this)
(void *) (long) i, priv->children[i],
priv->children[i]->fops->setattr,
&impunge_local->loc,
- &impunge_sh->entrybuf, valid);
+ &impunge_sh->entrybuf, valid, NULL);
call_count--;
}
GF_ASSERT (!call_count);
@@ -1049,7 +1053,7 @@ int
afr_sh_entry_impunge_xattrop_cbk (call_frame_t *impunge_frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
- dict_t *xattr)
+ dict_t *xattr, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *impunge_local = NULL;
@@ -1136,7 +1140,7 @@ afr_sh_entry_impunge_perform_xattrop (call_frame_t *impunge_frame,
(void *) (long) active_src,
priv->children[active_src],
priv->children[active_src]->fops->xattrop,
- &impunge_local->loc, GF_XATTROP_ADD_ARRAY, xattr);
+ &impunge_local->loc, GF_XATTROP_ADD_ARRAY, xattr, NULL);
if (xattr)
dict_unref (xattr);
@@ -1153,7 +1157,7 @@ afr_sh_entry_impunge_newfile_cbk (call_frame_t *impunge_frame, void *cookie,
int32_t op_ret, int32_t op_errno,
inode_t *inode, struct iatt *stbuf,
struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
int call_count = 0;
afr_private_t *priv = NULL;
@@ -1198,7 +1202,7 @@ afr_sh_entry_impunge_hardlink_cbk (call_frame_t *impunge_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)
+ struct iatt *postparent, dict_t *xdata)
{
int call_count = 0;
call_frame_t *frame = NULL;
@@ -1243,7 +1247,7 @@ afr_sh_entry_impunge_hardlink (call_frame_t *impunge_frame, xlator_t *this,
(void *) (long) child_index,
priv->children[child_index],
priv->children[child_index]->fops->link,
- &oldloc, loc);
+ &oldloc, loc, NULL);
loc_wipe (&oldloc);
return 0;
@@ -1342,7 +1346,7 @@ afr_sh_entry_impunge_mknod (call_frame_t *impunge_frame, xlator_t *this,
&impunge_local->loc,
st_mode_from_ia (stbuf->ia_prot, stbuf->ia_type),
makedev (ia_major (stbuf->ia_rdev),
- ia_minor (stbuf->ia_rdev)), dict);
+ ia_minor (stbuf->ia_rdev)), 0, dict);
if (dict)
dict_unref (dict);
@@ -1389,7 +1393,7 @@ afr_sh_entry_impunge_mkdir (call_frame_t *impunge_frame, xlator_t *this,
priv->children[child_index]->fops->mkdir,
&impunge_local->loc,
st_mode_from_ia (stbuf->ia_prot, stbuf->ia_type),
- dict);
+ 0, dict);
if (dict)
dict_unref (dict);
@@ -1436,7 +1440,7 @@ afr_sh_entry_impunge_symlink (call_frame_t *impunge_frame, xlator_t *this,
(void *) (long) child_index,
priv->children[child_index],
priv->children[child_index]->fops->symlink,
- linkname, &impunge_local->loc, dict);
+ linkname, &impunge_local->loc, 0, dict);
if (dict)
dict_unref (dict);
@@ -1450,7 +1454,7 @@ afr_sh_entry_impunge_symlink_unlink_cbk (call_frame_t *impunge_frame,
void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *impunge_local = NULL;
@@ -1511,7 +1515,7 @@ afr_sh_entry_impunge_symlink_unlink (call_frame_t *impunge_frame, xlator_t *this
(void *) (long) child_index,
priv->children[child_index],
priv->children[child_index]->fops->unlink,
- &impunge_local->loc);
+ &impunge_local->loc, 0, NULL);
return 0;
}
@@ -1521,7 +1525,7 @@ int
afr_sh_entry_impunge_readlink_sink_cbk (call_frame_t *impunge_frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
- const char *linkname, struct iatt *sbuf)
+ const char *linkname, struct iatt *sbuf, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *impunge_local = NULL;
@@ -1603,7 +1607,7 @@ afr_sh_entry_impunge_readlink_sink (call_frame_t *impunge_frame, xlator_t *this,
(void *) (long) child_index,
priv->children[child_index],
priv->children[child_index]->fops->readlink,
- &impunge_local->loc, 4096);
+ &impunge_local->loc, 4096, NULL);
return 0;
}
@@ -1613,7 +1617,7 @@ int
afr_sh_entry_impunge_readlink_cbk (call_frame_t *impunge_frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
- const char *linkname, struct iatt *sbuf)
+ const char *linkname, struct iatt *sbuf, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *impunge_local = NULL;
@@ -1677,7 +1681,7 @@ afr_sh_entry_impunge_readlink (call_frame_t *impunge_frame, xlator_t *this,
(void *) (long) child_index,
priv->children[active_src],
priv->children[active_src]->fops->readlink,
- &impunge_local->loc, 4096);
+ &impunge_local->loc, 4096, NULL);
return 0;
}
@@ -1919,7 +1923,8 @@ afr_sh_entry_common_lookup_done (call_frame_t *impunge_frame, xlator_t *this,
afr_sh_common_lookup (impunge_frame, this, &impunge_local->loc,
afr_sh_entry_common_lookup_done, gfid,
AFR_LOOKUP_FAIL_CONFLICTS |
- AFR_LOOKUP_FAIL_MISSING_GFIDS);
+ AFR_LOOKUP_FAIL_MISSING_GFIDS,
+ NULL);
} else {
afr_sh_entry_call_impunge_recreate (impunge_frame, this);
}
@@ -1985,7 +1990,7 @@ afr_sh_entry_impunge_entry (call_frame_t *frame, xlator_t *this,
afr_sh_common_lookup (impunge_frame, this, &impunge_local->loc,
afr_sh_entry_common_lookup_done, NULL,
- AFR_LOOKUP_FAIL_CONFLICTS);
+ AFR_LOOKUP_FAIL_CONFLICTS, NULL);
op_ret = 0;
out:
@@ -2003,7 +2008,7 @@ int
afr_sh_entry_impunge_readdir_cbk (call_frame_t *frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
- gf_dirent_t *entries)
+ gf_dirent_t *entries, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -2076,7 +2081,7 @@ afr_sh_entry_impunge_subvol (call_frame_t *frame, xlator_t *this)
STACK_WIND (frame, afr_sh_entry_impunge_readdir_cbk,
priv->children[active_src],
priv->children[active_src]->fops->readdirp,
- sh->healing_fd, sh->block_size, sh->offset, 0);
+ sh->healing_fd, sh->block_size, sh->offset, NULL);
return 0;
}
@@ -2122,7 +2127,7 @@ afr_sh_entry_impunge_all (call_frame_t *frame, xlator_t *this)
int
afr_sh_entry_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, fd_t *fd)
+ int32_t op_ret, int32_t op_errno, fd_t *fd, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
@@ -2216,7 +2221,7 @@ afr_sh_entry_open (call_frame_t *frame, xlator_t *this)
(void *) (long) source,
priv->children[source],
priv->children[source]->fops->opendir,
- &local->loc, fd);
+ &local->loc, fd, NULL);
call_count--;
}
@@ -2233,7 +2238,7 @@ afr_sh_entry_open (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->opendir,
- &local->loc, fd);
+ &local->loc, fd, NULL);
if (!--call_count)
break;
@@ -2382,7 +2387,8 @@ afr_sh_post_nonblocking_entry_cbk (call_frame_t *frame, xlator_t *this)
afr_sh_common_lookup (frame, this, &local->loc,
afr_sh_entry_fix, NULL,
AFR_LOOKUP_FAIL_CONFLICTS |
- AFR_LOOKUP_FAIL_MISSING_GFIDS);
+ AFR_LOOKUP_FAIL_MISSING_GFIDS,
+ NULL);
}
return 0;
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c
index d0bf382..9cebd5c 100644
--- a/xlators/cluster/afr/src/afr-self-heal-metadata.c
+++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c
@@ -109,7 +109,7 @@ afr_sh_metadata_finish (call_frame_t *frame, xlator_t *this)
int
afr_sh_metadata_erase_pending_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret,
- int32_t op_errno, dict_t *xattr)
+ int32_t op_errno, dict_t *xattr, dict_t *xdata)
{
afr_local_t *local = NULL;
int call_count = 0;
@@ -201,7 +201,8 @@ afr_sh_metadata_erase_pending (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->xattrop,
&local->loc,
- GF_XATTROP_ADD_ARRAY, erase_xattr[i]);
+ GF_XATTROP_ADD_ARRAY, erase_xattr[i],
+ NULL);
if (!--call_count)
break;
}
@@ -219,7 +220,7 @@ afr_sh_metadata_erase_pending (call_frame_t *frame, xlator_t *this)
int
afr_sh_metadata_sync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
@@ -260,9 +261,9 @@ afr_sh_metadata_sync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
afr_sh_metadata_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
- struct iatt *preop, struct iatt *postop)
+ struct iatt *preop, struct iatt *postop, dict_t *xdata)
{
- afr_sh_metadata_sync_cbk (frame, cookie, this, op_ret, op_errno);
+ afr_sh_metadata_sync_cbk (frame, cookie, this, op_ret, op_errno, xdata);
return 0;
}
@@ -270,9 +271,9 @@ afr_sh_metadata_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
afr_sh_metadata_xattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
- afr_sh_metadata_sync_cbk (frame, cookie, this, op_ret, op_errno);
+ afr_sh_metadata_sync_cbk (frame, cookie, this, op_ret, op_errno, xdata);
return 0;
}
@@ -340,7 +341,7 @@ afr_sh_metadata_sync (call_frame_t *frame, xlator_t *this, dict_t *xattr)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->setattr,
- &local->loc, &stbuf, valid);
+ &local->loc, &stbuf, valid, NULL);
call_count--;
@@ -351,7 +352,7 @@ afr_sh_metadata_sync (call_frame_t *frame, xlator_t *this, dict_t *xattr)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->setxattr,
- &local->loc, xattr, 0);
+ &local->loc, xattr, 0, NULL);
call_count--;
}
@@ -360,9 +361,9 @@ afr_sh_metadata_sync (call_frame_t *frame, xlator_t *this, dict_t *xattr)
int
-afr_sh_metadata_getxattr_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *xattr)
+afr_sh_metadata_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
+ int32_t op_ret, int32_t op_errno, dict_t *xattr,
+ dict_t *xdata)
{
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
@@ -427,7 +428,7 @@ afr_sh_metadata_sync_prepare (call_frame_t *frame, xlator_t *this)
STACK_WIND (frame, afr_sh_metadata_getxattr_cbk,
priv->children[source],
priv->children[source]->fops->getxattr,
- &local->loc, NULL);
+ &local->loc, NULL, NULL);
return 0;
}
@@ -556,7 +557,8 @@ afr_sh_metadata_post_nonblocking_inodelk_cbk (call_frame_t *frame,
afr_sh_common_lookup (frame, this, &local->loc,
afr_sh_metadata_fix, NULL,
AFR_LOOKUP_FAIL_CONFLICTS |
- AFR_LOOKUP_FAIL_MISSING_GFIDS);
+ AFR_LOOKUP_FAIL_MISSING_GFIDS,
+ NULL);
}
return 0;
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c
index 584ad7a..7a95f31 100644
--- a/xlators/cluster/afr/src/afr-transaction.c
+++ b/xlators/cluster/afr/src/afr-transaction.c
@@ -360,7 +360,8 @@ afr_lock_server_count (afr_private_t *priv, afr_transaction_type type)
int32_t
afr_changelog_post_op_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *xattr)
+ int32_t op_ret, int32_t op_errno, dict_t *xattr,
+ dict_t *xdata)
{
afr_internal_lock_t *int_lock = NULL;
afr_private_t *priv = NULL;
@@ -583,7 +584,8 @@ afr_changelog_post_op (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->xattrop,
&local->loc,
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
break;
}
@@ -604,7 +606,7 @@ afr_changelog_post_op (call_frame_t *frame, xlator_t *this)
if (nothing_failed && piggyback) {
afr_changelog_post_op_cbk (frame, (void *)(long)i,
- this, 1, 0, xattr[i]);
+ this, 1, 0, xattr[i], NULL);
} else {
__mark_pre_op_undone_on_fd (frame, this, i);
STACK_WIND_COOKIE (frame,
@@ -613,7 +615,8 @@ afr_changelog_post_op (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->fxattrop,
local->fd,
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
}
}
break;
@@ -621,7 +624,8 @@ afr_changelog_post_op (call_frame_t *frame, xlator_t *this)
{
if (nothing_failed) {
afr_changelog_post_op_cbk (frame, (void *)(long)i,
- this, 1, 0, xattr[i]);
+ this, 1, 0, xattr[i],
+ NULL);
break;
}
@@ -630,13 +634,15 @@ afr_changelog_post_op (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->fxattrop,
local->fd,
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
else
STACK_WIND (frame, afr_changelog_post_op_cbk,
priv->children[i],
priv->children[i]->fops->xattrop,
&local->loc,
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
}
break;
@@ -644,14 +650,16 @@ afr_changelog_post_op (call_frame_t *frame, xlator_t *this)
{
if (nothing_failed) {
afr_changelog_post_op_cbk (frame, (void *)(long)i,
- this, 1, 0, xattr[i]);
+ this, 1, 0, xattr[i],
+ NULL);
} else {
STACK_WIND_COOKIE (frame, afr_changelog_post_op_cbk,
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->xattrop,
&local->transaction.new_parent_loc,
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
}
call_count--;
}
@@ -676,7 +684,8 @@ afr_changelog_post_op (call_frame_t *frame, xlator_t *this)
{
if (nothing_failed) {
afr_changelog_post_op_cbk (frame, (void *)(long)i,
- this, 1, 0, xattr[i]);
+ this, 1, 0, xattr[i],
+ NULL);
break;
}
@@ -685,13 +694,15 @@ afr_changelog_post_op (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->fxattrop,
local->fd,
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
else
STACK_WIND (frame, afr_changelog_post_op_cbk,
priv->children[i],
priv->children[i]->fops->xattrop,
&local->transaction.parent_loc,
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
}
break;
}
@@ -711,7 +722,8 @@ out:
int32_t
afr_changelog_pre_op_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *xattr)
+ int32_t op_ret, int32_t op_errno, dict_t *xattr,
+ dict_t *xdata)
{
afr_local_t * local = NULL;
afr_private_t * priv = this->private;
@@ -831,7 +843,8 @@ afr_changelog_pre_op (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->xattrop,
&(local->loc),
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
break;
}
@@ -850,7 +863,8 @@ afr_changelog_pre_op (call_frame_t *frame, xlator_t *this)
if (piggyback)
afr_changelog_pre_op_cbk (frame, (void *)(long)i,
- this, 1, 0, xattr[i]);
+ this, 1, 0, xattr[i],
+ NULL);
else
STACK_WIND_COOKIE (frame,
afr_changelog_pre_op_cbk,
@@ -858,14 +872,16 @@ afr_changelog_pre_op (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->fxattrop,
local->fd,
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
}
break;
case AFR_METADATA_TRANSACTION:
{
if (local->optimistic_change_log) {
afr_changelog_pre_op_cbk (frame, (void *)(long)i,
- this, 1, 0, xattr[i]);
+ this, 1, 0, xattr[i],
+ NULL);
break;
}
@@ -876,7 +892,8 @@ afr_changelog_pre_op (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->fxattrop,
local->fd,
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
else
STACK_WIND_COOKIE (frame,
afr_changelog_pre_op_cbk,
@@ -884,7 +901,8 @@ afr_changelog_pre_op (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->xattrop,
&(local->loc),
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
}
break;
@@ -892,7 +910,8 @@ afr_changelog_pre_op (call_frame_t *frame, xlator_t *this)
{
if (local->optimistic_change_log) {
afr_changelog_pre_op_cbk (frame, (void *)(long)i,
- this, 1, 0, xattr[i]);
+ this, 1, 0, xattr[i],
+ NULL);
} else {
STACK_WIND_COOKIE (frame,
afr_changelog_pre_op_cbk,
@@ -900,7 +919,8 @@ afr_changelog_pre_op (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->xattrop,
&local->transaction.new_parent_loc,
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
}
call_count--;
@@ -927,7 +947,8 @@ afr_changelog_pre_op (call_frame_t *frame, xlator_t *this)
{
if (local->optimistic_change_log) {
afr_changelog_pre_op_cbk (frame, (void *)(long)i,
- this, 1, 0, xattr[i]);
+ this, 1, 0, xattr[i],
+ NULL);
break;
}
@@ -938,7 +959,8 @@ afr_changelog_pre_op (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->fxattrop,
local->fd,
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
else
STACK_WIND_COOKIE (frame,
afr_changelog_pre_op_cbk,
@@ -946,7 +968,8 @@ afr_changelog_pre_op (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->xattrop,
&local->transaction.parent_loc,
- GF_XATTROP_ADD_ARRAY, xattr[i]);
+ GF_XATTROP_ADD_ARRAY, xattr[i],
+ NULL);
}
break;
}
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index 09b1bf2..918e44d 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -449,7 +449,6 @@ typedef struct _afr_local {
struct {
int32_t flags;
- int32_t wbflags;
} open;
struct {
@@ -700,6 +699,13 @@ typedef struct _afr_local {
afr_self_heal_t self_heal;
struct marker_str marker;
+
+ /* extra data for fops */
+ dict_t *xdata_req;
+ dict_t *xdata_rsp;
+
+ mode_t umask;
+ int xflag;
} afr_local_t;
typedef enum {
@@ -722,7 +728,6 @@ typedef struct {
unsigned int *lock_acquired;
int flags;
- int32_t wbflags;
uint64_t up_count; /* number of CHILD_UPs this fd has seen */
uint64_t down_count; /* number of CHILD_DOWNs this fd has seen */
@@ -858,7 +863,7 @@ afr_set_split_brain (xlator_t *this, inode_t *inode, gf_boolean_t set);
int
afr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
- fd_t *fd, int32_t wbflags);
+ fd_t *fd, dict_t *xdata);
void
afr_set_opendir_done (xlator_t *this, inode_t *inode);
@@ -1032,7 +1037,7 @@ void
afr_set_low_priority (call_frame_t *frame);
int
afr_child_fd_ctx_set (xlator_t *this, fd_t *fd, int32_t child,
- int flags, int32_t wb_flags);
+ int flags);
gf_boolean_t
afr_have_quorum (char *logname, afr_private_t *priv);
diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c
index 21d10af..8667b40 100644
--- a/xlators/cluster/afr/src/pump.c
+++ b/xlators/cluster/afr/src/pump.c
@@ -487,7 +487,7 @@ pump_update_resume_path (xlator_t *this)
static int32_t
pump_xattr_cleaner (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_private_t *priv = NULL;
loc_t loc = {0};
@@ -753,7 +753,7 @@ pump_cmd_start_setxattr_cbk (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno)
+ int32_t op_errno, dict_t *xdata)
{
call_frame_t *prev = NULL;
@@ -846,7 +846,7 @@ pump_initiate_sink_connect (call_frame_t *frame, xlator_t *this)
PUMP_SINK_CHILD(this)->fops->setxattr,
&loc,
dict,
- 0);
+ 0, NULL);
ret = 0;
@@ -880,7 +880,7 @@ pump_cmd_start_getxattr_cbk (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- dict_t *dict)
+ dict_t *dict, dict_t *xdata)
{
afr_local_t *local = NULL;
char *path = NULL;
@@ -996,7 +996,7 @@ pump_execute_status (call_frame_t *frame, xlator_t *this)
out:
- AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict);
+ AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict, NULL);
if (dict)
dict_unref (dict);
@@ -1051,7 +1051,7 @@ pump_execute_start (call_frame_t *frame, xlator_t *this)
PUMP_SOURCE_CHILD(this),
PUMP_SOURCE_CHILD(this)->fops->getxattr,
&loc,
- PUMP_PATH);
+ PUMP_PATH, NULL);
ret = 0;
@@ -1069,7 +1069,7 @@ static int
pump_cleanup_helper (void *data) {
call_frame_t *frame = data;
- pump_xattr_cleaner (frame, 0, frame->this, 0, 0);
+ pump_xattr_cleaner (frame, 0, frame->this, 0, 0, NULL);
return 0;
}
@@ -1151,7 +1151,7 @@ pump_execute_abort (call_frame_t *frame, xlator_t *this)
} else {
pump_priv->cleaner = fop_setxattr_cbk_stub (frame,
pump_xattr_cleaner,
- 0, 0);
+ 0, 0, NULL);
}
return 0;
@@ -1328,7 +1328,7 @@ __filter_xattrs (dict_t *dict)
int32_t
pump_getxattr_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- dict_t *dict)
+ dict_t *dict, dict_t *xdata)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -1363,7 +1363,7 @@ pump_getxattr_cbk (call_frame_t *frame, void *cookie,
children[next_call_child],
children[next_call_child]->fops->getxattr,
&local->loc,
- local->cont.getxattr.name);
+ local->cont.getxattr.name, NULL);
}
out:
@@ -1371,7 +1371,7 @@ out:
if (op_ret >= 0 && dict)
__filter_xattrs (dict);
- AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict);
+ AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict, NULL);
}
return 0;
@@ -1379,7 +1379,7 @@ out:
int32_t
pump_getxattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, const char *name)
+ loc_t *loc, const char *name, dict_t *xdata)
{
afr_private_t * priv = NULL;
xlator_t ** children = NULL;
@@ -1402,7 +1402,7 @@ pump_getxattr (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, default_getxattr_cbk,
FIRST_CHILD (this),
(FIRST_CHILD (this))->fops->getxattr,
- loc, name);
+ loc, name, xdata);
return 0;
}
@@ -1456,12 +1456,12 @@ pump_getxattr (call_frame_t *frame, xlator_t *this,
STACK_WIND_COOKIE (frame, pump_getxattr_cbk,
(void *) (long) call_child,
children[call_child], children[call_child]->fops->getxattr,
- loc, name);
+ loc, name, xdata);
ret = 0;
out:
if (ret < 0)
- AFR_STACK_UNWIND (getxattr, frame, -1, op_errno, NULL);
+ AFR_STACK_UNWIND (getxattr, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -1483,14 +1483,14 @@ afr_setxattr_unwind (call_frame_t *frame, xlator_t *this)
if (main_frame) {
AFR_STACK_UNWIND (setxattr, main_frame,
- local->op_ret, local->op_errno);
+ local->op_ret, local->op_errno, NULL);
}
return 0;
}
static int
afr_setxattr_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
@@ -1559,7 +1559,7 @@ afr_setxattr_wind (call_frame_t *frame, xlator_t *this)
priv->children[i]->fops->setxattr,
&local->loc,
local->cont.setxattr.dict,
- local->cont.setxattr.flags);
+ local->cont.setxattr.flags, NULL);
if (!--call_count)
break;
@@ -1587,11 +1587,9 @@ pump_setxattr_cbk (call_frame_t *frame,
void *cookie,
xlator_t *this,
int32_t op_ret,
- int32_t op_errno)
+ int32_t op_errno, dict_t *xdata)
{
- STACK_UNWIND (frame,
- op_ret,
- op_errno);
+ AFR_STACK_UNWIND (setxattr, frame, op_ret, op_errno, xdata);
return 0;
}
@@ -1614,7 +1612,7 @@ pump_command_reply (call_frame_t *frame, xlator_t *this)
AFR_STACK_UNWIND (setxattr,
frame,
local->op_ret,
- local->op_errno);
+ local->op_errno, NULL);
return 0;
}
@@ -1651,7 +1649,7 @@ pump_parse_command (call_frame_t *frame, xlator_t *this,
int
pump_setxattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, dict_t *dict, int32_t flags)
+ loc_t *loc, dict_t *dict, int32_t flags, dict_t *xdata)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -1672,7 +1670,7 @@ pump_setxattr (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, default_setxattr_cbk,
FIRST_CHILD (this),
(FIRST_CHILD (this))->fops->setxattr,
- loc, dict, flags);
+ loc, dict, flags, xdata);
return 0;
}
@@ -1726,7 +1724,7 @@ out:
if (ret < 0) {
if (transaction_frame)
AFR_STACK_DESTROY (transaction_frame);
- AFR_STACK_UNWIND (setxattr, frame, -1, op_errno);
+ AFR_STACK_UNWIND (setxattr, frame, -1, op_errno, NULL);
}
return 0;
@@ -1760,7 +1758,7 @@ static int32_t
pump_truncate (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- off_t offset)
+ off_t offset, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -1770,11 +1768,11 @@ pump_truncate (call_frame_t *frame,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->truncate,
loc,
- offset);
+ offset, xdata);
return 0;
}
- afr_truncate (frame, this, loc, offset);
+ afr_truncate (frame, this, loc, offset, xdata);
return 0;
}
@@ -1783,7 +1781,7 @@ static int32_t
pump_ftruncate (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- off_t offset)
+ off_t offset, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -1793,11 +1791,11 @@ pump_ftruncate (call_frame_t *frame,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->ftruncate,
fd,
- offset);
+ offset, xdata);
return 0;
}
- afr_ftruncate (frame, this, fd, offset);
+ afr_ftruncate (frame, this, fd, offset, xdata);
return 0;
}
@@ -1806,7 +1804,7 @@ pump_ftruncate (call_frame_t *frame,
int
pump_mknod (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dev_t rdev, dict_t *parms)
+ loc_t *loc, mode_t mode, dev_t rdev, mode_t umask, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -1814,10 +1812,10 @@ pump_mknod (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, default_mknod_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->mknod,
- loc, mode, rdev, parms);
+ loc, mode, rdev, umask, xdata);
return 0;
}
- afr_mknod (frame, this, loc, mode, rdev, parms);
+ afr_mknod (frame, this, loc, mode, rdev, umask, xdata);
return 0;
}
@@ -1826,7 +1824,7 @@ pump_mknod (call_frame_t *frame, xlator_t *this,
int
pump_mkdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dict_t *params)
+ loc_t *loc, mode_t mode, mode_t umask, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -1834,10 +1832,10 @@ pump_mkdir (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, default_mkdir_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->mkdir,
- loc, mode, params);
+ loc, mode, umask, xdata);
return 0;
}
- afr_mkdir (frame, this, loc, mode, params);
+ afr_mkdir (frame, this, loc, mode, umask, xdata);
return 0;
}
@@ -1846,7 +1844,7 @@ pump_mkdir (call_frame_t *frame, xlator_t *this,
static int32_t
pump_unlink (call_frame_t *frame,
xlator_t *this,
- loc_t *loc)
+ loc_t *loc, int xflag, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -1855,10 +1853,10 @@ pump_unlink (call_frame_t *frame,
default_unlink_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->unlink,
- loc);
+ loc, xflag, xdata);
return 0;
}
- afr_unlink (frame, this, loc);
+ afr_unlink (frame, this, loc, xflag, xdata);
return 0;
}
@@ -1866,7 +1864,7 @@ pump_unlink (call_frame_t *frame,
static int
pump_rmdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int flags)
+ loc_t *loc, int flags, dict_t *xdata)
{
afr_private_t *priv = NULL;
@@ -1876,11 +1874,11 @@ pump_rmdir (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, default_rmdir_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->rmdir,
- loc, flags);
+ loc, flags, xdata);
return 0;
}
- afr_rmdir (frame, this, loc, flags);
+ afr_rmdir (frame, this, loc, flags, xdata);
return 0;
}
@@ -1889,7 +1887,7 @@ pump_rmdir (call_frame_t *frame, xlator_t *this,
int
pump_symlink (call_frame_t *frame, xlator_t *this,
- const char *linkpath, loc_t *loc, dict_t *params)
+ const char *linkpath, loc_t *loc, mode_t umask, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -1897,10 +1895,10 @@ pump_symlink (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, default_symlink_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->symlink,
- linkpath, loc, params);
+ linkpath, loc, umask, xdata);
return 0;
}
- afr_symlink (frame, this, linkpath, loc, params);
+ afr_symlink (frame, this, linkpath, loc, umask, xdata);
return 0;
}
@@ -1910,7 +1908,7 @@ static int32_t
pump_rename (call_frame_t *frame,
xlator_t *this,
loc_t *oldloc,
- loc_t *newloc)
+ loc_t *newloc, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -1919,10 +1917,10 @@ pump_rename (call_frame_t *frame,
default_rename_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->rename,
- oldloc, newloc);
+ oldloc, newloc, xdata);
return 0;
}
- afr_rename (frame, this, oldloc, newloc);
+ afr_rename (frame, this, oldloc, newloc, xdata);
return 0;
}
@@ -1932,7 +1930,7 @@ static int32_t
pump_link (call_frame_t *frame,
xlator_t *this,
loc_t *oldloc,
- loc_t *newloc)
+ loc_t *newloc, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -1941,10 +1939,10 @@ pump_link (call_frame_t *frame,
default_link_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->link,
- oldloc, newloc);
+ oldloc, newloc, xdata);
return 0;
}
- afr_link (frame, this, oldloc, newloc);
+ afr_link (frame, this, oldloc, newloc, xdata);
return 0;
}
@@ -1953,7 +1951,7 @@ pump_link (call_frame_t *frame,
static int32_t
pump_create (call_frame_t *frame, xlator_t *this,
loc_t *loc, int32_t flags, mode_t mode,
- fd_t *fd, dict_t *params)
+ mode_t umask, fd_t *fd, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -1961,10 +1959,10 @@ pump_create (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, default_create_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->create,
- loc, flags, mode, fd, params);
+ loc, flags, mode, umask, fd, xdata);
return 0;
}
- afr_create (frame, this, loc, flags, mode, fd, params);
+ afr_create (frame, this, loc, flags, mode, umask, fd, xdata);
return 0;
}
@@ -1974,8 +1972,7 @@ static int32_t
pump_open (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- int32_t flags, fd_t *fd,
- int32_t wbflags)
+ int32_t flags, fd_t *fd, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -1984,10 +1981,10 @@ pump_open (call_frame_t *frame,
default_open_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open,
- loc, flags, fd, wbflags);
+ loc, flags, fd, xdata);
return 0;
}
- afr_open (frame, this, loc, flags, fd, wbflags);
+ afr_open (frame, this, loc, flags, fd, xdata);
return 0;
}
@@ -2000,7 +1997,7 @@ pump_writev (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)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -2013,19 +2010,19 @@ pump_writev (call_frame_t *frame,
vector,
count,
off, flags,
- iobref);
+ iobref, xdata);
return 0;
}
- afr_writev (frame, this, fd, vector, count, off, flags, iobref);
- return 0;
+ afr_writev (frame, this, fd, vector, count, off, flags, iobref, xdata);
+ return 0;
}
static int32_t
pump_flush (call_frame_t *frame,
xlator_t *this,
- fd_t *fd)
+ fd_t *fd, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -2034,10 +2031,10 @@ pump_flush (call_frame_t *frame,
default_flush_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->flush,
- fd);
+ fd, xdata);
return 0;
}
- afr_flush (frame, this, fd);
+ afr_flush (frame, this, fd, xdata);
return 0;
}
@@ -2047,7 +2044,7 @@ static int32_t
pump_fsync (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- int32_t flags)
+ int32_t flags, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -2057,10 +2054,10 @@ pump_fsync (call_frame_t *frame,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->fsync,
fd,
- flags);
+ flags, xdata);
return 0;
}
- afr_fsync (frame, this, fd, flags);
+ afr_fsync (frame, this, fd, flags, xdata);
return 0;
}
@@ -2069,7 +2066,7 @@ pump_fsync (call_frame_t *frame,
static int32_t
pump_opendir (call_frame_t *frame,
xlator_t *this,
- loc_t *loc, fd_t *fd)
+ loc_t *loc, fd_t *fd, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -2078,10 +2075,10 @@ pump_opendir (call_frame_t *frame,
default_opendir_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->opendir,
- loc, fd);
+ loc, fd, xdata);
return 0;
}
- afr_opendir (frame, this, loc, fd);
+ afr_opendir (frame, this, loc, fd, xdata);
return 0;
}
@@ -2091,7 +2088,7 @@ static int32_t
pump_fsyncdir (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- int32_t flags)
+ int32_t flags, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -2101,10 +2098,10 @@ pump_fsyncdir (call_frame_t *frame,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->fsyncdir,
fd,
- flags);
+ flags, xdata);
return 0;
}
- afr_fsyncdir (frame, this, fd, flags);
+ afr_fsyncdir (frame, this, fd, flags, xdata);
return 0;
}
@@ -2115,7 +2112,7 @@ pump_xattrop (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
gf_xattrop_flags_t flags,
- dict_t *dict)
+ dict_t *dict, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -2126,10 +2123,10 @@ pump_xattrop (call_frame_t *frame,
FIRST_CHILD(this)->fops->xattrop,
loc,
flags,
- dict);
+ dict, xdata);
return 0;
}
- afr_xattrop (frame, this, loc, flags, dict);
+ afr_xattrop (frame, this, loc, flags, dict, xdata);
return 0;
}
@@ -2139,7 +2136,7 @@ pump_fxattrop (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
gf_xattrop_flags_t flags,
- dict_t *dict)
+ dict_t *dict, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -2150,10 +2147,10 @@ pump_fxattrop (call_frame_t *frame,
FIRST_CHILD(this)->fops->fxattrop,
fd,
flags,
- dict);
+ dict, xdata);
return 0;
}
- afr_fxattrop (frame, this, fd, flags, dict);
+ afr_fxattrop (frame, this, fd, flags, dict, xdata);
return 0;
}
@@ -2163,7 +2160,7 @@ static int32_t
pump_removexattr (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- const char *name)
+ const char *name, dict_t *xdata)
{
afr_private_t *priv = NULL;
int op_errno = -1;
@@ -2181,14 +2178,14 @@ pump_removexattr (call_frame_t *frame,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->removexattr,
loc,
- name);
+ name, xdata);
return 0;
}
- afr_removexattr (frame, this, loc, name);
+ afr_removexattr (frame, this, loc, name, xdata);
out:
if (op_errno)
- AFR_STACK_UNWIND (removexattr, frame, -1, op_errno);
+ AFR_STACK_UNWIND (removexattr, frame, -1, op_errno, NULL);
return 0;
}
@@ -2200,7 +2197,7 @@ pump_readdir (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
size_t size,
- off_t off)
+ off_t off, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -2209,10 +2206,10 @@ pump_readdir (call_frame_t *frame,
default_readdir_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->readdir,
- fd, size, off);
+ fd, size, off, xdata);
return 0;
}
- afr_readdir (frame, this, fd, size, off);
+ afr_readdir (frame, this, fd, size, off, xdata);
return 0;
}
@@ -2269,7 +2266,7 @@ pump_setattr (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
struct iatt *stbuf,
- int32_t valid)
+ int32_t valid, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -2278,10 +2275,10 @@ pump_setattr (call_frame_t *frame,
default_setattr_cbk,
FIRST_CHILD (this),
FIRST_CHILD (this)->fops->setattr,
- loc, stbuf, valid);
+ loc, stbuf, valid, xdata);
return 0;
}
- afr_setattr (frame, this, loc, stbuf, valid);
+ afr_setattr (frame, this, loc, stbuf, valid, xdata);
return 0;
}
@@ -2292,7 +2289,7 @@ pump_fsetattr (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
struct iatt *stbuf,
- int32_t valid)
+ int32_t valid, dict_t *xdata)
{
afr_private_t *priv = NULL;
priv = this->private;
@@ -2301,10 +2298,10 @@ pump_fsetattr (call_frame_t *frame,
default_fsetattr_cbk,
FIRST_CHILD (this),
FIRST_CHILD (this)->fops->fsetattr,
- fd, stbuf, valid);
+ fd, stbuf, valid, xdata);
return 0;
}
- afr_fsetattr (frame, this, fd, stbuf, valid);
+ afr_fsetattr (frame, this, fd, stbuf, valid, xdata);
return 0;
}
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 059246d..f16ecb1 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -114,7 +114,7 @@ out:
int
dht_lookup_selfheal_cbk (call_frame_t *frame, void *cookie,
xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
dht_local_t *local = NULL;
dht_layout_t *layout = NULL;
@@ -380,7 +380,8 @@ dht_discover (call_frame_t *frame, xlator_t *this, loc_t *loc)
return 0;
err:
- DHT_STACK_UNWIND (lookup, frame, -1, op_errno, NULL, NULL, NULL, NULL);
+ DHT_STACK_UNWIND (lookup, frame, -1, op_errno, NULL, NULL, NULL,
+ NULL);
return 0;
}
@@ -673,7 +674,8 @@ dht_lookup_linkfile_create_cbk (call_frame_t *frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
inode_t *inode, struct iatt *stbuf,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
xlator_t *cached_subvol = NULL;
@@ -836,7 +838,8 @@ dht_lookup_everywhere_done (call_frame_t *frame, xlator_t *this)
int
dht_lookup_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
int this_call_cnt = 0;
@@ -955,7 +958,7 @@ unlock:
"deleting stale linkfile %s on %s",
loc->path, subvol->name);
STACK_WIND (frame, dht_lookup_unlink_cbk,
- subvol, subvol->fops->unlink, loc);
+ subvol, subvol->fops->unlink, loc, 0, NULL);
return 0;
}
}
@@ -1447,7 +1450,8 @@ dht_lookup (call_frame_t *frame, xlator_t *this,
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (lookup, frame, -1, op_errno, NULL, NULL, NULL, NULL);
+ DHT_STACK_UNWIND (lookup, frame, -1, op_errno, NULL, NULL, NULL,
+ NULL);
return 0;
}
@@ -1455,7 +1459,7 @@ err:
int
dht_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -1486,7 +1490,7 @@ unlock:
UNLOCK (&frame->lock);
DHT_STACK_UNWIND (unlink, frame, local->op_ret, local->op_errno,
- &local->preparent, &local->postparent);
+ &local->preparent, &local->postparent, NULL);
return 0;
}
@@ -1495,7 +1499,7 @@ unlock:
int
dht_unlink_linkfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -1534,19 +1538,19 @@ unlock:
STACK_WIND (frame, dht_unlink_cbk,
cached_subvol, cached_subvol->fops->unlink,
- &local->loc);
+ &local->loc, local->flags, NULL);
return 0;
err:
DHT_STACK_UNWIND (unlink, frame, -1, local->op_errno,
- NULL, NULL);
+ NULL, NULL, NULL);
return 0;
}
static int
dht_ufo_xattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = 0;
@@ -1571,7 +1575,8 @@ unlock:
this_call_cnt = dht_frame_return (frame);
if (is_last_call (this_call_cnt)) {
- DHT_STACK_UNWIND (setxattr, frame, local->op_ret, local->op_errno);
+ DHT_STACK_UNWIND (setxattr, frame, local->op_ret,
+ local->op_errno, NULL);
}
return 0;
@@ -1580,7 +1585,7 @@ unlock:
int
dht_err_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = 0;
@@ -1606,7 +1611,8 @@ unlock:
this_call_cnt = dht_frame_return (frame);
if (is_last_call (this_call_cnt)) {
- DHT_STACK_UNWIND (setxattr, frame, local->op_ret, local->op_errno);
+ DHT_STACK_UNWIND (setxattr, frame, local->op_ret,
+ local->op_errno, NULL);
}
return 0;
@@ -1650,7 +1656,7 @@ dht_fill_pathinfo_xattr (xlator_t *this, dht_local_t *local,
int
dht_vgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, dict_t *xattr)
+ int op_ret, int op_errno, dict_t *xattr, dict_t *xdata)
{
dht_local_t *local = NULL;
int ret = 0;
@@ -1734,7 +1740,8 @@ dht_vgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (local->xattr_val)
GF_FREE (local->xattr_val);
- DHT_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict);
+ DHT_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict,
+ xdata);
if (dict)
dict_unref (dict);
@@ -1753,7 +1760,7 @@ dht_vgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* This will happen if there pending */
STACK_WIND (frame, dht_vgetxattr_cbk, local->hashed_subvol,
local->hashed_subvol->fops->getxattr,
- &local->loc, local->key);
+ &local->loc, local->key, NULL);
return 0;
}
@@ -1761,13 +1768,14 @@ dht_vgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_log ("this->name", GF_LOG_ERROR, "Unable to find hashed_subvol"
" for path %s", local->xattr_val);
- DHT_STACK_UNWIND (getxattr, frame, -1, op_errno, dict);
+ DHT_STACK_UNWIND (getxattr, frame, -1, op_errno, dict, xdata);
return 0;
}
int
dht_linkinfo_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, dict_t *xattr)
+ int op_ret, int op_errno, dict_t *xattr,
+ dict_t *xdata)
{
int ret = 0;
char *value = NULL;
@@ -1782,14 +1790,14 @@ dht_linkinfo_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
}
- DHT_STACK_UNWIND (getxattr, frame, op_ret, op_errno, xattr);
+ DHT_STACK_UNWIND (getxattr, frame, op_ret, op_errno, xattr, xdata);
return 0;
}
int
dht_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, dict_t *xattr)
+ int op_ret, int op_errno, dict_t *xattr, dict_t *xdata)
{
int this_call_cnt = 0;
dht_local_t *local = NULL;
@@ -1822,23 +1830,24 @@ dht_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
out:
if (is_last_call (this_call_cnt)) {
- DHT_STACK_UNWIND (getxattr, frame, local->op_ret, op_errno, local->xattr);
+ DHT_STACK_UNWIND (getxattr, frame, local->op_ret, op_errno,
+ local->xattr, NULL);
}
return 0;
}
int32_t
dht_getxattr_unwind (call_frame_t *frame,
- int op_ret, int op_errno, dict_t *dict)
+ int op_ret, int op_errno, dict_t *dict, dict_t *xdata)
{
- DHT_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict);
+ DHT_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict, xdata);
return 0;
}
int
dht_getxattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, const char *key)
+ loc_t *loc, const char *key, dict_t *xdata)
{
xlator_t *subvol = NULL;
xlator_t *hashed_subvol = NULL;
@@ -1890,7 +1899,7 @@ dht_getxattr (call_frame_t *frame, xlator_t *this,
local->call_cnt = 1;
STACK_WIND (frame, dht_vgetxattr_cbk, cached_subvol,
- cached_subvol->fops->getxattr, loc, key);
+ cached_subvol->fops->getxattr, loc, key, NULL);
return 0;
}
@@ -1918,7 +1927,7 @@ dht_getxattr (call_frame_t *frame, xlator_t *this,
if (hashed_subvol) {
STACK_WIND (frame, dht_linkinfo_getxattr_cbk, hashed_subvol,
hashed_subvol->fops->getxattr, loc,
- GF_XATTR_PATHINFO_KEY);
+ GF_XATTR_PATHINFO_KEY, NULL);
return 0;
}
op_errno = ENODATA;
@@ -1983,20 +1992,20 @@ dht_getxattr (call_frame_t *frame, xlator_t *this,
subvol = layout->list[i].xlator;
STACK_WIND (frame, dht_getxattr_cbk,
subvol, subvol->fops->getxattr,
- loc, key);
+ loc, key, NULL);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (getxattr, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (getxattr, frame, -1, op_errno, NULL, NULL);
return 0;
}
int
dht_fgetxattr (call_frame_t *frame, xlator_t *this,
- fd_t *fd, const char *key)
+ fd_t *fd, const char *key, dict_t *xdata)
{
xlator_t *subvol = NULL;
dht_local_t *local = NULL;
@@ -2044,20 +2053,20 @@ dht_fgetxattr (call_frame_t *frame, xlator_t *this,
subvol = layout->list[i].xlator;
STACK_WIND (frame, dht_getxattr_cbk,
subvol, subvol->fops->fgetxattr,
- fd, key);
+ fd, key, NULL);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (fgetxattr, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (fgetxattr, frame, -1, op_errno, NULL, NULL);
return 0;
}
int
dht_fsetxattr (call_frame_t *frame, xlator_t *this,
- fd_t *fd, dict_t *xattr, int flags)
+ fd_t *fd, dict_t *xattr, int flags, dict_t *xdata)
{
xlator_t *subvol = NULL;
dht_local_t *local = NULL;
@@ -2089,13 +2098,13 @@ dht_fsetxattr (call_frame_t *frame, xlator_t *this,
local->call_cnt = 1;
STACK_WIND (frame, dht_err_cbk, subvol, subvol->fops->fsetxattr,
- fd, xattr, flags);
+ fd, xattr, flags, NULL);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (fsetxattr, frame, -1, op_errno);
+ DHT_STACK_UNWIND (fsetxattr, frame, -1, op_errno, NULL);
return 0;
}
@@ -2103,16 +2112,18 @@ err:
static int
dht_common_setxattr_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int32_t op_ret, int32_t op_errno)
+ xlator_t *this, int32_t op_ret, int32_t op_errno,
+ dict_t *xdata)
{
- DHT_STACK_UNWIND (setxattr, frame, op_ret, op_errno);
+ DHT_STACK_UNWIND (setxattr, frame, op_ret, op_errno, xdata);
return 0;
}
int
dht_checking_pathinfo_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, dict_t *xattr)
+ int op_ret, int op_errno, dict_t *xattr,
+ dict_t *xdata)
{
int i = -1;
int ret = -1;
@@ -2144,7 +2155,7 @@ dht_checking_pathinfo_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
this_call_cnt = dht_frame_return (frame);
if (is_last_call (this_call_cnt)) {
- DHT_STACK_UNWIND (setxattr, frame, local->op_ret, ENOTSUP);
+ DHT_STACK_UNWIND (setxattr, frame, local->op_ret, ENOTSUP, NULL);
}
return 0;
@@ -2152,7 +2163,7 @@ out:
int
dht_setxattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, dict_t *xattr, int flags)
+ loc_t *loc, dict_t *xattr, int flags, dict_t *xdata)
{
xlator_t *subvol = NULL;
dht_local_t *local = NULL;
@@ -2217,7 +2228,7 @@ dht_setxattr (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_ufo_xattr_cbk,
layout->list[i].xlator,
layout->list[i].xlator->fops->setxattr,
- loc, xattr, flags);
+ loc, xattr, flags, NULL);
}
return 0;
}
@@ -2286,7 +2297,7 @@ dht_setxattr (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_checking_pathinfo_cbk,
conf->subvolumes[i],
conf->subvolumes[i]->fops->getxattr,
- loc, GF_XATTR_PATHINFO_KEY);
+ loc, GF_XATTR_PATHINFO_KEY, NULL);
}
return 0;
}
@@ -2325,14 +2336,14 @@ dht_setxattr (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_err_cbk,
layout->list[i].xlator,
layout->list[i].xlator->fops->setxattr,
- loc, xattr, flags);
+ loc, xattr, flags, xdata);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (setxattr, frame, -1, op_errno);
+ DHT_STACK_UNWIND (setxattr, frame, -1, op_errno, NULL);
return 0;
}
@@ -2340,7 +2351,7 @@ err:
int
dht_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = 0;
@@ -2366,7 +2377,8 @@ unlock:
this_call_cnt = dht_frame_return (frame);
if (is_last_call (this_call_cnt)) {
- DHT_STACK_UNWIND (removexattr, frame, local->op_ret, local->op_errno);
+ DHT_STACK_UNWIND (removexattr, frame, local->op_ret,
+ local->op_errno, NULL);
}
return 0;
@@ -2375,7 +2387,7 @@ unlock:
int
dht_removexattr (call_frame_t *frame, xlator_t *this,
- loc_t *loc, const char *key)
+ loc_t *loc, const char *key, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -2424,21 +2436,21 @@ dht_removexattr (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_removexattr_cbk,
layout->list[i].xlator,
layout->list[i].xlator->fops->removexattr,
- loc, key);
+ loc, key, NULL);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (removexattr, frame, -1, op_errno);
+ DHT_STACK_UNWIND (removexattr, frame, -1, op_errno, NULL);
return 0;
}
int
dht_fremovexattr (call_frame_t *frame, xlator_t *this,
- fd_t *fd, const char *key)
+ fd_t *fd, const char *key, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -2485,14 +2497,14 @@ dht_fremovexattr (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_removexattr_cbk,
layout->list[i].xlator,
layout->list[i].xlator->fops->fremovexattr,
- fd, key);
+ fd, key, NULL);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (fremovexattr, frame, -1, op_errno);
+ DHT_STACK_UNWIND (fremovexattr, frame, -1, op_errno, NULL);
return 0;
}
@@ -2500,7 +2512,7 @@ err:
int
dht_fd_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, fd_t *fd)
+ int op_ret, int op_errno, fd_t *fd, dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = 0;
@@ -2527,7 +2539,7 @@ unlock:
this_call_cnt = dht_frame_return (frame);
if (is_last_call (this_call_cnt))
DHT_STACK_UNWIND (open, frame, local->op_ret, local->op_errno,
- local->fd);
+ local->fd, NULL);
return 0;
}
@@ -2557,7 +2569,7 @@ dht_normalize_stats (struct statvfs *buf, unsigned long bsize,
int
dht_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, struct statvfs *statvfs)
+ int op_ret, int op_errno, struct statvfs *statvfs, dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = 0;
@@ -2603,14 +2615,14 @@ unlock:
this_call_cnt = dht_frame_return (frame);
if (is_last_call (this_call_cnt))
DHT_STACK_UNWIND (statfs, frame, local->op_ret, local->op_errno,
- &local->statvfs);
+ &local->statvfs, xdata);
return 0;
}
int
-dht_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc)
+dht_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
xlator_t *subvol = NULL;
dht_local_t *local = NULL;
@@ -2639,7 +2651,8 @@ dht_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc)
for (i = 0; i < conf->subvolume_cnt; i++) {
STACK_WIND (frame, dht_statfs_cbk,
conf->subvolumes[i],
- conf->subvolumes[i]->fops->statfs, loc);
+ conf->subvolumes[i]->fops->statfs, loc,
+ xdata);
}
return 0;
}
@@ -2655,20 +2668,21 @@ dht_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc)
local->call_cnt = 1;
STACK_WIND (frame, dht_statfs_cbk,
- subvol, subvol->fops->statfs, loc);
+ subvol, subvol->fops->statfs, loc, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (statfs, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (statfs, frame, -1, op_errno, NULL, NULL);
return 0;
}
int
-dht_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd)
+dht_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
dht_conf_t *conf = NULL;
@@ -2695,14 +2709,14 @@ dht_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd)
STACK_WIND (frame, dht_fd_cbk,
conf->subvolumes[i],
conf->subvolumes[i]->fops->opendir,
- loc, fd);
+ loc, fd, xdata);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (opendir, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (opendir, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -2710,7 +2724,7 @@ err:
int
dht_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret,
- int op_errno, gf_dirent_t *orig_entries)
+ int op_errno, gf_dirent_t *orig_entries, dict_t *xdata)
{
dht_local_t *local = NULL;
gf_dirent_t entries;
@@ -2811,7 +2825,7 @@ unwind:
if (op_ret < 0)
op_ret = 0;
- DHT_STACK_UNWIND (readdirp, frame, op_ret, op_errno, &entries);
+ DHT_STACK_UNWIND (readdirp, frame, op_ret, op_errno, &entries, NULL);
gf_dirent_free (&entries);
@@ -2822,7 +2836,8 @@ unwind:
int
dht_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, gf_dirent_t *orig_entries)
+ int op_ret, int op_errno, gf_dirent_t *orig_entries,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
gf_dirent_t entries;
@@ -2899,7 +2914,7 @@ done:
STACK_WIND (frame, dht_readdir_cbk,
next_subvol, next_subvol->fops->readdir,
- local->fd, local->size, next_offset);
+ local->fd, local->size, next_offset, NULL);
return 0;
}
@@ -2907,7 +2922,7 @@ unwind:
if (op_ret < 0)
op_ret = 0;
- DHT_STACK_UNWIND (readdir, frame, op_ret, op_errno, &entries);
+ DHT_STACK_UNWIND (readdir, frame, op_ret, op_errno, &entries, NULL);
gf_dirent_free (&entries);
@@ -2962,14 +2977,14 @@ dht_do_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
fd, size, xoff, local->xattr);
} else {
STACK_WIND (frame, dht_readdir_cbk, xvol, xvol->fops->readdir,
- fd, size, xoff);
+ fd, size, xoff, local->xattr);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (readdir, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (readdir, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -2977,7 +2992,7 @@ err:
int
dht_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
- off_t yoff)
+ off_t yoff, dict_t *xdata)
{
int op = GF_FOP_READDIR;
dht_conf_t *conf = NULL;
@@ -3014,7 +3029,7 @@ dht_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
int
dht_fsyncdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = 0;
@@ -3034,14 +3049,16 @@ dht_fsyncdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
this_call_cnt = dht_frame_return (frame);
if (is_last_call (this_call_cnt))
- DHT_STACK_UNWIND (fsyncdir, frame, local->op_ret, local->op_errno);
+ DHT_STACK_UNWIND (fsyncdir, frame, local->op_ret,
+ local->op_errno, xdata);
return 0;
}
int
-dht_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync)
+dht_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd,
+ int datasync, dict_t *xdata)
{
dht_local_t *local = NULL;
dht_conf_t *conf = NULL;
@@ -3068,14 +3085,14 @@ dht_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync)
STACK_WIND (frame, dht_fsyncdir_cbk,
conf->subvolumes[i],
conf->subvolumes[i]->fops->fsyncdir,
- fd, datasync);
+ fd, datasync, xdata);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (fsyncdir, frame, -1, op_errno);
+ DHT_STACK_UNWIND (fsyncdir, frame, -1, op_errno, NULL);
return 0;
}
@@ -3085,7 +3102,7 @@ int
dht_newfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno,
inode_t *inode, struct iatt *stbuf, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
call_frame_t *prev = NULL;
int ret = -1;
@@ -3128,8 +3145,8 @@ out:
*/
DHT_STRIP_PHASE1_FLAGS (stbuf);
- DHT_STACK_UNWIND (mknod, frame, op_ret, op_errno, inode, stbuf, preparent,
- postparent);
+ DHT_STACK_UNWIND (mknod, frame, op_ret, op_errno, inode, stbuf,
+ preparent, postparent, xdata);
return 0;
}
@@ -3138,7 +3155,8 @@ dht_mknod_linkfile_create_cbk (call_frame_t *frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
inode_t *inode, struct iatt *stbuf,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
xlator_t *cached_subvol = NULL;
@@ -3151,18 +3169,19 @@ dht_mknod_linkfile_create_cbk (call_frame_t *frame, void *cookie,
STACK_WIND (frame, dht_newfile_cbk,
cached_subvol, cached_subvol->fops->mknod,
- &local->loc, local->mode, local->rdev,
+ &local->loc, local->mode, local->rdev, local->umask,
local->params);
return 0;
err:
- DHT_STACK_UNWIND (mknod, frame, -1, op_errno, NULL, NULL, NULL, NULL);
+ DHT_STACK_UNWIND (mknod, frame, -1, op_errno, NULL, NULL, NULL, NULL,
+ NULL);
return 0;
}
int
dht_mknod (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dev_t rdev, dict_t *params)
+ loc_t *loc, mode_t mode, dev_t rdev, mode_t umask, dict_t *params)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -3196,7 +3215,7 @@ dht_mknod (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_newfile_cbk,
subvol, subvol->fops->mknod,
- loc, mode, rdev, params);
+ loc, mode, rdev, umask, params);
} else {
avail_subvol = dht_free_disk_available_subvol (this, subvol);
if (avail_subvol != subvol) {
@@ -3207,7 +3226,7 @@ dht_mknod (call_frame_t *frame, xlator_t *this,
local->cached_subvol = avail_subvol;
local->mode = mode;
local->rdev = rdev;
-
+ local->umask = umask;
dht_linkfile_create (frame,
dht_mknod_linkfile_create_cbk,
avail_subvol, subvol, loc);
@@ -3217,7 +3236,7 @@ dht_mknod (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_newfile_cbk,
subvol, subvol->fops->mknod,
- loc, mode, rdev, params);
+ loc, mode, rdev, umask, params);
}
}
@@ -3226,7 +3245,7 @@ dht_mknod (call_frame_t *frame, xlator_t *this,
err:
op_errno = (op_errno == -1) ? errno : op_errno;
DHT_STACK_UNWIND (mknod, frame, -1, op_errno,
- NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
return 0;
}
@@ -3234,7 +3253,7 @@ err:
int
dht_symlink (call_frame_t *frame, xlator_t *this,
- const char *linkname, loc_t *loc, dict_t *params)
+ const char *linkname, loc_t *loc, mode_t umask, dict_t *params)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -3264,21 +3283,22 @@ dht_symlink (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_newfile_cbk,
subvol, subvol->fops->symlink,
- linkname, loc, params);
+ linkname, loc, umask, params);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
DHT_STACK_UNWIND (link, frame, -1, op_errno,
- NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
return 0;
}
int
-dht_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc)
+dht_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag,
+ dict_t *xdata)
{
xlator_t *cached_subvol = NULL;
xlator_t *hashed_subvol = NULL;
@@ -3296,7 +3316,7 @@ dht_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc)
local->loc.path, cached_subvol->name, loc->path);
STACK_WIND (frame, dht_unlink_cbk,
cached_subvol, cached_subvol->fops->unlink,
- &local->loc);
+ &local->loc, xflag, xdata);
goto done;
}
@@ -3324,18 +3344,21 @@ dht_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc)
goto err;
}
+ local->flags = xflag;
if (hashed_subvol != cached_subvol) {
STACK_WIND (frame, dht_unlink_linkfile_cbk,
- hashed_subvol, hashed_subvol->fops->unlink, loc);
+ hashed_subvol, hashed_subvol->fops->unlink, loc,
+ xflag, xdata);
} else {
STACK_WIND (frame, dht_unlink_cbk,
- cached_subvol, cached_subvol->fops->unlink, loc);
+ cached_subvol, cached_subvol->fops->unlink, loc,
+ xflag, xdata);
}
done:
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (unlink, frame, -1, op_errno, NULL, NULL);
+ DHT_STACK_UNWIND (unlink, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
@@ -3345,7 +3368,7 @@ int
dht_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno,
inode_t *inode, struct iatt *stbuf, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
call_frame_t *prev = NULL;
dht_layout_t *layout = NULL;
@@ -3371,7 +3394,7 @@ dht_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
DHT_STRIP_PHASE1_FLAGS (stbuf);
DHT_STACK_UNWIND (link, frame, op_ret, op_errno, inode, stbuf, preparent,
- postparent);
+ postparent, NULL);
return 0;
}
@@ -3381,7 +3404,8 @@ int
dht_link_linkfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno,
inode_t *inode, struct iatt *stbuf,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
xlator_t *srcvol = NULL;
@@ -3393,14 +3417,14 @@ dht_link_linkfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
srcvol = local->linkfile.srcvol;
STACK_WIND (frame, dht_link_cbk, srcvol, srcvol->fops->link,
- &local->loc, &local->loc2);
+ &local->loc, &local->loc2, xdata);
return 0;
err:
DHT_STRIP_PHASE1_FLAGS (stbuf);
DHT_STACK_UNWIND (link, frame, op_ret, op_errno, inode, stbuf, preparent,
- postparent);
+ postparent, NULL);
return 0;
}
@@ -3408,7 +3432,7 @@ err:
int
dht_link (call_frame_t *frame, xlator_t *this,
- loc_t *oldloc, loc_t *newloc)
+ loc_t *oldloc, loc_t *newloc, dict_t *xdata)
{
xlator_t *cached_subvol = NULL;
xlator_t *hashed_subvol = NULL;
@@ -3458,14 +3482,14 @@ dht_link (call_frame_t *frame, xlator_t *this,
} else {
STACK_WIND (frame, dht_link_cbk,
cached_subvol, cached_subvol->fops->link,
- oldloc, newloc);
+ oldloc, newloc, xdata);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (link, frame, -1, op_errno, NULL, NULL, NULL, NULL);
+ DHT_STACK_UNWIND (link, frame, -1, op_errno, NULL, NULL, NULL, NULL, NULL);
return 0;
}
@@ -3475,7 +3499,7 @@ int
dht_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno,
fd_t *fd, inode_t *inode, struct iatt *stbuf,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent, dict_t *xdata)
{
call_frame_t *prev = NULL;
int ret = -1;
@@ -3511,7 +3535,7 @@ dht_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
DHT_STRIP_PHASE1_FLAGS (stbuf);
DHT_STACK_UNWIND (create, frame, op_ret, op_errno, fd, inode, stbuf, preparent,
- postparent);
+ postparent, NULL);
return 0;
}
@@ -3521,7 +3545,8 @@ dht_create_linkfile_create_cbk (call_frame_t *frame, void *cookie,
xlator_t *this,
int32_t op_ret, int32_t op_errno,
inode_t *inode, struct iatt *stbuf,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
xlator_t *cached_subvol = NULL;
@@ -3535,18 +3560,19 @@ dht_create_linkfile_create_cbk (call_frame_t *frame, void *cookie,
STACK_WIND (frame, dht_create_cbk,
cached_subvol, cached_subvol->fops->create,
&local->loc, local->flags, local->mode,
- local->fd, local->params);
+ local->umask, local->fd, local->params);
return 0;
err:
- DHT_STACK_UNWIND (create, frame, -1, op_errno, NULL, NULL, NULL, NULL, NULL);
+ DHT_STACK_UNWIND (create, frame, -1, op_errno, NULL, NULL, NULL,
+ NULL, NULL, NULL);
return 0;
}
int
dht_create (call_frame_t *frame, xlator_t *this,
loc_t *loc, int32_t flags, mode_t mode,
- fd_t *fd, dict_t *params)
+ mode_t umask, fd_t *fd, dict_t *params)
{
int op_errno = -1;
xlator_t *subvol = NULL;
@@ -3572,7 +3598,7 @@ dht_create (call_frame_t *frame, xlator_t *this,
local->loc.path, subvol->name, loc->path);
STACK_WIND (frame, dht_create_cbk,
subvol, subvol->fops->create,
- &local->loc, flags, mode, fd, params);
+ &local->loc, flags, mode, umask, fd, params);
goto done;
}
@@ -3590,7 +3616,7 @@ dht_create (call_frame_t *frame, xlator_t *this,
"creating %s on %s", loc->path, subvol->name);
STACK_WIND (frame, dht_create_cbk,
subvol, subvol->fops->create,
- loc, flags, mode, fd, params);
+ loc, flags, mode, umask, fd, params);
goto done;
}
/* Choose the minimum filled volume, and create the
@@ -3600,7 +3626,7 @@ dht_create (call_frame_t *frame, xlator_t *this,
local->params = dict_ref (params);
local->flags = flags;
local->mode = mode;
-
+ local->umask = umask;
local->cached_subvol = avail_subvol;
local->hashed_subvol = subvol;
gf_log (this->name, GF_LOG_TRACE,
@@ -3615,13 +3641,14 @@ dht_create (call_frame_t *frame, xlator_t *this,
"creating %s on %s", loc->path, subvol->name);
STACK_WIND (frame, dht_create_cbk,
subvol, subvol->fops->create,
- loc, flags, mode, fd, params);
+ loc, flags, mode, umask, fd, params);
done:
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (create, frame, -1, op_errno, NULL, NULL, NULL, NULL, NULL);
+ DHT_STACK_UNWIND (create, frame, -1, op_errno, NULL, NULL, NULL,
+ NULL, NULL, NULL);
return 0;
}
@@ -3630,7 +3657,7 @@ err:
int
dht_mkdir_selfheal_cbk (call_frame_t *frame, void *cookie,
xlator_t *this,
- int32_t op_ret, int32_t op_errno)
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
dht_local_t *local = NULL;
dht_layout_t *layout = NULL;
@@ -3648,7 +3675,7 @@ dht_mkdir_selfheal_cbk (call_frame_t *frame, void *cookie,
DHT_STACK_UNWIND (mkdir, frame, op_ret, op_errno,
local->inode, &local->stbuf, &local->preparent,
- &local->postparent);
+ &local->postparent, NULL);
return 0;
}
@@ -3656,7 +3683,7 @@ dht_mkdir_selfheal_cbk (call_frame_t *frame, void *cookie,
int
dht_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, inode_t *inode, struct iatt *stbuf,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent, dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = 0;
@@ -3709,7 +3736,8 @@ int
dht_mkdir_hashed_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int op_ret, int op_errno,
inode_t *inode, struct iatt *stbuf,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
int ret = -1;
@@ -3766,19 +3794,20 @@ dht_mkdir_hashed_cbk (call_frame_t *frame, void *cookie,
continue;
STACK_WIND (frame, dht_mkdir_cbk,
conf->subvolumes[i],
- conf->subvolumes[i]->fops->mkdir,
- &local->loc, local->mode, local->params);
+ conf->subvolumes[i]->fops->mkdir, &local->loc,
+ local->mode, local->umask, local->params);
}
return 0;
err:
- DHT_STACK_UNWIND (mkdir, frame, -1, op_errno, NULL, NULL, NULL, NULL);
+ DHT_STACK_UNWIND (mkdir, frame, -1, op_errno, NULL, NULL, NULL,
+ NULL, NULL);
return 0;
}
int
dht_mkdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dict_t *params)
+ loc_t *loc, mode_t mode, mode_t umask, dict_t *params)
{
dht_local_t *local = NULL;
dht_conf_t *conf = NULL;
@@ -3814,6 +3843,7 @@ dht_mkdir (call_frame_t *frame, xlator_t *this,
local->hashed_subvol = hashed_subvol;
local->mode = mode;
+ local->umask = umask;
local->params = dict_ref (params);
local->inode = inode_ref (loc->inode);
@@ -3826,13 +3856,14 @@ dht_mkdir (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_mkdir_hashed_cbk,
hashed_subvol,
hashed_subvol->fops->mkdir,
- loc, mode, params);
+ loc, mode, umask, params);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (mkdir, frame, -1, op_errno, NULL, NULL, NULL, NULL);
+ DHT_STACK_UNWIND (mkdir, frame, -1, op_errno, NULL, NULL, NULL,
+ NULL, NULL);
return 0;
}
@@ -3840,14 +3871,14 @@ err:
int
dht_rmdir_selfheal_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
dht_local_t *local = NULL;
local = frame->local;
DHT_STACK_UNWIND (rmdir, frame, local->op_ret, local->op_errno,
- &local->preparent, &local->postparent);
+ &local->preparent, &local->postparent, NULL);
return 0;
}
@@ -3856,7 +3887,7 @@ dht_rmdir_selfheal_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
dht_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = 0;
@@ -3912,7 +3943,7 @@ unlock:
DHT_STACK_UNWIND (rmdir, frame, local->op_ret,
local->op_errno, &local->preparent,
- &local->postparent);
+ &local->postparent, NULL);
}
}
@@ -3941,14 +3972,14 @@ dht_rmdir_do (call_frame_t *frame, xlator_t *this)
STACK_WIND (frame, dht_rmdir_cbk,
conf->subvolumes[i],
conf->subvolumes[i]->fops->rmdir,
- &local->loc, local->flags);
+ &local->loc, local->flags, NULL);
}
return 0;
err:
DHT_STACK_UNWIND (rmdir, frame, local->op_ret, local->op_errno,
- &local->preparent, &local->postparent);
+ &local->preparent, &local->postparent, NULL);
return 0;
}
@@ -3956,7 +3987,7 @@ err:
int
dht_rmdir_linkfile_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -4026,7 +4057,7 @@ dht_rmdir_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
STACK_WIND (frame, dht_rmdir_linkfile_unlink_cbk,
- src, src->fops->unlink, &local->loc);
+ src, src->fops->unlink, &local->loc, 0, NULL);
return 0;
err:
@@ -4125,7 +4156,8 @@ err:
int
dht_rmdir_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, gf_dirent_t *entries)
+ int op_ret, int op_errno, gf_dirent_t *entries,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = -1;
@@ -4169,7 +4201,7 @@ dht_rmdir_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
dht_rmdir_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, fd_t *fd)
+ int op_ret, int op_errno, fd_t *fd, dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = -1;
@@ -4225,7 +4257,8 @@ err:
int
-dht_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags)
+dht_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
dht_conf_t *conf = NULL;
@@ -4264,7 +4297,7 @@ dht_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags)
STACK_WIND (frame, dht_rmdir_opendir_cbk,
conf->subvolumes[i],
conf->subvolumes[i]->fops->opendir,
- loc, local->fd);
+ loc, local->fd, NULL);
}
return 0;
@@ -4272,17 +4305,17 @@ dht_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags)
err:
op_errno = (op_errno == -1) ? errno : op_errno;
DHT_STACK_UNWIND (rmdir, frame, -1, op_errno,
- NULL, NULL);
+ NULL, NULL, NULL);
return 0;
}
int
dht_entrylk_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int32_t op_ret, int32_t op_errno)
+ xlator_t *this, int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
- DHT_STACK_UNWIND (entrylk, frame, op_ret, op_errno);
+ DHT_STACK_UNWIND (entrylk, frame, op_ret, op_errno, xdata);
return 0;
}
@@ -4290,7 +4323,7 @@ dht_entrylk_cbk (call_frame_t *frame, void *cookie,
int
dht_entrylk (call_frame_t *frame, xlator_t *this,
const char *volume, loc_t *loc, const char *basename,
- entrylk_cmd cmd, entrylk_type type)
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -4320,13 +4353,13 @@ dht_entrylk (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_entrylk_cbk,
subvol, subvol->fops->entrylk,
- volume, loc, basename, cmd, type);
+ volume, loc, basename, cmd, type, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (entrylk, frame, -1, op_errno);
+ DHT_STACK_UNWIND (entrylk, frame, -1, op_errno, NULL);
return 0;
}
@@ -4334,10 +4367,10 @@ err:
int
dht_fentrylk_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int32_t op_ret, int32_t op_errno)
+ xlator_t *this, int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
- DHT_STACK_UNWIND (fentrylk, frame, op_ret, op_errno);
+ DHT_STACK_UNWIND (fentrylk, frame, op_ret, op_errno, NULL);
return 0;
}
@@ -4345,7 +4378,7 @@ dht_fentrylk_cbk (call_frame_t *frame, void *cookie,
int
dht_fentrylk (call_frame_t *frame, xlator_t *this,
const char *volume, fd_t *fd, const char *basename,
- entrylk_cmd cmd, entrylk_type type)
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -4364,13 +4397,13 @@ dht_fentrylk (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_fentrylk_cbk,
subvol, subvol->fops->fentrylk,
- volume, fd, basename, cmd, type);
+ volume, fd, basename, cmd, type, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (fentrylk, frame, -1, op_errno);
+ DHT_STACK_UNWIND (fentrylk, frame, -1, op_errno, NULL);
return 0;
}
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index d7689cc..61687aa 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -38,7 +38,8 @@
typedef int (*dht_selfheal_dir_cbk_t) (call_frame_t *frame, void *cookie,
xlator_t *this,
- int32_t op_ret, int32_t op_errno);
+ int32_t op_ret, int32_t op_errno,
+ dict_t *xdata);
typedef int (*dht_defrag_cbk_fn_t) (xlator_t *this, call_frame_t *frame,
int ret);
@@ -74,7 +75,6 @@ typedef enum {
struct dht_rebalance_ {
xlator_t *from_subvol;
xlator_t *target_node;
- int32_t wbflags;
off_t offset;
size_t size;
int32_t flags;
@@ -83,6 +83,7 @@ struct dht_rebalance_ {
struct iovec *vector;
struct iatt stbuf;
dht_defrag_cbk_fn_t target_op_fn;
+ dict_t *xdata;
};
struct dht_local {
@@ -142,6 +143,7 @@ struct dht_local {
int32_t flags;
mode_t mode;
dev_t rdev;
+ mode_t umask;
/* need for file-info */
char *xattr_val;
@@ -166,6 +168,7 @@ struct dht_local {
glusterfs_fop_t fop;
struct dht_rebalance_ rebalance;
+
};
typedef struct dht_local dht_local_t;
@@ -397,9 +400,6 @@ dht_selfheal_restore (call_frame_t *frame, dht_selfheal_dir_cbk_t cbk,
int
dht_layout_sort_volname (dht_layout_t *layout);
-int dht_rename (call_frame_t *frame, xlator_t *this,
- loc_t *oldloc, loc_t *newloc);
-
int dht_get_du_info (call_frame_t *frame, xlator_t *this, loc_t *loc);
gf_boolean_t dht_is_subvol_filled (xlator_t *this, xlator_t *subvol);
@@ -407,7 +407,7 @@ xlator_t *dht_free_disk_available_subvol (xlator_t *this, xlator_t *subvol);
int dht_get_du_info_for_subvol (xlator_t *this, int subvol_idx);
int dht_layout_preset (xlator_t *this, xlator_t *subvol, inode_t *inode);
-int dht_layout_set (xlator_t *this, inode_t *inode, dht_layout_t *layout);
+int dht_layout_set (xlator_t *this, inode_t *inode, dht_layout_t *layout);;
void dht_layout_unref (xlator_t *this, dht_layout_t *layout);
dht_layout_t *dht_layout_ref (xlator_t *this, dht_layout_t *layout);
xlator_t *dht_first_up_subvol (xlator_t *this);
@@ -422,7 +422,8 @@ int dht_rename_cleanup (call_frame_t *frame)
int dht_rename_links_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
inode_t *inode, struct iatt *stbuf,
- struct iatt *preparent, struct iatt *postparent);
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata);
int dht_fix_directory_layout (call_frame_t *frame,
dht_selfheal_dir_cbk_t dir_cbk,
@@ -445,73 +446,73 @@ int32_t dht_lookup (call_frame_t *frame,
int32_t dht_stat (call_frame_t *frame,
xlator_t *this,
- loc_t *loc);
+ loc_t *loc, dict_t *xdata);
int32_t dht_fstat (call_frame_t *frame,
xlator_t *this,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
int32_t dht_truncate (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- off_t offset);
+ off_t offset, dict_t *xdata);
int32_t dht_ftruncate (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- off_t offset);
+ off_t offset, dict_t *xdata);
int32_t dht_access (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- int32_t mask);
+ int32_t mask, dict_t *xdata);
int32_t dht_readlink (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- size_t size);
+ size_t size, dict_t *xdata);
-int32_t dht_mknod (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dev_t rdev, dict_t *params);
+int32_t dht_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ mode_t mode, dev_t rdev, mode_t umask, dict_t *xdata);
int32_t dht_mkdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dict_t *params);
+ loc_t *loc, mode_t mode, mode_t umask, dict_t *xdata);
int32_t dht_unlink (call_frame_t *frame,
xlator_t *this,
- loc_t *loc);
+ loc_t *loc, int xflag, dict_t *xdata);
int32_t dht_rmdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int flags);
+ loc_t *loc, int flags, dict_t *xdata);
int32_t dht_symlink (call_frame_t *frame, xlator_t *this,
- const char *linkpath, loc_t *loc, dict_t *params);
+ const char *linkpath, loc_t *loc, mode_t umask,
+ dict_t *xdata);
int32_t dht_rename (call_frame_t *frame,
xlator_t *this,
loc_t *oldloc,
- loc_t *newloc);
+ loc_t *newloc, dict_t *xdata);
int32_t dht_link (call_frame_t *frame,
xlator_t *this,
loc_t *oldloc,
- loc_t *newloc);
+ loc_t *newloc, dict_t *xdata);
int32_t dht_create (call_frame_t *frame, xlator_t *this,
loc_t *loc, int32_t flags, mode_t mode,
- fd_t *fd, dict_t *params);
+ mode_t umask, fd_t *fd, dict_t *params);
int32_t dht_open (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- int32_t flags, fd_t *fd,
- int32_t wbflags);
+ int32_t flags, fd_t *fd, dict_t *xdata);
int32_t dht_readv (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
size_t size,
- off_t offset, uint32_t flags);
+ off_t offset, uint32_t flags, dict_t *xdata);
int32_t dht_writev (call_frame_t *frame,
xlator_t *this,
@@ -520,87 +521,87 @@ int32_t dht_writev (call_frame_t *frame,
int32_t count,
off_t offset,
uint32_t flags,
- struct iobref *iobref);
+ struct iobref *iobref, dict_t *xdata);
int32_t dht_flush (call_frame_t *frame,
xlator_t *this,
- fd_t *fd);
+ fd_t *fd, dict_t *xdata);
int32_t dht_fsync (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- int32_t datasync);
+ int32_t datasync, dict_t *xdata);
int32_t dht_opendir (call_frame_t *frame,
xlator_t *this,
- loc_t *loc, fd_t *fd);
+ loc_t *loc, fd_t *fd, dict_t *xdata);
int32_t dht_fsyncdir (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- int32_t datasync);
+ int32_t datasync, dict_t *xdata);
int32_t dht_statfs (call_frame_t *frame,
xlator_t *this,
- loc_t *loc);
+ loc_t *loc, dict_t *xdata);
int32_t dht_setxattr (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
dict_t *dict,
- int32_t flags);
+ int32_t flags, dict_t *xdata);
int32_t dht_getxattr (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- const char *name);
+ const char *name, dict_t *xdata);
int32_t dht_fsetxattr (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
dict_t *dict,
- int32_t flags);
+ int32_t flags, dict_t *xdata);
int32_t dht_fgetxattr (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- const char *name);
+ const char *name, dict_t *xdata);
int32_t dht_removexattr (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
- const char *name);
+ const char *name, dict_t *xdata);
int32_t dht_fremovexattr (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- const char *name);
+ const char *name, dict_t *xdata);
int32_t dht_lk (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
int32_t cmd,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
int32_t dht_inodelk (call_frame_t *frame, xlator_t *this,
const char *volume, loc_t *loc, int32_t cmd,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
int32_t dht_finodelk (call_frame_t *frame, xlator_t *this,
const char *volume, fd_t *fd, int32_t cmd,
- struct gf_flock *flock);
+ struct gf_flock *flock, dict_t *xdata);
int32_t dht_entrylk (call_frame_t *frame, xlator_t *this,
const char *volume, loc_t *loc, const char *basename,
- entrylk_cmd cmd, entrylk_type type);
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata);
int32_t dht_fentrylk (call_frame_t *frame, xlator_t *this,
const char *volume, fd_t *fd, const char *basename,
- entrylk_cmd cmd, entrylk_type type);
+ entrylk_cmd cmd, entrylk_type type, dict_t *xdata);
int32_t dht_readdir (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
- size_t size, off_t off);
+ size_t size, off_t off, dict_t *xdata);
int32_t dht_readdirp (call_frame_t *frame,
xlator_t *this,
@@ -611,19 +612,19 @@ int32_t dht_xattrop (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
gf_xattrop_flags_t flags,
- dict_t *dict);
+ dict_t *dict, dict_t *xdata);
int32_t dht_fxattrop (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
gf_xattrop_flags_t flags,
- dict_t *dict);
+ dict_t *dict, dict_t *xdata);
int32_t dht_forget (xlator_t *this, inode_t *inode);
int32_t dht_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
- struct iatt *stbuf, int32_t valid);
+ struct iatt *stbuf, int32_t valid, dict_t *xdata);
int32_t dht_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
- struct iatt *stbuf, int32_t valid);
+ struct iatt *stbuf, int32_t valid, dict_t *xdata);
int32_t dht_notify (xlator_t *this, int32_t event, void *data, ...);
@@ -647,11 +648,12 @@ int dht_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int dht_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno,
fd_t *fd, inode_t *inode, struct iatt *stbuf,
- struct iatt *preparent, struct iatt *postparent);
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata);
int dht_newfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno,
inode_t *inode, struct iatt *stbuf, struct iatt *preparent,
- struct iatt *postparent);
+ struct iatt *postparent, dict_t *xdata);
int
gf_defrag_status_get (gf_defrag_info_t *defrag, dict_t *dict);
diff --git a/xlators/cluster/dht/src/dht-diskusage.c b/xlators/cluster/dht/src/dht-diskusage.c
index 0200695..767510f 100644
--- a/xlators/cluster/dht/src/dht-diskusage.c
+++ b/xlators/cluster/dht/src/dht-diskusage.c
@@ -35,7 +35,8 @@
int
dht_du_info_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, struct statvfs *statvfs)
+ int op_ret, int op_errno, struct statvfs *statvfs,
+ dict_t *xdata)
{
dht_conf_t *conf = NULL;
call_frame_t *prev = NULL;
@@ -129,7 +130,7 @@ dht_get_du_info_for_subvol (xlator_t *this, int subvol_idx)
STACK_WIND (statfs_frame, dht_du_info_cbk,
conf->subvolumes[subvol_idx],
conf->subvolumes[subvol_idx]->fops->statfs,
- &tmp_loc);
+ &tmp_loc, NULL);
return 0;
err:
@@ -177,7 +178,7 @@ dht_get_du_info (call_frame_t *frame, xlator_t *this, loc_t *loc)
STACK_WIND (statfs_frame, dht_du_info_cbk,
conf->subvolumes[i],
conf->subvolumes[i]->fops->statfs,
- &tmp_loc);
+ &tmp_loc, NULL);
}
conf->last_stat_fetch.tv_sec = tv.tv_sec;
diff --git a/xlators/cluster/dht/src/dht-inode-read.c b/xlators/cluster/dht/src/dht-inode-read.c
index 3ec6f4b..6732f23 100644
--- a/xlators/cluster/dht/src/dht-inode-read.c
+++ b/xlators/cluster/dht/src/dht-inode-read.c
@@ -34,7 +34,7 @@ int dht_fsync2 (xlator_t *this, call_frame_t *frame, int ret);
int
dht_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, fd_t *fd)
+ int op_ret, int op_errno, fd_t *fd, dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -61,7 +61,7 @@ dht_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
return 0;
out:
- DHT_STACK_UNWIND (open, frame, op_ret, op_errno, local->fd);
+ DHT_STACK_UNWIND (open, frame, op_ret, op_errno, local->fd, xdata);
return 0;
}
@@ -86,17 +86,17 @@ dht_open2 (xlator_t *this, call_frame_t *frame, int op_ret)
STACK_WIND (frame, dht_open_cbk, subvol, subvol->fops->open,
&local->loc, local->rebalance.flags, local->fd,
- local->rebalance.wbflags);
+ NULL);
return 0;
out:
- DHT_STACK_UNWIND (stat, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (stat, frame, -1, op_errno, NULL, NULL);
return 0;
}
int
dht_open (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int flags, fd_t *fd, int wbflags)
+ loc_t *loc, int flags, fd_t *fd, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -120,25 +120,24 @@ dht_open (call_frame_t *frame, xlator_t *this,
goto err;
}
- local->rebalance.wbflags = wbflags;
local->rebalance.flags = flags;
local->call_cnt = 1;
STACK_WIND (frame, dht_open_cbk, subvol, subvol->fops->open,
- loc, flags, fd, wbflags);
+ loc, flags, fd, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (open, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (open, frame, -1, op_errno, NULL, NULL);
return 0;
}
int
dht_file_attr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, struct iatt *stbuf)
+ int op_ret, int op_errno, struct iatt *stbuf, dict_t *xdata)
{
uint64_t tmp_subvol = 0;
dht_local_t *local = NULL;
@@ -183,7 +182,7 @@ dht_file_attr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
DHT_STRIP_PHASE1_FLAGS (stbuf);
- DHT_STACK_UNWIND (stat, frame, op_ret, op_errno, stbuf);
+ DHT_STACK_UNWIND (stat, frame, op_ret, op_errno, stbuf, xdata);
err:
return 0;
}
@@ -208,21 +207,21 @@ dht_attr2 (xlator_t *this, call_frame_t *frame, int op_ret)
if (local->fop == GF_FOP_FSTAT) {
STACK_WIND (frame, dht_file_attr_cbk, subvol,
- subvol->fops->fstat, local->fd);
+ subvol->fops->fstat, local->fd, NULL);
} else {
STACK_WIND (frame, dht_file_attr_cbk, subvol,
- subvol->fops->stat, &local->loc);
+ subvol->fops->stat, &local->loc, NULL);
}
return 0;
out:
- DHT_STACK_UNWIND (stat, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (stat, frame, -1, op_errno, NULL, NULL);
return 0;
}
int
dht_attr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, struct iatt *stbuf)
+ int op_ret, int op_errno, struct iatt *stbuf, dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = 0;
@@ -257,14 +256,14 @@ out:
this_call_cnt = dht_frame_return (frame);
if (is_last_call (this_call_cnt)) {
DHT_STACK_UNWIND (stat, frame, local->op_ret, local->op_errno,
- &local->stbuf);
+ &local->stbuf, xdata);
}
err:
return 0;
}
int
-dht_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
+dht_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -300,7 +299,7 @@ dht_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
subvol = local->cached_subvol;
STACK_WIND (frame, dht_file_attr_cbk, subvol,
- subvol->fops->stat, loc);
+ subvol->fops->stat, loc, xdata);
return 0;
}
@@ -312,21 +311,21 @@ dht_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
STACK_WIND (frame, dht_attr_cbk,
subvol, subvol->fops->stat,
- loc);
+ loc, xdata);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (stat, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (stat, frame, -1, op_errno, NULL, NULL);
return 0;
}
int
-dht_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
+dht_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -360,7 +359,7 @@ dht_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
subvol = local->cached_subvol;
STACK_WIND (frame, dht_file_attr_cbk, subvol,
- subvol->fops->fstat, fd);
+ subvol->fops->fstat, fd, xdata);
return 0;
}
@@ -371,14 +370,14 @@ dht_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
subvol = layout->list[i].xlator;
STACK_WIND (frame, dht_attr_cbk,
subvol, subvol->fops->fstat,
- fd);
+ fd, xdata);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (fstat, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (fstat, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -387,7 +386,7 @@ int
dht_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno,
struct iovec *vector, int count, struct iatt *stbuf,
- struct iobref *iobref)
+ struct iobref *iobref, dict_t *xdata)
{
dht_local_t *local = NULL;
int ret = 0;
@@ -424,7 +423,7 @@ dht_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
DHT_STRIP_PHASE1_FLAGS (stbuf);
DHT_STACK_UNWIND (readv, frame, op_ret, op_errno, vector, count, stbuf,
- iobref);
+ iobref, xdata);
return 0;
}
@@ -449,18 +448,18 @@ dht_readv2 (xlator_t *this, call_frame_t *frame, int op_ret)
STACK_WIND (frame, dht_readv_cbk, subvol, subvol->fops->readv,
local->fd, local->rebalance.size, local->rebalance.offset,
- local->rebalance.flags);
+ local->rebalance.flags, NULL);
return 0;
out:
- DHT_STACK_UNWIND (readv, frame, -1, op_errno, NULL, 0, NULL, NULL);
+ DHT_STACK_UNWIND (readv, frame, -1, op_errno, NULL, 0, NULL, NULL, NULL);
return 0;
}
int
dht_readv (call_frame_t *frame, xlator_t *this,
- fd_t *fd, size_t size, off_t off, uint32_t flags)
+ fd_t *fd, size_t size, off_t off, uint32_t flags, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -491,20 +490,20 @@ dht_readv (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_readv_cbk,
subvol, subvol->fops->readv,
- fd, size, off, flags);
+ fd, size, off, flags, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (readv, frame, -1, op_errno, NULL, 0, NULL, NULL);
+ DHT_STACK_UNWIND (readv, frame, -1, op_errno, NULL, 0, NULL, NULL, NULL);
return 0;
}
int
dht_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
int ret = -1;
dht_local_t *local = NULL;
@@ -523,7 +522,7 @@ dht_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
out:
- DHT_STACK_UNWIND (access, frame, op_ret, op_errno);
+ DHT_STACK_UNWIND (access, frame, op_ret, op_errno, xdata);
return 0;
}
@@ -546,18 +545,19 @@ dht_access2 (xlator_t *this, call_frame_t *frame, int op_ret)
subvol = local->cached_subvol;
STACK_WIND (frame, dht_access_cbk, subvol, subvol->fops->access,
- &local->loc, local->rebalance.flags);
+ &local->loc, local->rebalance.flags, NULL);
return 0;
out:
- DHT_STACK_UNWIND (access, frame, -1, op_errno);
+ DHT_STACK_UNWIND (access, frame, -1, op_errno, NULL);
return 0;
}
int
-dht_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask)
+dht_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask,
+ dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -586,13 +586,13 @@ dht_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask)
}
STACK_WIND (frame, dht_access_cbk, subvol, subvol->fops->access,
- loc, mask);
+ loc, mask, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (access, frame, -1, op_errno);
+ DHT_STACK_UNWIND (access, frame, -1, op_errno, NULL);
return 0;
}
@@ -600,7 +600,7 @@ err:
int
dht_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
dht_local_t *local = NULL;
int ret = -1;
@@ -620,7 +620,7 @@ dht_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
out:
- DHT_STACK_UNWIND (flush, frame, op_ret, op_errno);
+ DHT_STACK_UNWIND (flush, frame, op_ret, op_errno, xdata);
return 0;
}
@@ -645,20 +645,19 @@ dht_flush2 (xlator_t *this, call_frame_t *frame, int op_ret)
local->call_cnt = 2; /* This is the second attempt */
STACK_WIND (frame, dht_flush_cbk,
- subvol, subvol->fops->flush, local->fd);
+ subvol, subvol->fops->flush, local->fd, NULL);
return 0;
}
int
-dht_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
+dht_flush (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
dht_local_t *local = NULL;
-
VALIDATE_OR_GOTO (frame, err);
VALIDATE_OR_GOTO (this, err);
VALIDATE_OR_GOTO (fd, err);
@@ -680,13 +679,13 @@ dht_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
local->call_cnt = 1;
STACK_WIND (frame, dht_flush_cbk,
- subvol, subvol->fops->flush, fd);
+ subvol, subvol->fops->flush, fd, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (flush, frame, -1, op_errno);
+ DHT_STACK_UNWIND (flush, frame, -1, op_errno, NULL);
return 0;
}
@@ -694,7 +693,8 @@ err:
int
dht_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret,
- int op_errno, struct iatt *prebuf, struct iatt *postbuf)
+ int op_errno, struct iatt *prebuf, struct iatt *postbuf,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -745,7 +745,7 @@ out:
DHT_STRIP_PHASE1_FLAGS (postbuf);
DHT_STRIP_PHASE1_FLAGS (prebuf);
DHT_STACK_UNWIND (fsync, frame, op_ret, op_errno,
- prebuf, postbuf);
+ prebuf, postbuf, xdata);
return 0;
}
@@ -770,19 +770,19 @@ dht_fsync2 (xlator_t *this, call_frame_t *frame, int op_ret)
local->call_cnt = 2; /* This is the second attempt */
STACK_WIND (frame, dht_fsync_cbk, subvol, subvol->fops->fsync,
- local->fd, local->rebalance.flags);
+ local->fd, local->rebalance.flags, NULL);
return 0;
}
int
-dht_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync)
+dht_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync,
+ dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
dht_local_t *local = NULL;
-
VALIDATE_OR_GOTO (frame, err);
VALIDATE_OR_GOTO (this, err);
VALIDATE_OR_GOTO (fd, err);
@@ -800,13 +800,13 @@ dht_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync)
subvol = local->cached_subvol;
STACK_WIND (frame, dht_fsync_cbk, subvol, subvol->fops->fsync,
- fd, datasync);
+ fd, datasync, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (fsync, frame, -1, op_errno, NULL, NULL);
+ DHT_STACK_UNWIND (fsync, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
@@ -817,9 +817,9 @@ err:
phase 2 of migration */
int
dht_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, struct gf_flock *flock)
+ int op_ret, int op_errno, struct gf_flock *flock, dict_t *xdata)
{
- DHT_STACK_UNWIND (lk, frame, op_ret, op_errno, flock);
+ DHT_STACK_UNWIND (lk, frame, op_ret, op_errno, flock, xdata);
return 0;
}
@@ -827,7 +827,7 @@ dht_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
dht_lk (call_frame_t *frame, xlator_t *this,
- fd_t *fd, int cmd, struct gf_flock *flock)
+ fd_t *fd, int cmd, struct gf_flock *flock, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -847,13 +847,13 @@ dht_lk (call_frame_t *frame, xlator_t *this,
/* TODO: for rebalance, we need to preserve the fop arguments */
STACK_WIND (frame, dht_lk_cbk, subvol, subvol->fops->lk, fd,
- cmd, flock);
+ cmd, flock, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (lk, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (lk, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -861,7 +861,8 @@ err:
/* Symlinks are currently not migrated, so no need for any check here */
int
dht_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, const char *path, struct iatt *stbuf)
+ int op_ret, int op_errno, const char *path,
+ struct iatt *stbuf, dict_t *xdata)
{
dht_local_t *local = NULL;
@@ -876,14 +877,15 @@ dht_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
err:
DHT_STRIP_PHASE1_FLAGS (stbuf);
- DHT_STACK_UNWIND (readlink, frame, op_ret, op_errno, path, stbuf);
+ DHT_STACK_UNWIND (readlink, frame, op_ret, op_errno, path, stbuf, xdata);
return 0;
}
int
-dht_readlink (call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size)
+dht_readlink (call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size,
+ dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -911,13 +913,13 @@ dht_readlink (call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size)
STACK_WIND (frame, dht_readlink_cbk,
subvol, subvol->fops->readlink,
- loc, size);
+ loc, size, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (readlink, frame, -1, op_errno, NULL, NULL);
+ DHT_STACK_UNWIND (readlink, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
@@ -928,16 +930,16 @@ err:
int
dht_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *dict)
+ int32_t op_ret, int32_t op_errno, dict_t *dict, dict_t *xdata)
{
- DHT_STACK_UNWIND (xattrop, frame, op_ret, op_errno, dict);
+ DHT_STACK_UNWIND (xattrop, frame, op_ret, op_errno, dict, xdata);
return 0;
}
int
dht_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc,
- gf_xattrop_flags_t flags, dict_t *dict)
+ gf_xattrop_flags_t flags, dict_t *dict, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -968,13 +970,13 @@ dht_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc,
STACK_WIND (frame,
dht_xattrop_cbk,
subvol, subvol->fops->xattrop,
- loc, flags, dict);
+ loc, flags, dict, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (xattrop, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (xattrop, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -982,16 +984,16 @@ err:
int
dht_fxattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dict_t *dict)
+ int32_t op_ret, int32_t op_errno, dict_t *dict, dict_t *xdata)
{
- DHT_STACK_UNWIND (fxattrop, frame, op_ret, op_errno, dict);
+ DHT_STACK_UNWIND (fxattrop, frame, op_ret, op_errno, dict, xdata);
return 0;
}
int
dht_fxattrop (call_frame_t *frame, xlator_t *this,
- fd_t *fd, gf_xattrop_flags_t flags, dict_t *dict)
+ fd_t *fd, gf_xattrop_flags_t flags, dict_t *dict, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -1011,13 +1013,13 @@ dht_fxattrop (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame,
dht_fxattrop_cbk,
subvol, subvol->fops->fxattrop,
- fd, flags, dict);
+ fd, flags, dict, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (fxattrop, frame, -1, op_errno, NULL);
+ DHT_STACK_UNWIND (fxattrop, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -1025,17 +1027,17 @@ err:
int
dht_inodelk_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int32_t op_ret, int32_t op_errno)
+ xlator_t *this, int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
- DHT_STACK_UNWIND (inodelk, frame, op_ret, op_errno);
+ DHT_STACK_UNWIND (inodelk, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
-dht_inodelk (call_frame_t *frame, xlator_t *this,
- const char *volume, loc_t *loc, int32_t cmd, struct gf_flock *lock)
+dht_inodelk (call_frame_t *frame, xlator_t *this, const char *volume,
+ loc_t *loc, int32_t cmd, struct gf_flock *lock, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -1067,31 +1069,31 @@ dht_inodelk (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame,
dht_inodelk_cbk,
subvol, subvol->fops->inodelk,
- volume, loc, cmd, lock);
+ volume, loc, cmd, lock, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (inodelk, frame, -1, op_errno);
+ DHT_STACK_UNWIND (inodelk, frame, -1, op_errno, NULL);
return 0;
}
int
-dht_finodelk_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int32_t op_ret, int32_t op_errno)
+dht_finodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
+ int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
- DHT_STACK_UNWIND (finodelk, frame, op_ret, op_errno);
+ DHT_STACK_UNWIND (finodelk, frame, op_ret, op_errno, xdata);
return 0;
}
int
-dht_finodelk (call_frame_t *frame, xlator_t *this,
- const char *volume, fd_t *fd, int32_t cmd, struct gf_flock *lock)
+dht_finodelk (call_frame_t *frame, xlator_t *this, const char *volume,
+ fd_t *fd, int32_t cmd, struct gf_flock *lock, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -1109,16 +1111,14 @@ dht_finodelk (call_frame_t *frame, xlator_t *this,
}
- STACK_WIND (frame,
- dht_finodelk_cbk,
- subvol, subvol->fops->finodelk,
- volume, fd, cmd, lock);
+ STACK_WIND (frame, dht_finodelk_cbk, subvol, subvol->fops->finodelk,
+ volume, fd, cmd, lock, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (finodelk, frame, -1, op_errno);
+ DHT_STACK_UNWIND (finodelk, frame, -1, op_errno, NULL);
return 0;
}
diff --git a/xlators/cluster/dht/src/dht-inode-write.c b/xlators/cluster/dht/src/dht-inode-write.c
index 2f59e7c..5561ad0 100644
--- a/xlators/cluster/dht/src/dht-inode-write.c
+++ b/xlators/cluster/dht/src/dht-inode-write.c
@@ -32,7 +32,7 @@ int dht_setattr2 (xlator_t *this, call_frame_t *frame, int ret);
int
dht_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
dht_local_t *local = NULL;
int ret = -1;
@@ -85,7 +85,8 @@ out:
DHT_STRIP_PHASE1_FLAGS (postbuf);
DHT_STRIP_PHASE1_FLAGS (prebuf);
- DHT_STACK_UNWIND (writev, frame, op_ret, op_errno, prebuf, postbuf);
+ DHT_STACK_UNWIND (writev, frame, op_ret, op_errno, prebuf, postbuf,
+ xdata);
return 0;
}
@@ -113,7 +114,7 @@ dht_writev2 (xlator_t *this, call_frame_t *frame, int op_ret)
subvol, subvol->fops->writev,
local->fd, local->rebalance.vector, local->rebalance.count,
local->rebalance.offset, local->rebalance.flags,
- local->rebalance.iobref);
+ local->rebalance.iobref, NULL);
return 0;
}
@@ -121,7 +122,7 @@ dht_writev2 (xlator_t *this, call_frame_t *frame, int op_ret)
int
dht_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
struct iovec *vector, int count, off_t off, uint32_t flags,
- struct iobref *iobref)
+ struct iobref *iobref, dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -156,13 +157,13 @@ dht_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, dht_writev_cbk,
subvol, subvol->fops->writev,
- fd, vector, count, off, flags, iobref);
+ fd, vector, count, off, flags, iobref, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (writev, frame, -1, op_errno, NULL, NULL);
+ DHT_STACK_UNWIND (writev, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
@@ -172,7 +173,7 @@ err:
int
dht_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -231,7 +232,7 @@ out:
DHT_STRIP_PHASE1_FLAGS (postbuf);
DHT_STRIP_PHASE1_FLAGS (prebuf);
DHT_STACK_UNWIND (truncate, frame, op_ret, op_errno,
- prebuf, postbuf);
+ prebuf, postbuf, xdata);
err:
return 0;
}
@@ -260,18 +261,19 @@ dht_truncate2 (xlator_t *this, call_frame_t *frame, int op_ret)
if (local->fop == GF_FOP_TRUNCATE) {
STACK_WIND (frame, dht_truncate_cbk, subvol,
subvol->fops->truncate, &local->loc,
- local->rebalance.offset);
+ local->rebalance.offset, NULL);
} else {
STACK_WIND (frame, dht_truncate_cbk, subvol,
subvol->fops->ftruncate, local->fd,
- local->rebalance.offset);
+ local->rebalance.offset, NULL);
}
return 0;
}
int
-dht_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
+dht_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset,
+ dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -301,19 +303,20 @@ dht_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
STACK_WIND (frame, dht_truncate_cbk,
subvol, subvol->fops->truncate,
- loc, offset);
+ loc, offset, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (truncate, frame, -1, op_errno, NULL, NULL);
+ DHT_STACK_UNWIND (truncate, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
int
-dht_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
+dht_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
+ dict_t *xdata)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -341,13 +344,13 @@ dht_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
STACK_WIND (frame, dht_truncate_cbk,
subvol, subvol->fops->ftruncate,
- fd, offset);
+ fd, offset, xdata);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (ftruncate, frame, -1, op_errno, NULL, NULL);
+ DHT_STACK_UNWIND (ftruncate, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
@@ -356,7 +359,7 @@ err:
int
dht_file_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *prebuf,
- struct iatt *postbuf)
+ struct iatt *postbuf, dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -393,7 +396,7 @@ out:
DHT_STRIP_PHASE1_FLAGS (postbuf);
DHT_STRIP_PHASE1_FLAGS (prebuf);
DHT_STACK_UNWIND (setattr, frame, op_ret, op_errno,
- prebuf, postbuf);
+ prebuf, postbuf, xdata);
return 0;
}
@@ -421,11 +424,13 @@ dht_setattr2 (xlator_t *this, call_frame_t *frame, int op_ret)
if (local->fop == GF_FOP_SETATTR) {
STACK_WIND (frame, dht_file_setattr_cbk, subvol,
subvol->fops->setattr, &local->loc,
- &local->rebalance.stbuf, local->rebalance.flags);
+ &local->rebalance.stbuf, local->rebalance.flags,
+ NULL);
} else {
STACK_WIND (frame, dht_file_setattr_cbk, subvol,
subvol->fops->fsetattr, local->fd,
- &local->rebalance.stbuf, local->rebalance.flags);
+ &local->rebalance.stbuf, local->rebalance.flags,
+ NULL);
}
return 0;
@@ -436,7 +441,7 @@ dht_setattr2 (xlator_t *this, call_frame_t *frame, int op_ret)
int
dht_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *statpre,
- struct iatt *statpost)
+ struct iatt *statpost, dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = 0;
@@ -467,7 +472,7 @@ unlock:
this_call_cnt = dht_frame_return (frame);
if (is_last_call (this_call_cnt))
DHT_STACK_UNWIND (setattr, frame, local->op_ret, local->op_errno,
- &local->prebuf, &local->stbuf);
+ &local->prebuf, &local->stbuf, xdata);
return 0;
}
@@ -475,7 +480,7 @@ unlock:
int
dht_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
- struct iatt *stbuf, int32_t valid)
+ struct iatt *stbuf, int32_t valid, dict_t *xdata)
{
xlator_t *subvol = NULL;
dht_layout_t *layout = NULL;
@@ -521,7 +526,7 @@ dht_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
STACK_WIND (frame, dht_file_setattr_cbk, subvol,
subvol->fops->setattr,
- loc, stbuf, valid);
+ loc, stbuf, valid, xdata);
return 0;
}
@@ -532,14 +537,14 @@ dht_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
STACK_WIND (frame, dht_setattr_cbk,
layout->list[i].xlator,
layout->list[i].xlator->fops->setattr,
- loc, stbuf, valid);
+ loc, stbuf, valid, xdata);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (setattr, frame, -1, op_errno, NULL, NULL);
+ DHT_STACK_UNWIND (setattr, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
@@ -547,7 +552,7 @@ err:
int
dht_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iatt *stbuf,
- int32_t valid)
+ int32_t valid, dict_t *xdata)
{
xlator_t *subvol = NULL;
dht_layout_t *layout = NULL;
@@ -592,7 +597,7 @@ dht_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iatt *stbuf,
STACK_WIND (frame, dht_file_setattr_cbk, subvol,
subvol->fops->fsetattr,
- fd, stbuf, valid);
+ fd, stbuf, valid, xdata);
return 0;
}
@@ -603,14 +608,14 @@ dht_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iatt *stbuf,
STACK_WIND (frame, dht_setattr_cbk,
layout->list[i].xlator,
layout->list[i].xlator->fops->fsetattr,
- fd, stbuf, valid);
+ fd, stbuf, valid, xdata);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (fsetattr, frame, -1, op_errno, NULL, NULL);
+ DHT_STACK_UNWIND (fsetattr, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c
index d8ce49d..acdd249 100644
--- a/xlators/cluster/dht/src/dht-linkfile.c
+++ b/xlators/cluster/dht/src/dht-linkfile.c
@@ -34,14 +34,15 @@ int
dht_linkfile_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, inode_t *inode,
struct iatt *stbuf, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
dht_local_t *local = NULL;
local = frame->local;
local->linkfile.linkfile_cbk (frame, cookie, this, op_ret, op_errno,
- inode, stbuf, preparent, postparent);
+ inode, stbuf, preparent, postparent,
+ xdata);
return 0;
}
@@ -91,7 +92,7 @@ dht_linkfile_create (call_frame_t *frame, fop_mknod_cbk_t linkfile_cbk,
STACK_WIND (frame, dht_linkfile_create_cbk,
fromvol, fromvol->fops->mknod, loc,
- S_IFREG | DHT_LINKFILE_MODE, 0, dict);
+ S_IFREG | DHT_LINKFILE_MODE, 0, 0, dict);
if (need_unref && dict)
dict_unref (dict);
@@ -99,7 +100,7 @@ dht_linkfile_create (call_frame_t *frame, fop_mknod_cbk_t linkfile_cbk,
return 0;
out:
local->linkfile.linkfile_cbk (frame, NULL, frame->this, -1, ENOMEM,
- loc->inode, NULL, NULL, NULL);
+ loc->inode, NULL, NULL, NULL, NULL);
if (need_unref && dict)
dict_unref (dict);
@@ -111,7 +112,8 @@ out:
int
dht_linkfile_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -155,7 +157,7 @@ dht_linkfile_unlink (call_frame_t *frame, xlator_t *this,
STACK_WIND (unlink_frame, dht_linkfile_unlink_cbk,
subvol, subvol->fops->unlink,
- &unlink_local->loc);
+ &unlink_local->loc, 0, NULL);
return 0;
err:
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index eaf5e89..783d153 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -936,7 +936,7 @@ rebalance_task_completion (int op_ret, call_frame_t *sync_frame, void *data)
op_errno = EPERM;
}
- DHT_STACK_UNWIND (setxattr, sync_frame, op_ret, op_errno);
+ DHT_STACK_UNWIND (setxattr, sync_frame, op_ret, op_errno, NULL);
return 0;
}
diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c
index fa06de7..af8f507 100644
--- a/xlators/cluster/dht/src/dht-rename.c
+++ b/xlators/cluster/dht/src/dht-rename.c
@@ -35,7 +35,8 @@ int
dht_rename_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *stbuf,
struct iatt *preoldparent, struct iatt *postoldparent,
- struct iatt *prenewparent, struct iatt *postnewparent)
+ struct iatt *prenewparent, struct iatt *postnewparent,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = 0;
@@ -84,7 +85,7 @@ unwind:
DHT_STACK_UNWIND (rename, frame, local->op_ret, local->op_errno,
&local->stbuf, &local->preoldparent,
&local->postoldparent,
- &local->preparent, &local->postparent);
+ &local->preparent, &local->postparent, xdata);
}
return 0;
@@ -97,7 +98,7 @@ dht_rename_hashed_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
struct iatt *preoldparent,
struct iatt *postoldparent,
struct iatt *prenewparent,
- struct iatt *postnewparent)
+ struct iatt *postnewparent, dict_t *xdata)
{
dht_conf_t *conf = NULL;
dht_local_t *local = NULL;
@@ -147,7 +148,7 @@ dht_rename_hashed_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
STACK_WIND (frame, dht_rename_dir_cbk,
conf->subvolumes[i],
conf->subvolumes[i]->fops->rename,
- &local->loc, &local->loc2);
+ &local->loc, &local->loc2, NULL);
if (!--call_cnt)
break;
}
@@ -164,7 +165,7 @@ unwind:
DHT_STACK_UNWIND (rename, frame, local->op_ret, local->op_errno,
&local->stbuf, &local->preoldparent,
&local->postoldparent,
- &local->preparent, &local->postparent);
+ &local->preparent, &local->postparent, NULL);
return 0;
}
@@ -185,19 +186,20 @@ dht_rename_dir_do (call_frame_t *frame, xlator_t *this)
STACK_WIND (frame, dht_rename_hashed_dir_cbk,
local->dst_hashed,
local->dst_hashed->fops->rename,
- &local->loc, &local->loc2);
+ &local->loc, &local->loc2, NULL);
return 0;
err:
DHT_STACK_UNWIND (rename, frame, local->op_ret, local->op_errno, NULL, NULL,
- NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL);
return 0;
}
int
dht_rename_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, gf_dirent_t *entries)
+ int op_ret, int op_errno, gf_dirent_t *entries,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = -1;
@@ -226,7 +228,7 @@ dht_rename_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
dht_rename_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, fd_t *fd)
+ int op_ret, int op_errno, fd_t *fd, dict_t *xdata)
{
dht_local_t *local = NULL;
int this_call_cnt = -1;
@@ -246,7 +248,7 @@ dht_rename_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
STACK_WIND (frame, dht_rename_readdir_cbk,
prev->this, prev->this->fops->readdir,
- local->fd, 4096, 0);
+ local->fd, 4096, 0, NULL);
return 0;
@@ -302,14 +304,15 @@ dht_rename_dir (call_frame_t *frame, xlator_t *this)
STACK_WIND (frame, dht_rename_opendir_cbk,
conf->subvolumes[i],
conf->subvolumes[i]->fops->opendir,
- &local->loc2, local->fd);
+ &local->loc2, local->fd, NULL);
}
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (rename, frame, -1, op_errno, NULL, NULL, NULL, NULL, NULL);
+ DHT_STACK_UNWIND (rename, frame, -1, op_errno, NULL, NULL, NULL, NULL,
+ NULL, NULL);
return 0;
}
@@ -317,7 +320,7 @@ err:
int
dht_rename_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -350,7 +353,7 @@ dht_rename_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
DHT_STACK_UNWIND (rename, frame, local->op_ret, local->op_errno,
&local->stbuf, &local->preoldparent,
&local->postoldparent, &local->preparent,
- &local->postparent);
+ &local->postparent, NULL);
}
out:
@@ -398,7 +401,7 @@ dht_rename_cleanup (call_frame_t *frame)
local->loc.path, dst_hashed->name, src_cached->name);
STACK_WIND (frame, dht_rename_unlink_cbk,
dst_hashed, dst_hashed->fops->unlink,
- &local->loc);
+ &local->loc, 0, NULL);
}
if (src_cached != dst_hashed) {
@@ -407,7 +410,7 @@ dht_rename_cleanup (call_frame_t *frame)
local->loc2.path, src_cached->name);
STACK_WIND (frame, dht_rename_unlink_cbk,
src_cached, src_cached->fops->unlink,
- &local->loc2);
+ &local->loc2, 0, NULL);
}
return 0;
@@ -422,7 +425,7 @@ nolinks:
DHT_STACK_UNWIND (rename, frame, local->op_ret, local->op_errno,
&local->stbuf, &local->preoldparent,
&local->postoldparent, &local->preparent,
- &local->postparent);
+ &local->postparent, NULL);
return 0;
}
@@ -430,9 +433,10 @@ nolinks:
int
dht_rename_links_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno,
- inode_t *inode, struct iatt *stbuf,
- struct iatt *preparent, struct iatt *postparent)
+ int32_t op_ret, int32_t op_errno,
+ inode_t *inode, struct iatt *stbuf,
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
call_frame_t *prev = NULL;
dht_local_t *local = NULL;
@@ -456,7 +460,8 @@ int
dht_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *stbuf,
struct iatt *preoldparent, struct iatt *postoldparent,
- struct iatt *prenewparent, struct iatt *postnewparent)
+ struct iatt *prenewparent, struct iatt *postnewparent,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -545,7 +550,7 @@ err:
STACK_WIND (frame, dht_rename_unlink_cbk,
src_cached, src_cached->fops->unlink,
- &local->loc);
+ &local->loc, 0, NULL);
}
if (src_hashed != rename_subvol && src_hashed != src_cached) {
@@ -555,7 +560,7 @@ err:
STACK_WIND (frame, dht_rename_unlink_cbk,
src_hashed, src_hashed->fops->unlink,
- &local->loc);
+ &local->loc, 0, NULL);
}
if (dst_cached
@@ -567,7 +572,7 @@ err:
STACK_WIND (frame, dht_rename_unlink_cbk,
dst_cached, dst_cached->fops->unlink,
- &local->loc2);
+ &local->loc2, 0, NULL);
}
return 0;
@@ -581,7 +586,7 @@ unwind:
DHT_STACK_UNWIND (rename, frame, local->op_ret, local->op_errno,
&local->stbuf, &local->preoldparent,
&local->postoldparent, &local->preparent,
- &local->postparent);
+ &local->postparent, NULL);
return 0;
@@ -621,7 +626,7 @@ dht_do_rename (call_frame_t *frame)
STACK_WIND (frame, dht_rename_cbk,
rename_subvol, rename_subvol->fops->rename,
- &local->loc, &local->loc2);
+ &local->loc, &local->loc2, NULL);
return 0;
}
@@ -631,7 +636,8 @@ int
dht_rename_links_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
inode_t *inode, struct iatt *stbuf,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -670,7 +676,8 @@ cleanup:
int
dht_rename_unlink_links_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -733,7 +740,7 @@ dht_rename_create_links (call_frame_t *frame)
STACK_WIND (frame, dht_rename_unlink_links_cbk,
dst_hashed, dst_hashed->fops->unlink,
- &local->loc2);
+ &local->loc2, 0, NULL);
return 0;
}
@@ -760,7 +767,7 @@ dht_rename_create_links (call_frame_t *frame)
local->loc2.path, src_cached->name);
STACK_WIND (frame, dht_rename_links_cbk,
src_cached, src_cached->fops->link,
- &local->loc, &local->loc2);
+ &local->loc, &local->loc2, NULL);
}
nolinks:
@@ -775,7 +782,7 @@ nolinks:
int
dht_rename (call_frame_t *frame, xlator_t *this,
- loc_t *oldloc, loc_t *newloc)
+ loc_t *oldloc, loc_t *newloc, dict_t *xdata)
{
xlator_t *src_cached = NULL;
xlator_t *src_hashed = NULL;
@@ -857,7 +864,8 @@ dht_rename (call_frame_t *frame, xlator_t *this,
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (rename, frame, -1, op_errno, NULL, NULL, NULL, NULL, NULL);
+ DHT_STACK_UNWIND (rename, frame, -1, op_errno, NULL, NULL, NULL, NULL,
+ NULL, NULL);
return 0;
}
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index 6f6d026..2ca3402 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -82,7 +82,7 @@ dht_selfheal_dir_finish (call_frame_t *frame, xlator_t *this, int ret)
local = frame->local;
local->selfheal.dir_cbk (frame, NULL, frame->this, ret,
- local->op_errno);
+ local->op_errno, NULL);
return 0;
}
@@ -90,7 +90,7 @@ dht_selfheal_dir_finish (call_frame_t *frame, xlator_t *this, int ret)
int
dht_selfheal_dir_xattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno)
+ int op_ret, int op_errno, dict_t *xdata)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
@@ -183,7 +183,7 @@ dht_selfheal_dir_xattr_persubvol (call_frame_t *frame, loc_t *loc,
STACK_WIND (frame, dht_selfheal_dir_xattr_cbk,
subvol, subvol->fops->setxattr,
- loc, xattr, 0);
+ loc, xattr, 0, NULL);
dict_unref (xattr);
@@ -197,7 +197,7 @@ err:
GF_FREE (disk_layout);
dht_selfheal_dir_xattr_cbk (frame, subvol, frame->this,
- -1, ENOMEM);
+ -1, ENOMEM, NULL);
return 0;
}
@@ -275,7 +275,7 @@ dht_selfheal_dir_xattr (call_frame_t *frame, loc_t *loc, dht_layout_t *layout)
int
dht_selfheal_dir_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, struct iatt *statpre,
- struct iatt *statpost)
+ struct iatt *statpost, dict_t *xdata)
{
dht_local_t *local = NULL;
dht_layout_t *layout = NULL;
@@ -329,7 +329,7 @@ dht_selfheal_dir_setattr (call_frame_t *frame, loc_t *loc, struct iatt *stbuf,
STACK_WIND (frame, dht_selfheal_dir_setattr_cbk,
layout->list[i].xlator,
layout->list[i].xlator->fops->setattr,
- loc, stbuf, valid);
+ loc, stbuf, valid, NULL);
}
}
@@ -340,7 +340,8 @@ int
dht_selfheal_dir_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno,
inode_t *inode, struct iatt *stbuf,
- struct iatt *preparent, struct iatt *postparent)
+ struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
dht_local_t *local = NULL;
dht_layout_t *layout = NULL;
@@ -442,7 +443,7 @@ dht_selfheal_dir_mkdir (call_frame_t *frame, loc_t *loc,
loc,
st_mode_from_ia (local->stbuf.ia_prot,
local->stbuf.ia_type),
- dict);
+ 0, dict);
}
}
diff --git a/xlators/cluster/dht/src/nufa.c b/xlators/cluster/dht/src/nufa.c
index 951fe4e..56ee129 100644
--- a/xlators/cluster/dht/src/nufa.c
+++ b/xlators/cluster/dht/src/nufa.c
@@ -44,7 +44,6 @@ nufa_local_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int call_cnt = 0;
int ret = 0;
-
conf = this->private;
prev = cookie;
@@ -141,7 +140,7 @@ out:
err:
DHT_STACK_UNWIND (lookup, frame, op_ret, op_errno,
- inode, stbuf, xattr, NULL);
+ inode, stbuf, xattr, postparent);
return 0;
}
@@ -260,7 +259,8 @@ nufa_lookup (call_frame_t *frame, xlator_t *this,
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (lookup, frame, -1, op_errno, NULL, NULL, NULL, NULL);
+ DHT_STACK_UNWIND (lookup, frame, -1, op_errno, NULL, NULL, NULL,
+ NULL);
return 0;
}
@@ -269,7 +269,7 @@ nufa_create_linkfile_create_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int op_ret, int op_errno,
inode_t *inode, struct iatt *stbuf,
struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
dht_local_t *local = NULL;
@@ -280,21 +280,21 @@ nufa_create_linkfile_create_cbk (call_frame_t *frame, void *cookie,
STACK_WIND (frame, dht_create_cbk,
local->cached_subvol, local->cached_subvol->fops->create,
- &local->loc, local->flags, local->mode, local->fd,
- local->params);
+ &local->loc, local->flags, local->mode, local->umask,
+ local->fd, local->params);
return 0;
err:
DHT_STACK_UNWIND (create, frame, -1, op_errno,
- NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL, NULL);
return 0;
}
int
nufa_create (call_frame_t *frame, xlator_t *this,
loc_t *loc, int32_t flags, mode_t mode,
- fd_t *fd, dict_t *params)
+ mode_t umask, fd_t *fd, dict_t *params)
{
dht_local_t *local = NULL;
dht_conf_t *conf = NULL;
@@ -337,7 +337,7 @@ nufa_create (call_frame_t *frame, xlator_t *this,
local->params = dict_ref (params);
local->mode = mode;
local->flags = flags;
-
+ local->umask = umask;
local->cached_subvol = avail_subvol;
dht_linkfile_create (frame,
nufa_create_linkfile_create_cbk,
@@ -350,14 +350,14 @@ nufa_create (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_create_cbk,
subvol, subvol->fops->create,
- loc, flags, mode, fd, params);
+ loc, flags, mode, umask, fd, params);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
DHT_STACK_UNWIND (create, frame, -1, op_errno,
- NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL, NULL);
return 0;
}
@@ -366,7 +366,7 @@ int
nufa_mknod_linkfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, inode_t *inode,
struct iatt *stbuf, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
dht_local_t *local = NULL;
@@ -377,7 +377,7 @@ nufa_mknod_linkfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local->cached_subvol,
local->cached_subvol->fops->mknod,
&local->loc, local->mode, local->rdev,
- local->params);
+ local->umask, local->params);
return 0;
}
@@ -386,14 +386,14 @@ nufa_mknod_linkfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
WIPE (preparent);
DHT_STACK_UNWIND (link, frame, op_ret, op_errno,
- inode, stbuf, preparent, postparent);
+ inode, stbuf, preparent, postparent, xdata);
return 0;
}
int
nufa_mknod (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dev_t rdev, dict_t *params)
+ loc_t *loc, mode_t mode, dev_t rdev, mode_t umask, dict_t *params)
{
dht_local_t *local = NULL;
dht_conf_t *conf = NULL;
@@ -437,6 +437,7 @@ nufa_mknod (call_frame_t *frame, xlator_t *this,
local->params = dict_ref (params);
local->mode = mode;
+ local->umask = umask;
local->rdev = rdev;
local->cached_subvol = avail_subvol;
@@ -450,14 +451,14 @@ nufa_mknod (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_newfile_cbk,
subvol, subvol->fops->mknod,
- loc, mode, rdev, params);
+ loc, mode, rdev, umask, params);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
DHT_STACK_UNWIND (mknod, frame, -1, op_errno,
- NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
return 0;
}
diff --git a/xlators/cluster/dht/src/switch.c b/xlators/cluster/dht/src/switch.c
index 1451e01..e129bf0 100644
--- a/xlators/cluster/dht/src/switch.c
+++ b/xlators/cluster/dht/src/switch.c
@@ -366,7 +366,8 @@ switch_lookup (call_frame_t *frame, xlator_t *this,
err:
op_errno = (op_errno == -1) ? errno : op_errno;
- DHT_STACK_UNWIND (lookup, frame, -1, op_errno, NULL, NULL, NULL, NULL);
+ DHT_STACK_UNWIND (lookup, frame, -1, op_errno,
+ NULL, NULL, NULL, NULL);
return 0;
}
@@ -375,7 +376,7 @@ switch_create_linkfile_create_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int op_ret, int op_errno,
inode_t *inode, struct iatt *stbuf,
struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
dht_local_t *local = NULL;
@@ -386,21 +387,21 @@ switch_create_linkfile_create_cbk (call_frame_t *frame, void *cookie,
STACK_WIND (frame, dht_create_cbk,
local->cached_subvol, local->cached_subvol->fops->create,
- &local->loc, local->flags, local->mode, local->fd,
- local->params);
+ &local->loc, local->flags, local->mode, local->umask,
+ local->fd, local->params);
return 0;
err:
DHT_STACK_UNWIND (create, frame, -1, op_errno,
- NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL, NULL);
return 0;
}
int
switch_create (call_frame_t *frame, xlator_t *this,
loc_t *loc, int32_t flags, mode_t mode,
- fd_t *fd, dict_t *params)
+ mode_t umask, fd_t *fd, dict_t *params)
{
dht_local_t *local = NULL;
dht_conf_t *conf = NULL;
@@ -441,7 +442,7 @@ switch_create (call_frame_t *frame, xlator_t *this,
/* create a link file instead of actual file */
local->mode = mode;
local->flags = flags;
-
+ local->umask = umask;
local->cached_subvol = avail_subvol;
dht_linkfile_create (frame,
switch_create_linkfile_create_cbk,
@@ -454,14 +455,14 @@ switch_create (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_create_cbk,
subvol, subvol->fops->create,
- loc, flags, mode, fd, params);
+ loc, flags, mode, umask, fd, params);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
DHT_STACK_UNWIND (create, frame, -1, op_errno,
- NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL, NULL);
return 0;
}
@@ -470,7 +471,7 @@ int
switch_mknod_linkfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, inode_t *inode,
struct iatt *stbuf, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
dht_local_t *local = NULL;
@@ -481,20 +482,20 @@ switch_mknod_linkfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local->cached_subvol,
local->cached_subvol->fops->mknod,
&local->loc, local->mode, local->rdev,
- local->params);
+ local->umask, local->params);
return 0;
}
DHT_STACK_UNWIND (link, frame, op_ret, op_errno,
- inode, stbuf, preparent, postparent);
+ inode, stbuf, preparent, postparent, xdata);
return 0;
}
int
-switch_mknod (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dev_t rdev, dict_t *params)
+switch_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
+ dev_t rdev, mode_t umask, dict_t *params)
{
dht_local_t *local = NULL;
dht_conf_t *conf = NULL;
@@ -537,6 +538,7 @@ switch_mknod (call_frame_t *frame, xlator_t *this,
local->params = dict_ref (params);
local->mode = mode;
+ local->umask = umask;
local->rdev = rdev;
local->cached_subvol = avail_subvol;
@@ -550,14 +552,14 @@ switch_mknod (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, dht_newfile_cbk,
subvol, subvol->fops->mknod,
- loc, mode, rdev, params);
+ loc, mode, rdev, umask, params);
return 0;
err:
op_errno = (op_errno == -1) ? errno : op_errno;
DHT_STACK_UNWIND (mknod, frame, -1, op_errno,
- NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
return 0;
}
diff --git a/xlators/cluster/stripe/src/Makefile.am b/xlators/cluster/stripe/src/Makefile.am
index 0db3c9e..8c48d34 100644
--- a/xlators/cluster/stripe/src/Makefile.am
+++ b/xlators/cluster/stripe/src/Makefile.am
@@ -4,7 +4,9 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/cluster
stripe_la_LDFLAGS = -module -avoidversion
-stripe_la_SOURCES = stripe.c $(top_builddir)/xlators/lib/src/libxlator.c
+stripe_la_SOURCES = stripe.c stripe-helpers.c \
+ $(top_builddir)/xlators/lib/src/libxlator.c
+
stripe_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = stripe.h stripe-mem-types.h $(top_builddir)/xlators/lib/src/libxlator.h
diff --git a/xlators/cluster/stripe/src/stripe-helpers.c b/xlators/cluster/stripe/src/stripe-helpers.c
new file mode 100644
index 0000000..93a97cd
--- /dev/null
+++ b/xlators/cluster/stripe/src/stripe-helpers.c
@@ -0,0 +1,507 @@
+/*
+ Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ This file is part of GlusterFS.
+
+ GlusterFS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ GlusterFS is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see
+ <http://www.gnu.org/licenses/>.
+*/
+
+#include <fnmatch.h>
+
+#include "stripe.h"
+#include "byte-order.h"
+
+void
+stripe_local_wipe (stripe_local_t *local)
+{
+ if (!local)
+ goto out;
+
+ loc_wipe (&local->loc);
+ loc_wipe (&local->loc2);
+
+ if (local->fd)
+ fd_unref (local->fd);
+
+ if (local->inode)
+ inode_unref (local->inode);
+
+ if (local->xattr)
+ dict_unref (local->xattr);
+
+ if (local->xdata)
+ dict_unref (local->xdata);
+
+out:
+ return;
+}
+
+
+
+void
+stripe_aggregate (dict_t *this, char *key, data_t *value, void *data)
+{
+ dict_t *dst = NULL;
+ int64_t *ptr = 0, *size = NULL;
+ int32_t ret = -1;
+
+ dst = data;
+
+ if (strcmp (key, GF_XATTR_QUOTA_SIZE_KEY) == 0) {
+ ret = dict_get_bin (dst, key, (void **)&size);
+ if (ret < 0) {
+ size = GF_CALLOC (1, sizeof (int64_t),
+ gf_common_mt_char);
+ if (size == NULL) {
+ gf_log ("stripe", GF_LOG_WARNING,
+ "memory allocation failed");
+ goto out;
+ }
+ ret = dict_set_bin (dst, key, size, sizeof (int64_t));
+ if (ret < 0) {
+ gf_log ("stripe", GF_LOG_WARNING,
+ "stripe aggregate dict set failed");
+ GF_FREE (size);
+ goto out;
+ }
+ }
+
+ ptr = data_to_bin (value);
+ if (ptr == NULL) {
+ gf_log ("stripe", GF_LOG_WARNING, "data to bin failed");
+ goto out;
+ }
+
+ *size = hton64 (ntoh64 (*size) + ntoh64 (*ptr));
+ } else if (strcmp (key, GF_CONTENT_KEY)) {
+ /* No need to aggregate 'CONTENT' data */
+ ret = dict_set (dst, key, value);
+ if (ret)
+ gf_log ("stripe", GF_LOG_WARNING, "xattr dict set failed");
+ }
+
+out:
+ return;
+}
+
+
+void
+stripe_aggregate_xattr (dict_t *dst, dict_t *src)
+{
+ if ((dst == NULL) || (src == NULL)) {
+ goto out;
+ }
+
+ dict_foreach (src, stripe_aggregate, dst);
+out:
+ return;
+}
+
+
+int32_t
+stripe_xattr_aggregate (char *buffer, stripe_local_t *local, int32_t *total)
+{
+ int32_t i = 0;
+ int32_t ret = -1;
+ int32_t len = 0;
+ char *sbuf = NULL;
+ stripe_xattr_sort_t *xattr = NULL;
+
+ if (!buffer || !local || !local->xattr_list)
+ goto out;
+
+ sbuf = buffer;
+
+ for (i = 0; i < local->nallocs; i++) {
+ xattr = local->xattr_list + i;
+ len = xattr->xattr_len;
+
+ if (len && xattr && xattr->xattr_value) {
+ memcpy (buffer, xattr->xattr_value, len);
+ buffer += len;
+ *buffer++ = ' ';
+ }
+ }
+
+ *--buffer = '\0';
+ if (total)
+ *total = buffer - sbuf;
+ ret = 0;
+
+ out:
+ return ret;
+}
+
+int32_t
+stripe_free_xattr_str (stripe_local_t *local)
+{
+ int32_t i = 0;
+ int32_t ret = -1;
+ stripe_xattr_sort_t *xattr = NULL;
+
+ if (!local || !local->xattr_list)
+ goto out;
+
+ for (i = 0; i < local->nallocs; i++) {
+ xattr = local->xattr_list + i;
+
+ if (xattr && xattr->xattr_value)
+ GF_FREE (xattr->xattr_value);
+ }
+
+ ret = 0;
+ out:
+ return ret;
+}
+
+
+int32_t
+stripe_fill_pathinfo_xattr (xlator_t *this, stripe_local_t *local,
+ char **xattr_serz)
+{
+ int ret = -1;
+ int32_t padding = 0;
+ int32_t tlen = 0;
+ char stripe_size_str[20] = {0,};
+ char *pathinfo_serz = NULL;
+
+ if (!local) {
+ gf_log (this->name, GF_LOG_ERROR, "Possible NULL deref");
+ goto out;
+ }
+
+ (void) snprintf (stripe_size_str, 20, "%ld",
+ (local->fctx) ? local->fctx->stripe_size : 0);
+
+ /* extra bytes for decorations (brackets and <>'s) */
+ padding = strlen (this->name) + strlen (STRIPE_PATHINFO_HEADER)
+ + strlen (stripe_size_str) + 7;
+ local->xattr_total_len += (padding + 2);
+
+ pathinfo_serz = GF_CALLOC (local->xattr_total_len, sizeof (char),
+ gf_common_mt_char);
+ if (!pathinfo_serz)
+ goto out;
+
+ /* xlator info */
+ (void) sprintf (pathinfo_serz, "(<"STRIPE_PATHINFO_HEADER"%s:[%s]> ",
+ this->name, stripe_size_str);
+
+ ret = stripe_xattr_aggregate (pathinfo_serz + padding, local, &tlen);
+ if (ret) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "Cannot aggregate pathinfo list");
+ goto out;
+ }
+
+ *(pathinfo_serz + padding + tlen) = ')';
+ *(pathinfo_serz + padding + tlen + 1) = '\0';
+
+ *xattr_serz = pathinfo_serz;
+
+ ret = 0;
+ out:
+ return ret;
+}
+
+/**
+ * stripe_get_matching_bs - Get the matching block size for the given path.
+ */
+int32_t
+stripe_get_matching_bs (const char *path, stripe_private_t *priv)
+{
+ struct stripe_options *trav = NULL;
+ uint64_t block_size = 0;
+
+ GF_VALIDATE_OR_GOTO ("stripe", priv, out);
+ GF_VALIDATE_OR_GOTO ("stripe", path, out);
+
+ LOCK (&priv->lock);
+ {
+ block_size = priv->block_size;
+ trav = priv->pattern;
+ while (trav) {
+ if (!fnmatch (trav->path_pattern, path, FNM_NOESCAPE)) {
+ block_size = trav->block_size;
+ break;
+ }
+ trav = trav->next;
+ }
+ }
+ UNLOCK (&priv->lock);
+
+out:
+ return block_size;
+}
+
+
+
+int32_t
+stripe_ctx_handle (xlator_t *this, call_frame_t *prev, stripe_local_t *local,
+ dict_t *dict)
+{
+ char key[256] = {0,};
+ data_t *data = NULL;
+ int32_t index = 0;
+ stripe_private_t *priv = NULL;
+ int32_t ret = -1;
+
+ priv = this->private;
+
+
+ if (!local->fctx) {
+ local->fctx = GF_CALLOC (1, sizeof (stripe_fd_ctx_t),
+ gf_stripe_mt_stripe_fd_ctx_t);
+ if (!local->fctx) {
+ local->op_errno = ENOMEM;
+ local->op_ret = -1;
+ goto out;
+ }
+
+ local->fctx->static_array = 0;
+ }
+ /* Stripe block size */
+ sprintf (key, "trusted.%s.stripe-size", this->name);
+ data = dict_get (dict, key);
+ if (!data) {
+ local->xattr_self_heal_needed = 1;
+ gf_log (this->name, GF_LOG_ERROR,
+ "Failed to get stripe-size");
+ goto out;
+ } else {
+ if (!local->fctx->stripe_size) {
+ local->fctx->stripe_size =
+ data_to_int64 (data);
+ }
+
+ if (local->fctx->stripe_size != data_to_int64 (data)) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "stripe-size mismatch in blocks");
+ local->xattr_self_heal_needed = 1;
+ }
+ }
+
+ /* Stripe count */
+ sprintf (key, "trusted.%s.stripe-count", this->name);
+ data = dict_get (dict, key);
+
+ if (!data) {
+ local->xattr_self_heal_needed = 1;
+ gf_log (this->name, GF_LOG_ERROR,
+ "Failed to get stripe-count");
+ goto out;
+ }
+ if (!local->fctx->xl_array) {
+ local->fctx->stripe_count = data_to_int32 (data);
+ if (!local->fctx->stripe_count) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "error with stripe-count xattr");
+ local->op_ret = -1;
+ local->op_errno = EIO;
+ goto out;
+ }
+
+ local->fctx->xl_array = GF_CALLOC (local->fctx->stripe_count,
+ sizeof (xlator_t *),
+ gf_stripe_mt_xlator_t);
+
+ if (!local->fctx->xl_array) {
+ local->op_errno = ENOMEM;
+ local->op_ret = -1;
+ goto out;
+ }
+ }
+ if (local->fctx->stripe_count != data_to_int32 (data)) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "error with stripe-count xattr (%d != %d)",
+ local->fctx->stripe_count, data_to_int32 (data));
+ local->op_ret = -1;
+ local->op_errno = EIO;
+ goto out;
+ }
+
+ /* index */
+ sprintf (key, "trusted.%s.stripe-index", this->name);
+ data = dict_get (dict, key);
+ if (!data) {
+ local->xattr_self_heal_needed = 1;
+ gf_log (this->name, GF_LOG_ERROR,
+ "Failed to get stripe-index");
+ goto out;
+ }
+ index = data_to_int32 (data);
+ if (index > priv->child_count) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "error with stripe-index xattr (%d)", index);
+ local->op_ret = -1;
+ local->op_errno = EIO;
+ goto out;
+ }
+ if (local->fctx->xl_array) {
+ if (!local->fctx->xl_array[index])
+ local->fctx->xl_array[index] = prev->this;
+ }
+ ret = 0;
+out:
+ return ret;
+}
+
+int32_t
+stripe_xattr_request_build (xlator_t *this, dict_t *dict, uint64_t stripe_size,
+ uint32_t stripe_count, uint32_t stripe_index)
+{
+ char key[256] = {0,};
+ int32_t ret = -1;
+
+ sprintf (key, "trusted.%s.stripe-size", this->name);
+ ret = dict_set_int64 (dict, key, stripe_size);
+ if (ret) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "failed to set %s in xattr_req dict", key);
+ goto out;
+ }
+
+ sprintf (key, "trusted.%s.stripe-count", this->name);
+ ret = dict_set_int32 (dict, key, stripe_count);
+ if (ret) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "failed to set %s in xattr_req dict", key);
+ goto out;
+ }
+
+ sprintf (key, "trusted.%s.stripe-index", this->name);
+ ret = dict_set_int32 (dict, key, stripe_index);
+ if (ret) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "failed to set %s in xattr_req dict", key);
+ goto out;
+ }
+out:
+ return ret;
+}
+
+
+static int
+set_default_block_size (stripe_private_t *priv, char *num)
+{
+
+ int ret = -1;
+ GF_VALIDATE_OR_GOTO ("stripe", THIS, out);
+ GF_VALIDATE_OR_GOTO (THIS->name, priv, out);
+ GF_VALIDATE_OR_GOTO (THIS->name, num, out);
+
+
+ if (gf_string2bytesize (num, &priv->block_size) != 0) {
+ gf_log (THIS->name, GF_LOG_ERROR,
+ "invalid number format \"%s\"", num);
+ goto out;
+ }
+
+ ret = 0;
+
+ out:
+ return ret;
+
+}
+
+
+int
+set_stripe_block_size (xlator_t *this, stripe_private_t *priv, char *data)
+{
+ int ret = -1;
+ char *tmp_str = NULL;
+ char *tmp_str1 = NULL;
+ char *dup_str = NULL;
+ char *stripe_str = NULL;
+ char *pattern = NULL;
+ char *num = NULL;
+ struct stripe_options *temp_stripeopt = NULL;
+ struct stripe_options *stripe_opt = NULL;
+
+ if (!this || !priv || !data)
+ goto out;
+
+ /* Get the pattern for striping.
+ "option block-size *avi:10MB" etc */
+ stripe_str = strtok_r (data, ",", &tmp_str);
+ while (stripe_str) {
+ dup_str = gf_strdup (stripe_str);
+ stripe_opt = GF_CALLOC (1, sizeof (struct stripe_options),
+ gf_stripe_mt_stripe_options);
+ if (!stripe_opt) {
+ GF_FREE (dup_str);
+ goto out;
+ }
+
+ pattern = strtok_r (dup_str, ":", &tmp_str1);
+ num = strtok_r (NULL, ":", &tmp_str1);
+ if (!num) {
+ num = pattern;
+ pattern = "*";
+ ret = set_default_block_size (priv, num);
+ if (ret)
+ goto out;
+ }
+ if (gf_string2bytesize (num, &stripe_opt->block_size) != 0) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "invalid number format \"%s\"", num);
+ goto out;
+ }
+
+ if (stripe_opt->block_size < STRIPE_MIN_BLOCK_SIZE) {
+ gf_log (this->name, GF_LOG_ERROR, "Invalid Block-size: "
+ "%s. Should be atleast 512 bytes", num);
+ goto out;
+ }
+ if (stripe_opt->block_size % 512) {
+ gf_log (this->name, GF_LOG_ERROR, "Block-size: %s should"
+ " be a multiple of 512 bytes", num);
+ goto out;
+ }
+
+ memcpy (stripe_opt->path_pattern, pattern, strlen (pattern));
+
+ gf_log (this->name, GF_LOG_DEBUG,
+ "block-size : pattern %s : size %"PRId64,
+ stripe_opt->path_pattern, stripe_opt->block_size);
+
+ if (priv->pattern)
+ temp_stripeopt = NULL;
+ else
+ temp_stripeopt = priv->pattern;
+ priv->pattern = stripe_opt;
+ stripe_opt->next = temp_stripeopt;
+
+ stripe_str = strtok_r (NULL, ",", &tmp_str);
+ GF_FREE (dup_str);
+ }
+
+ ret = 0;
+out:
+ return ret;
+}
+
+int32_t
+stripe_iatt_merge (struct iatt *from, struct iatt *to)
+{
+ if (to->ia_size < from->ia_size)
+ to->ia_size = from->ia_size;
+ if (to->ia_mtime < from->ia_mtime)
+ to->ia_mtime = from->ia_mtime;
+ if (to->ia_ctime < from->ia_ctime)
+ to->ia_ctime = from->ia_ctime;
+ if (to->ia_atime < from->ia_atime)
+ to->ia_atime = from->ia_atime;
+ return 0;
+}
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index c3f1b48..aa65eb4 100644
--- a/xlators/cluster/stripe/src/stripe.c
+++ b/xlators/cluster/stripe/src/stripe.c
@@ -39,215 +39,13 @@
#include "byte-order.h"
#include "statedump.h"
-#define STRIPE_MIN_BLOCK_SIZE 16*GF_UNIT_KB
-
struct volume_options options[];
-void
-stripe_local_wipe (stripe_local_t *local)
-{
- if (!local)
- goto out;
-
- loc_wipe (&local->loc);
- loc_wipe (&local->loc2);
-
- if (local->fd)
- fd_unref (local->fd);
-
- if (local->inode)
- inode_unref (local->inode);
-
- if (local->xattr)
- dict_unref (local->xattr);
-
- if (local->dict)
- dict_unref (local->dict);
-
-out:
- return;
-}
-
-/**
- * stripe_get_matching_bs - Get the matching block size for the given path.
- */
-int32_t
-stripe_get_matching_bs (const char *path, stripe_private_t *priv)
-{
- struct stripe_options *trav = NULL;
- uint64_t block_size = 0;
-
- GF_VALIDATE_OR_GOTO ("stripe", priv, out);
- GF_VALIDATE_OR_GOTO ("stripe", path, out);
-
- LOCK (&priv->lock);
- {
- block_size = priv->block_size;
- trav = priv->pattern;
- while (trav) {<