summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-03-20 17:22:24 +0530
committerAnand Avati <avati@redhat.com>2012-03-22 16:40:27 -0700
commit9d3af972f516b6ba38d2736ce2016e34a452d569 (patch)
tree1dcdc620748a42cdfb5464c3adaae5a4a3a6f869 /xlators/performance
parentafe542eca18888463798747d2a95e5a9d239a4a0 (diff)
core: adding extra data for fops
with this change, the xlator APIs will have a dictionary as extra argument, which is passed between all the layers. This can be utilized for overloading in some of the operations. Change-Id: I58a8186b3ef647650280e63f3e5e9b9de7827b40 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 782265 Reviewed-on: http://review.gluster.com/2960 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/performance')
-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
10 files changed, 887 insertions, 786 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index a50fa872e..42ec584ba 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -157,15 +157,16 @@ ioc_inode_flush (ioc_inode_t *ioc_inode)
int32_t
ioc_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)
{
- STACK_UNWIND_STRICT (setattr, frame, op_ret, op_errno, preop, postop);
+ STACK_UNWIND_STRICT (setattr, frame, op_ret, op_errno, preop, postop,
+ xdata);
return 0;
}
int32_t
ioc_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)
{
uint64_t ioc_inode = 0;
@@ -177,7 +178,7 @@ ioc_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
ioc_inode_flush ((ioc_inode_t *)(long)ioc_inode);
STACK_WIND (frame, ioc_setattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->setattr, loc, stbuf, valid);
+ FIRST_CHILD (this)->fops->setattr, loc, stbuf, valid, xdata);
return 0;
}
@@ -185,7 +186,7 @@ ioc_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
int32_t
ioc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, inode_t *inode,
- struct iatt *stbuf, dict_t *dict, struct iatt *postparent)
+ struct iatt *stbuf, dict_t *xdata, struct iatt *postparent)
{
ioc_inode_t *ioc_inode = NULL;
ioc_table_t *table = NULL;
@@ -264,13 +265,13 @@ out:
}
STACK_UNWIND_STRICT (lookup, frame, op_ret, op_errno, inode, stbuf,
- dict, postparent);
+ xdata, postparent);
return 0;
}
int32_t
ioc_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
- dict_t *xattr_req)
+ dict_t *xdata)
{
ioc_local_t *local = NULL;
int32_t op_errno = -1, ret = -1;
@@ -292,7 +293,7 @@ ioc_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
frame->local = local;
STACK_WIND (frame, ioc_lookup_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->lookup, loc, xattr_req);
+ FIRST_CHILD (this)->fops->lookup, loc, xdata);
return 0;
@@ -338,7 +339,8 @@ ioc_forget (xlator_t *this, inode_t *inode)
*/
int32_t
ioc_cache_validate_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)
{
ioc_local_t *local = NULL;
ioc_inode_t *ioc_inode = NULL;
@@ -481,7 +483,7 @@ ioc_cache_validate (call_frame_t *frame, ioc_inode_t *ioc_inode, fd_t *fd,
STACK_WIND (validate_frame, ioc_cache_validate_cbk,
FIRST_CHILD (frame->this),
- FIRST_CHILD (frame->this)->fops->fstat, fd);
+ FIRST_CHILD (frame->this)->fops->fstat, fd, NULL);
out:
return ret;
@@ -528,7 +530,7 @@ ioc_get_priority (ioc_table_t *table, const char *path)
*/
int32_t
ioc_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_errno, fd_t *fd, dict_t *xdata)
{
uint64_t tmp_ioc_inode = 0;
ioc_local_t *local = NULL;
@@ -573,10 +575,6 @@ ioc_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
*/
fd_ctx_set (fd, this, 1);
}
- if ((local->wbflags & GF_OPEN_NOWB) != 0) {
- /* disable caching as asked by NFS */
- fd_ctx_set (fd, this, 1);
- }
/* weight = 0, we disable caching on it */
if (weight == 0) {
@@ -590,7 +588,7 @@ out:
mem_put (local);
frame->local = NULL;
- STACK_UNWIND_STRICT (open, frame, op_ret, op_errno, fd);
+ STACK_UNWIND_STRICT (open, frame, op_ret, op_errno, fd, xdata);
return 0;
}
@@ -612,7 +610,7 @@ int32_t
ioc_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)
{
ioc_local_t *local = NULL;
ioc_table_t *table = NULL;
@@ -687,7 +685,7 @@ out:
mem_put (local);
STACK_UNWIND_STRICT (create, frame, op_ret, op_errno, fd, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
@@ -697,7 +695,7 @@ int32_t
ioc_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)
{
ioc_local_t *local = NULL;
ioc_table_t *table = NULL;
@@ -740,14 +738,14 @@ out:
mem_put (local);
STACK_UNWIND_STRICT (mknod, frame, op_ret, op_errno, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
int
ioc_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
- dev_t rdev, dict_t *params)
+ dev_t rdev, mode_t umask, dict_t *xdata)
{
ioc_local_t *local = NULL;
int32_t op_errno = -1, ret = -1;
@@ -771,7 +769,7 @@ ioc_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
STACK_WIND (frame, ioc_mknod_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->mknod,
- loc, mode, rdev, params);
+ loc, mode, rdev, umask, xdata);
return 0;
unwind:
@@ -781,7 +779,7 @@ unwind:
}
STACK_UNWIND_STRICT (mknod, frame, -1, op_errno, NULL, NULL,
- NULL, NULL);
+ NULL, NULL, NULL);
return 0;
}
@@ -797,7 +795,7 @@ unwind:
*/
int32_t
ioc_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)
{
ioc_local_t *local = NULL;
@@ -805,19 +803,19 @@ ioc_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
local = mem_get0 (this->local_pool);
if (local == NULL) {
gf_log (this->name, GF_LOG_ERROR, "out of memory");
- STACK_UNWIND_STRICT (open, frame, -1, ENOMEM, NULL);
+ STACK_UNWIND_STRICT (open, frame, -1, ENOMEM, NULL, NULL);
return 0;
}
local->flags = flags;
local->file_loc.path = loc->path;
local->file_loc.inode = loc->inode;
- local->wbflags = wbflags;
frame->local = local;
STACK_WIND (frame, ioc_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;
}
@@ -834,7 +832,7 @@ ioc_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
*/
int32_t
ioc_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)
{
ioc_local_t *local = NULL;
@@ -842,7 +840,7 @@ ioc_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
if (local == NULL) {
gf_log (this->name, GF_LOG_ERROR, "out of memory");
STACK_UNWIND_STRICT (create, frame, -1, ENOMEM, NULL, NULL,
- NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL);
return 0;
}
@@ -852,7 +850,7 @@ ioc_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
STACK_WIND (frame, ioc_create_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->create, loc, flags, mode,
- fd, params);
+ umask, fd, xdata);
return 0;
}
@@ -889,10 +887,10 @@ int32_t
ioc_readv_disabled_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)
+ struct iobref *iobref, dict_t *xdata)
{
STACK_UNWIND_STRICT (readv, frame, op_ret, op_errno, vector, count,
- stbuf, iobref);
+ stbuf, iobref, xdata);
return 0;
}
@@ -1087,7 +1085,7 @@ out:
*/
int32_t
ioc_readv (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)
{
uint64_t tmp_ioc_inode = 0;
ioc_inode_t *ioc_inode = NULL;
@@ -1107,7 +1105,7 @@ ioc_readv (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, ioc_readv_disabled_cbk,
FIRST_CHILD (frame->this),
FIRST_CHILD (frame->this)->fops->readv, fd, size,
- offset, flags);
+ offset, flags, xdata);
return 0;
}
@@ -1143,7 +1141,7 @@ ioc_readv (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, ioc_readv_disabled_cbk,
FIRST_CHILD (frame->this),
FIRST_CHILD (frame->this)->fops->readv, fd, size,
- offset, flags);
+ offset, flags, xdata);
return 0;
}
@@ -1180,7 +1178,8 @@ ioc_readv (call_frame_t *frame, xlator_t *this, fd_t *fd,
return 0;
out:
- STACK_UNWIND_STRICT (readv, frame, -1, op_errno, NULL, 0, NULL, NULL);
+ STACK_UNWIND_STRICT (readv, frame, -1, op_errno, NULL, 0, NULL, NULL,
+ NULL);
return 0;
}
@@ -1197,7 +1196,7 @@ out:
int32_t
ioc_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)
{
ioc_local_t *local = NULL;
uint64_t ioc_inode = 0;
@@ -1208,7 +1207,8 @@ ioc_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (ioc_inode)
ioc_inode_flush ((ioc_inode_t *)(long)ioc_inode);
- 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;
}
@@ -1226,7 +1226,7 @@ ioc_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t
ioc_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)
{
ioc_local_t *local = NULL;
uint64_t ioc_inode = 0;
@@ -1235,7 +1235,7 @@ ioc_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
if (local == NULL) {
gf_log (this->name, GF_LOG_ERROR, "out of memory");
- STACK_UNWIND_STRICT (writev, frame, -1, ENOMEM, NULL, NULL);
+ STACK_UNWIND_STRICT (writev, frame, -1, ENOMEM, NULL, NULL, NULL);
return 0;
}
@@ -1249,7 +1249,7 @@ ioc_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, ioc_writev_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->writev, fd, vector, count, offset,
- flags, iobref);
+ flags, iobref, xdata);
return 0;
}
@@ -1268,11 +1268,11 @@ ioc_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
int32_t
ioc_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;
}
@@ -1291,11 +1291,11 @@ ioc_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t
ioc_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;
}
@@ -1310,7 +1310,8 @@ ioc_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
*
*/
int32_t
-ioc_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
+ioc_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset,
+ dict_t *xdata)
{
uint64_t ioc_inode = 0;
@@ -1320,7 +1321,7 @@ ioc_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
ioc_inode_flush ((ioc_inode_t *)(long)ioc_inode);
STACK_WIND (frame, ioc_truncate_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->truncate, loc, offset);
+ FIRST_CHILD(this)->fops->truncate, loc, offset, xdata);
return 0;
}
@@ -1334,7 +1335,8 @@ ioc_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
*
*/
int32_t
-ioc_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
+ioc_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
+ dict_t *xdata)
{
uint64_t ioc_inode = 0;
@@ -1344,21 +1346,21 @@ ioc_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
ioc_inode_flush ((ioc_inode_t *)(long)ioc_inode);
STACK_WIND (frame, ioc_ftruncate_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->ftruncate, fd, offset);
+ FIRST_CHILD(this)->fops->ftruncate, fd, offset, xdata);
return 0;
}
int32_t
ioc_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_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
ioc_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
- struct gf_flock *lock)
+ struct gf_flock *lock, dict_t *xdata)
{
ioc_inode_t *ioc_inode = NULL;
uint64_t tmp_inode = 0;
@@ -1368,7 +1370,7 @@ ioc_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
if (!ioc_inode) {
gf_log (this->name, GF_LOG_DEBUG,
"inode context is NULL: returning EBADFD");
- STACK_UNWIND_STRICT (lk, frame, -1, EBADFD, NULL);
+ STACK_UNWIND_STRICT (lk, frame, -1, EBADFD, NULL, NULL);
return 0;
}
@@ -1379,14 +1381,14 @@ ioc_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
ioc_inode_unlock (ioc_inode);
STACK_WIND (frame, ioc_lk_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->lk, fd, cmd, lock);
+ FIRST_CHILD (this)->fops->lk, fd, cmd, lock, xdata);
return 0;
}
int
ioc_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)
{
gf_dirent_t *entry = NULL;
@@ -1398,7 +1400,7 @@ ioc_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
unwind:
- STACK_UNWIND_STRICT (readdirp, frame, op_ret, op_errno, entries);
+ STACK_UNWIND_STRICT (readdirp, frame, op_ret, op_errno, entries, xdata);
return 0;
}
diff --git a/xlators/performance/io-cache/src/io-cache.h b/xlators/performance/io-cache/src/io-cache.h
index c3c631dba..cfc12ed0f 100644
--- a/xlators/performance/io-cache/src/io-cache.h
+++ b/xlators/performance/io-cache/src/io-cache.h
@@ -84,7 +84,6 @@ struct ioc_fill {
struct ioc_local {
mode_t mode;
int32_t flags;
- int32_t wbflags;
loc_t file_loc;
off_t offset;
size_t size;
@@ -198,7 +197,7 @@ int32_t
ioc_readv_disabled_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);
+ struct iobref *iobref, dict_t *xdata);
ioc_page_t *
__ioc_page_get (ioc_inode_t *ioc_inode, off_t offset);
diff --git a/xlators/performance/io-cache/src/page.c b/xlators/performance/io-cache/src/page.c
index 50357199f..115242c08 100644
--- a/xlators/performance/io-cache/src/page.c
+++ b/xlators/performance/io-cache/src/page.c
@@ -417,7 +417,8 @@ ioc_waitq_return (ioc_waitq_t *waitq)
int
ioc_fault_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)
{
ioc_local_t *local = NULL;
off_t offset = 0;
@@ -632,7 +633,7 @@ ioc_page_fault (ioc_inode_t *ioc_inode, call_frame_t *frame, fd_t *fd,
STACK_WIND (fault_frame, ioc_fault_cbk, FIRST_CHILD(fault_frame->this),
FIRST_CHILD(fault_frame->this)->fops->readv, fd,
- table->page_size, offset, 0);
+ table->page_size, offset, 0, NULL);
return;
err:
@@ -878,7 +879,7 @@ unwind:
// ioc_local_unlock (local);
STACK_UNWIND_STRICT (readv, frame, op_ret, local->op_errno, vector,
- count, &stbuf, iobref);
+ count, &stbuf, iobref, NULL);
if (iobref != NULL) {
iobref_unref (iobref);
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index d3196d50b..c2d660d4f 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -279,10 +279,10 @@ out:
int
iot_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 *xattr,
+ inode_t *inode, struct iatt *buf, dict_t *xdata,
struct iatt *postparent)
{
- STACK_UNWIND_STRICT (lookup, frame, op_ret, op_errno, inode, buf, xattr,
+ STACK_UNWIND_STRICT (lookup, frame, op_ret, op_errno, inode, buf, xdata,
postparent);
return 0;
}
@@ -290,23 +290,23 @@ iot_lookup_cbk (call_frame_t *frame, void * cookie, xlator_t *this,
int
iot_lookup_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc,
- dict_t *xattr_req)
+ dict_t *xdata)
{
STACK_WIND (frame, iot_lookup_cbk,
FIRST_CHILD (this),
FIRST_CHILD (this)->fops->lookup,
- loc, xattr_req);
+ loc, xdata);
return 0;
}
int
-iot_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req)
+iot_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_lookup_stub (frame, iot_lookup_wrapper, loc, xattr_req);
+ stub = fop_lookup_stub (frame, iot_lookup_wrapper, loc, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
"cannot create lookup stub (out of memory)");
@@ -332,33 +332,35 @@ out:
int
iot_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)
{
- STACK_UNWIND_STRICT (setattr, frame, op_ret, op_errno, preop, postop);
+ STACK_UNWIND_STRICT (setattr, frame, op_ret, op_errno, preop, postop,
+ xdata);
return 0;
}
int
iot_setattr_wrapper (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, iot_setattr_cbk,
FIRST_CHILD (this),
FIRST_CHILD (this)->fops->setattr,
- loc, stbuf, valid);
+ loc, stbuf, valid, xdata);
return 0;
}
int
iot_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)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_setattr_stub (frame, iot_setattr_wrapper, loc, stbuf, valid);
+ stub = fop_setattr_stub (frame, iot_setattr_wrapper, loc, stbuf, valid,
+ xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "Cannot create setattr stub"
"(Out of memory)");
@@ -374,7 +376,7 @@ out:
call_stub_destroy (stub);
}
- STACK_UNWIND_STRICT (setattr, frame, -1, -ret, NULL, NULL);
+ STACK_UNWIND_STRICT (setattr, frame, -1, -ret, NULL, NULL, NULL);
}
return 0;
@@ -384,32 +386,34 @@ out:
int
iot_fsetattr_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)
{
- STACK_UNWIND_STRICT (fsetattr, frame, op_ret, op_errno, preop, postop);
+ STACK_UNWIND_STRICT (fsetattr, frame, op_ret, op_errno, preop, postop,
+ xdata);
return 0;
}
int
iot_fsetattr_wrapper (call_frame_t *frame, xlator_t *this,
- fd_t *fd, struct iatt *stbuf, int32_t valid)
+ fd_t *fd, struct iatt *stbuf, int32_t valid, dict_t *xdata)
{
STACK_WIND (frame, iot_fsetattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fsetattr, fd, stbuf, valid);
+ FIRST_CHILD (this)->fops->fsetattr, fd, stbuf, valid,
+ xdata);
return 0;
}
int
iot_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)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_fsetattr_stub (frame, iot_fsetattr_wrapper, fd, stbuf,
- valid);
+ valid, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create fsetattr stub"
"(out of memory)");
@@ -421,7 +425,8 @@ iot_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (fsetattr, frame, -1, -ret, NULL, NULL);
+ STACK_UNWIND_STRICT (fsetattr, frame, -1, -ret, NULL, NULL,
+ NULL);
if (stub != NULL) {
call_stub_destroy (stub);
}
@@ -432,30 +437,31 @@ out:
int
iot_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;
}
int
iot_access_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc,
- int32_t mask)
+ int32_t mask, dict_t *xdata)
{
STACK_WIND (frame, iot_access_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->access, loc, mask);
+ FIRST_CHILD (this)->fops->access, loc, mask, xdata);
return 0;
}
int
-iot_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask)
+iot_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask,
+ dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_access_stub (frame, iot_access_wrapper, loc, mask);
+ stub = fop_access_stub (frame, iot_access_wrapper, loc, mask, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create access stub"
"(out of memory)");
@@ -466,7 +472,7 @@ iot_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask)
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (access, frame, -1, -ret);
+ STACK_UNWIND_STRICT (access, frame, -1, -ret, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -479,32 +485,33 @@ out:
int
iot_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, const char *path,
- struct iatt *stbuf)
+ struct iatt *stbuf, dict_t *xdata)
{
- STACK_UNWIND_STRICT (readlink, frame, op_ret, op_errno, path, stbuf);
+ STACK_UNWIND_STRICT (readlink, frame, op_ret, op_errno, path, stbuf,
+ xdata);
return 0;
}
int
iot_readlink_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc,
- size_t size)
+ size_t size, dict_t *xdata)
{
STACK_WIND (frame, iot_readlink_cbk,
FIRST_CHILD (this),
FIRST_CHILD (this)->fops->readlink,
- loc, size);
+ loc, size, xdata);
return 0;
}
int
-iot_readlink (call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size)
+iot_readlink (call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_readlink_stub (frame, iot_readlink_wrapper, loc, size);
+ stub = fop_readlink_stub (frame, iot_readlink_wrapper, loc, size, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create readlink stub"
"(out of memory)");
@@ -516,7 +523,7 @@ iot_readlink (call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size)
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (readlink, frame, -1, -ret, NULL, NULL);
+ STACK_UNWIND_STRICT (readlink, frame, -1, -ret, NULL, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -531,33 +538,34 @@ int
iot_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);
+ preparent, postparent, xdata);
return 0;
}
int
iot_mknod_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
- dev_t rdev, dict_t *params)
+ dev_t rdev, mode_t umask, dict_t *xdata)
{
STACK_WIND (frame, iot_mknod_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->mknod, loc, mode, rdev, params);
+ FIRST_CHILD (this)->fops->mknod, loc, mode, rdev, umask,
+ xdata);
return 0;
}
int
iot_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
- dev_t rdev, dict_t *params)
+ dev_t rdev, mode_t umask, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_mknod_stub (frame, iot_mknod_wrapper, loc, mode, rdev,
- params);
+ umask, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create mknod stub"
"(out of memory)");
@@ -570,7 +578,7 @@ iot_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
out:
if (ret < 0) {
STACK_UNWIND_STRICT (mknod, frame, -1, -ret, NULL, NULL, NULL,
- NULL);
+ NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -584,32 +592,33 @@ int
iot_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);
+ preparent, postparent, xdata);
return 0;
}
int
iot_mkdir_wrapper (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, iot_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
iot_mkdir (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
- dict_t *params)
+ mode_t umask, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_mkdir_stub (frame, iot_mkdir_wrapper, loc, mode, params);
+ stub = fop_mkdir_stub (frame, iot_mkdir_wrapper, loc, mode, umask,
+ xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create mkdir stub"
"(out of memory)");
@@ -622,7 +631,7 @@ iot_mkdir (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
out:
if (ret < 0) {
STACK_UNWIND_STRICT (mkdir, frame, -1, -ret, NULL, NULL, NULL,
- NULL);
+ NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -635,30 +644,30 @@ out:
int
iot_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;
}
int
-iot_rmdir_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags)
+iot_rmdir_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags, dict_t *xdata)
{
STACK_WIND (frame, iot_rmdir_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->rmdir, loc, flags);
+ FIRST_CHILD (this)->fops->rmdir, loc, flags, xdata);
return 0;
}
int
-iot_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags)
+iot_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_rmdir_stub (frame, iot_rmdir_wrapper, loc, flags);
+ stub = fop_rmdir_stub (frame, iot_rmdir_wrapper, loc, flags, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create rmdir stub"
"(out of memory)");
@@ -669,7 +678,7 @@ iot_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags)
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (rmdir, frame, -1, -ret, NULL, NULL);
+ STACK_UNWIND_STRICT (rmdir, frame, -1, -ret, NULL, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -683,33 +692,34 @@ int
iot_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;
}
int
iot_symlink_wrapper (call_frame_t *frame, xlator_t *this, const char *linkname,
- loc_t *loc, dict_t *params)
+ loc_t *loc, mode_t umask, dict_t *xdata)
{
STACK_WIND (frame, iot_symlink_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->symlink, linkname, loc, params);
+ FIRST_CHILD (this)->fops->symlink, linkname, loc, umask,
+ xdata);
return 0;
}
int
iot_symlink (call_frame_t *frame, xlator_t *this, const char *linkname,
- loc_t *loc, dict_t *params)
+ loc_t *loc, mode_t umask, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_symlink_stub (frame, iot_symlink_wrapper, linkname, loc,
- params);
+ umask, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create symlink stub"
"(out of memory)");
@@ -722,7 +732,7 @@ iot_symlink (call_frame_t *frame, xlator_t *this, const char *linkname,
out:
if (ret < 0) {
STACK_UNWIND_STRICT (symlink, frame, -1, -ret, NULL, NULL, NULL,
- NULL);
+ NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
}
@@ -736,31 +746,33 @@ int
iot_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;
}
int
iot_rename_wrapper (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
- loc_t *newloc)
+ loc_t *newloc, dict_t *xdata)
{
STACK_WIND (frame, iot_rename_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->rename, oldloc, newloc);
+ FIRST_CHILD (this)->fops->rename, oldloc, newloc, xdata);
return 0;
}
int
-iot_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc)
+iot_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc,
+ dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_rename_stub (frame, iot_rename_wrapper, oldloc, newloc);
+ stub = fop_rename_stub (frame, iot_rename_wrapper, oldloc, newloc, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_DEBUG, "cannot create rename stub"
"(out of memory)");
@@ -773,7 +785,7 @@ iot_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc)
out:
if (ret < 0) {
STACK_UNWIND_STRICT (rename, frame, -1, -ret, NULL, NULL, NULL,
- NULL, NULL);
+ NULL, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
}
@@ -785,31 +797,33 @@ out:
int
iot_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_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;
}
int
iot_open_wrapper (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, iot_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;
}
int
iot_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)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_open_stub (frame, iot_open_wrapper, loc, flags, fd, wbflags);
+ stub = fop_open_stub (frame, iot_open_wrapper, loc, flags, fd,
+ xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
"cannot create open call stub"
@@ -822,7 +836,7 @@ iot_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (open, frame, -1, -ret, NULL);
+ STACK_UNWIND_STRICT (open, frame, -1, -ret, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -837,35 +851,36 @@ int
iot_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 *stbuf, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
STACK_UNWIND_STRICT (create, frame, op_ret, op_errno, fd, inode, stbuf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
int
iot_create_wrapper (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, iot_create_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->create,
- loc, flags, mode, fd, params);
+ loc, flags, mode, umask, fd, xdata);
return 0;
}
int
iot_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)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_create_stub (frame, iot_create_wrapper, loc, flags, mode,
- fd, params);
+ umask, fd, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
"cannot create \"create\" call stub"
@@ -879,7 +894,7 @@ iot_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
out:
if (ret < 0) {
STACK_UNWIND_STRICT (create, frame, -1, -ret, NULL, NULL, NULL,
- NULL, NULL);
+ NULL, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -893,10 +908,11 @@ out:
int
iot_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;
}
@@ -904,24 +920,25 @@ iot_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
iot_readv_wrapper (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, iot_readv_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->readv,
- fd, size, offset, flags);
+ fd, size, offset, flags, xdata);
return 0;
}
int
iot_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)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_readv_stub (frame, iot_readv_wrapper, fd, size, offset, flags);
+ stub = fop_readv_stub (frame, iot_readv_wrapper, fd, size, offset,
+ flags, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
"cannot create readv call stub"
@@ -935,7 +952,7 @@ iot_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
out:
if (ret < 0) {
STACK_UNWIND_STRICT (readv, frame, -1, -ret, NULL, -1, NULL,
- NULL);
+ NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
}
@@ -946,31 +963,31 @@ out:
int
iot_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;
}
int
-iot_flush_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd)
+iot_flush_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
STACK_WIND (frame, iot_flush_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->flush,
- fd);
+ fd, xdata);
return 0;
}
int
-iot_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
+iot_flush (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_flush_stub (frame, iot_flush_wrapper, fd);
+ stub = fop_flush_stub (frame, iot_flush_wrapper, fd, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
"cannot create flush_cbk call stub"
@@ -982,7 +999,7 @@ iot_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (flush, frame, -1, -ret);
+ STACK_UNWIND_STRICT (flush, frame, -1, -ret, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -995,32 +1012,34 @@ out:
int
iot_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;
}
int
iot_fsync_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int32_t datasync)
+ int32_t datasync, dict_t *xdata)
{
STACK_WIND (frame, iot_fsync_cbk,
FIRST_CHILD (this),
FIRST_CHILD (this)->fops->fsync,
- fd, datasync);
+ fd, datasync, xdata);
return 0;
}
int
-iot_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync)
+iot_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync,
+ dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_fsync_stub (frame, iot_fsync_wrapper, fd, datasync);
+ stub = fop_fsync_stub (frame, iot_fsync_wrapper, fd, datasync, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
"cannot create fsync_cbk call stub"
@@ -1033,7 +1052,7 @@ iot_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync)
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (fsync, frame, -1, -ret, NULL, NULL);
+ STACK_UNWIND_STRICT (fsync, frame, -1, -ret, NULL, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1046,9 +1065,10 @@ out:
int
iot_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;
}
@@ -1056,12 +1076,13 @@ iot_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
iot_writev_wrapper (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)
+ off_t offset, uint32_t flags, struct iobref *iobref,
+ dict_t *xdata)
{
STACK_WIND (frame, iot_writev_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->writev,
- fd, vector, count, offset, flags, iobref);
+ fd, vector, count, offset, flags, iobref, xdata);
return 0;
}
@@ -1069,13 +1090,13 @@ iot_writev_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd,
int
iot_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)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_writev_stub (frame, iot_writev_wrapper,
- fd, vector, count, offset, flags, iobref);
+ stub = fop_writev_stub (frame, iot_writev_wrapper, fd, vector,
+ count, offset, flags, iobref, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
@@ -1088,7 +1109,7 @@ iot_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (writev, frame, -1, -ret, NULL, NULL);
+ STACK_UNWIND_STRICT (writev, frame, -1, -ret, NULL, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1101,33 +1122,34 @@ out:
int32_t
iot_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct gf_flock *flock)
+ int32_t op_ret, int32_t op_errno, struct gf_flock *flock,
+ dict_t *xdata)
{
- STACK_UNWIND_STRICT (lk, frame, op_ret, op_errno, flock);
+ STACK_UNWIND_STRICT (lk, frame, op_ret, op_errno, flock, xdata);
return 0;
}
int
iot_lk_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int32_t cmd, struct gf_flock *flock)
+ int32_t cmd, struct gf_flock *flock, dict_t *xdata)
{
STACK_WIND (frame, iot_lk_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->lk,
- fd, cmd, flock);
+ fd, cmd, flock, xdata);
return 0;
}
int
iot_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)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_lk_stub (frame, iot_lk_wrapper, fd, cmd, flock);
+ stub = fop_lk_stub (frame, iot_lk_wrapper, fd, cmd, flock, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
@@ -1140,7 +1162,7 @@ iot_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (lk, frame, -1, -ret, NULL);
+ STACK_UNWIND_STRICT (lk, frame, -1, -ret, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1152,31 +1174,31 @@ out:
int
iot_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;
}
int
-iot_stat_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc)
+iot_stat_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
STACK_WIND (frame, iot_stat_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->stat,
- loc);
+ loc, xdata);
return 0;
}
int
-iot_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
+iot_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_stat_stub (frame, iot_stat_wrapper, loc);
+ stub = fop_stat_stub (frame, iot_stat_wrapper, loc, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
"cannot create fop_stat call stub"
@@ -1189,7 +1211,7 @@ iot_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (stat, frame, -1, -ret, NULL);
+ STACK_UNWIND_STRICT (stat, frame, -1, -ret, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1201,31 +1223,31 @@ out:
int
iot_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;
}
int
-iot_fstat_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd)
+iot_fstat_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
STACK_WIND (frame, iot_fstat_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->fstat,
- fd);
+ fd, xdata);
return 0;
}
int
-iot_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
+iot_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_fstat_stub (frame, iot_fstat_wrapper, fd);
+ stub = fop_fstat_stub (frame, iot_fstat_wrapper, fd, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
"cannot create fop_fstat call stub"
@@ -1237,7 +1259,7 @@ iot_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (fstat, frame, -1, -ret, NULL);
+ STACK_UNWIND_STRICT (fstat, frame, -1, -ret, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1250,34 +1272,35 @@ out:
int
iot_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;
}
int
iot_truncate_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc,
- off_t offset)
+ off_t offset, dict_t *xdata)
{
STACK_WIND (frame, iot_truncate_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->truncate,
- loc, offset);
+ loc, offset, xdata);
return 0;
}
int
-iot_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
+iot_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset,
+ dict_t *xdata)
{
call_stub_t *stub;
int ret = -1;
- stub = fop_truncate_stub (frame, iot_truncate_wrapper, loc, offset);
-
+ stub = fop_truncate_stub (frame, iot_truncate_wrapper, loc, offset,
+ xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
"cannot create fop_stat call stub"
@@ -1290,7 +1313,8 @@ iot_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (truncate, frame, -1, -ret, NULL, NULL);
+ STACK_UNWIND_STRICT (truncate, frame, -1, -ret, NULL, NULL,
+ NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1304,33 +1328,35 @@ out:
int
iot_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;
}
int
iot_ftruncate_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- off_t offset)
+ off_t offset, dict_t *xdata)
{
STACK_WIND (frame, iot_ftruncate_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->ftruncate,
- fd, offset);
+ fd, offset, xdata);
return 0;
}
int
-iot_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
+iot_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
+ dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_ftruncate_stub (frame, iot_ftruncate_wrapper, fd, offset);
+ stub = fop_ftruncate_stub (frame, iot_ftruncate_wrapper, fd, offset,
+ xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
"cannot create fop_ftruncate call stub"
@@ -1342,7 +1368,7 @@ iot_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (ftruncate, frame, -1, -ret, NULL, NULL);
+ STACK_UNWIND_STRICT (ftruncate, frame, -1, -ret, NULL, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1356,32 +1382,34 @@ out:
int
iot_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;
}
int
-iot_unlink_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc)
+iot_unlink_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ int32_t xflag, dict_t *xdata)
{
STACK_WIND (frame, iot_unlink_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->unlink,
- loc);
+ loc, xflag, xdata);
return 0;
}
int
-iot_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc)
+iot_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t xflag,
+ dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_unlink_stub (frame, iot_unlink_wrapper, loc);
+ stub = fop_unlink_stub (frame, iot_unlink_wrapper, loc, xflag, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,
"cannot create fop_unlink call stub"
@@ -1394,7 +1422,7 @@ iot_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc)
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (unlink, frame, -1, -ret, NULL, NULL);
+ STACK_UNWIND_STRICT (unlink, frame, -1, -ret, NULL, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1408,31 +1436,34 @@ out:
int
iot_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 *buf, struct iatt *preparent, struct iatt *postparent,
+ dict_t *xdata)
{
STACK_UNWIND_STRICT (link, frame, op_ret, op_errno, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
int
-iot_link_wrapper (call_frame_t *frame, xlator_t *this, loc_t *old, loc_t *new)
+iot_link_wrapper (call_frame_t *frame, xlator_t *this, loc_t *old, loc_t *new,
+ dict_t *xdata)
{
STACK_WIND (frame, iot_link_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->link, old, new);
+ FIRST_CHILD (this)->fops->link, old, new, xdata);
return 0;
}
int
-iot_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc)
+iot_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc,
+ dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_link_stub (frame, iot_link_wrapper, oldloc, newloc);
+ stub = fop_link_stub (frame, iot_link_wrapper, oldloc, newloc, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create link stub"
"(out of memory)");
@@ -1444,7 +1475,7 @@ iot_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc)
out:
if (ret < 0) {
STACK_UNWIND_STRICT (link, frame, -1, -ret, NULL, NULL, NULL,
- NULL);
+ NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1456,29 +1487,31 @@ out:
int
iot_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;
}
int
-iot_opendir_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd)
+iot_opendir_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
+ dict_t *xdata)
{
STACK_WIND (frame, iot_opendir_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->opendir, loc, fd);
+ FIRST_CHILD (this)->fops->opendir, loc, fd, xdata);
return 0;
}
int
-iot_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd)
+iot_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
+ dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_opendir_stub (frame, iot_opendir_wrapper, loc, fd);
+ stub = fop_opendir_stub (frame, iot_opendir_wrapper, loc, fd, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create opendir stub"
"(out of memory)");
@@ -1489,7 +1522,7 @@ iot_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd)
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (opendir, frame, -1, -ret, NULL);
+ STACK_UNWIND_STRICT (opendir, frame, -1, -ret, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1501,30 +1534,32 @@ out:
int
iot_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;
}
int
iot_fsyncdir_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int datasync)
+ int datasync, dict_t *xdata)
{
STACK_WIND (frame, iot_fsyncdir_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fsyncdir, fd, datasync);
+ FIRST_CHILD (this)->fops->fsyncdir, fd, datasync, xdata);
return 0;
}
int
-iot_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync)
+iot_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync,
+ dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_fsyncdir_stub (frame, iot_fsyncdir_wrapper, fd, datasync);
+ stub = fop_fsyncdir_stub (frame, iot_fsyncdir_wrapper, fd, datasync,
+ xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create fsyncdir stub"
"(out of memory)");
@@ -1535,7 +1570,7 @@ iot_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync)
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (fsyncdir, frame, -1, -ret);
+ STACK_UNWIND_STRICT (fsyncdir, frame, -1, -ret, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1547,29 +1582,31 @@ out:
int
iot_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;
}
int
-iot_statfs_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc)
+iot_statfs_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ dict_t *xdata)
{
STACK_WIND (frame, iot_statfs_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->statfs, loc);
+ FIRST_CHILD (this)->fops->statfs, loc, xdata);
return 0;
}
int
-iot_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc)
+iot_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_statfs_stub (frame, iot_statfs_wrapper, loc);
+ stub = fop_statfs_stub (frame, iot_statfs_wrapper, loc, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create statfs stub"
"(out of memory)");
@@ -1580,7 +1617,7 @@ iot_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc)
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (statfs, frame, -1, -ret, NULL);
+ STACK_UNWIND_STRICT (statfs, frame, -1, -ret, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1592,32 +1629,32 @@ out:
int
iot_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;
}
int
iot_setxattr_wrapper (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, iot_setxattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->setxattr, loc, dict, flags);
+ FIRST_CHILD (this)->fops->setxattr, loc, dict, flags, xdata);
return 0;
}
int
iot_setxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *dict,
- int32_t flags)
+ int32_t flags, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_setxattr_stub (frame, iot_setxattr_wrapper, loc, dict,
- flags);
+ flags, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create setxattr stub"
"(out of memory)");
@@ -1629,7 +1666,7 @@ iot_setxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *dict,
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (setxattr, frame, -1, -ret);
+ STACK_UNWIND_STRICT (setxattr, frame, -1, -ret, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1641,31 +1678,31 @@ out:
int
iot_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;
}
int
iot_getxattr_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc,
- const char *name)
+ const char *name, dict_t *xdata)
{
STACK_WIND (frame, iot_getxattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->getxattr, loc, name);
+ FIRST_CHILD (this)->fops->getxattr, loc, name, xdata);
return 0;
}
int
iot_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
- const char *name)
+ const char *name, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_getxattr_stub (frame, iot_getxattr_wrapper, loc, name);
+ stub = fop_getxattr_stub (frame, iot_getxattr_wrapper, loc, name, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create getxattr stub"
"(out of memory)");
@@ -1677,7 +1714,7 @@ iot_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (getxattr, frame, -1, -ret, NULL);
+ STACK_UNWIND_STRICT (getxattr, frame, -1, -ret, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1689,31 +1726,32 @@ out:
int
iot_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;
}
int
iot_fgetxattr_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- const char *name)
+ const char *name, dict_t *xdata)
{
STACK_WIND (frame, iot_fgetxattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fgetxattr, fd, name);
+ FIRST_CHILD (this)->fops->fgetxattr, fd, name, xdata);
return 0;
}
int
iot_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
- const char *name)
+ const char *name, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_fgetxattr_stub (frame, iot_fgetxattr_wrapper, fd, name);
+ stub = fop_fgetxattr_stub (frame, iot_fgetxattr_wrapper, fd, name, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create fgetxattr stub"
"(out of memory)");
@@ -1724,7 +1762,7 @@ iot_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (fgetxattr, frame, -1, -ret, NULL);
+ STACK_UNWIND_STRICT (fgetxattr, frame, -1, -ret, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1736,32 +1774,33 @@ out:
int
iot_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;
}
int
iot_fsetxattr_wrapper (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, iot_fsetxattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fsetxattr, fd, dict, flags);
+ FIRST_CHILD (this)->fops->fsetxattr, fd, dict, flags,
+ xdata);
return 0;
}
int
iot_fsetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *dict,
- int32_t flags)
+ int32_t flags, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_fsetxattr_stub (frame, iot_fsetxattr_wrapper, fd, dict,
- flags);
+ flags, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create fsetxattr stub"
"(out of memory)");
@@ -1772,7 +1811,7 @@ iot_fsetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *dict,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (fsetxattr, frame, -1, -ret);
+ STACK_UNWIND_STRICT (fsetxattr, frame, -1, -ret, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1784,32 +1823,32 @@ out:
int
iot_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;
}
int
iot_removexattr_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc,
- const char *name)
+ const char *name, dict_t *xdata)
{
STACK_WIND (frame, iot_removexattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->removexattr, loc, name);
+ FIRST_CHILD (this)->fops->removexattr, loc, name, xdata);
return 0;
}
int
iot_removexattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
- const char *name)
+ const char *name, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_removexattr_stub (frame, iot_removexattr_wrapper, loc,
- name);
+ name, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,"cannot get removexattr fop"
"(out of memory)");
@@ -1820,7 +1859,7 @@ iot_removexattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (removexattr, frame, -1, -ret);
+ STACK_UNWIND_STRICT (removexattr, frame, -1, -ret, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1831,32 +1870,32 @@ out:
int
iot_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;
}
int
iot_fremovexattr_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- const char *name)
+ const char *name, dict_t *xdata)
{
STACK_WIND (frame, iot_fremovexattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fremovexattr, fd, name);
+ FIRST_CHILD (this)->fops->fremovexattr, fd, name, xdata);
return 0;
}
int
iot_fremovexattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
- const char *name)
+ const char *name, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_fremovexattr_stub (frame, iot_fremovexattr_wrapper, fd,
- name);
+ name, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR,"cannot get fremovexattr fop"
"(out of memory)");
@@ -1867,7 +1906,7 @@ iot_fremovexattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (fremovexattr, frame, -1, -ret);
+ STACK_UNWIND_STRICT (fremovexattr, frame, -1, -ret, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1879,32 +1918,33 @@ out:
int
iot_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;
}
int
iot_readdirp_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- size_t size, off_t offset, dict_t *dict)
+ size_t size, off_t offset, dict_t *xdata)
{
STACK_WIND (frame, iot_readdirp_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->readdirp, fd, size, offset, dict);
+ FIRST_CHILD (this)->fops->readdirp, fd, size, offset, xdata);
return 0;
}
int
iot_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
- off_t offset, dict_t *dict)
+ off_t offset, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_readdirp_stub (frame, iot_readdirp_wrapper, fd, size,
- offset, dict);
+ offset, xdata);
if (!stub) {
gf_log (this->private, GF_LOG_ERROR,"cannot get readdir stub"
"(out of memory)");
@@ -1915,7 +1955,7 @@ iot_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (readdirp, frame, -1, -ret, NULL);
+ STACK_UNWIND_STRICT (readdirp, frame, -1, -ret, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1927,31 +1967,33 @@ out:
int
iot_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;
}
int
iot_readdir_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- size_t size, off_t offset)
+ size_t size, off_t offset, dict_t *xdata)
{
STACK_WIND (frame, iot_readdir_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->readdir, fd, size, offset);
+ FIRST_CHILD (this)->fops->readdir, fd, size, offset, xdata);
return 0;
}
int
iot_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
- off_t offset)
+ off_t offset, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
- stub = fop_readdir_stub (frame, iot_readdir_wrapper, fd, size, offset);
+ stub = fop_readdir_stub (frame, iot_readdir_wrapper, fd, size, offset,
+ xdata);
if (!stub) {
gf_log (this->private, GF_LOG_ERROR,"cannot get readdir stub"
"(out of memory)");
@@ -1962,7 +2004,7 @@ iot_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (readdir, frame, -1, -ret, NULL);
+ STACK_UNWIND_STRICT (readdir, frame, -1, -ret, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -1972,33 +2014,36 @@ out:
}
int
-iot_inodelk_cbk (call_frame_t *frame, void *cookie,
- xlator_t *this, int32_t op_ret, int32_t op_errno)
+iot_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
+ 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;
}
int
iot_inodelk_wrapper (call_frame_t *frame, xlator_t *this, const char *volume,
- loc_t *loc, int32_t cmd, struct gf_flock *lock)
+ loc_t *loc, int32_t cmd, struct gf_flock *lock,
+ dict_t *xdata)
{
STACK_WIND (frame, iot_inodelk_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->inodelk, volume, loc, cmd, lock);
+ FIRST_CHILD (this)->fops->inodelk, volume, loc, cmd, lock,
+ xdata);
return 0;
}
int
iot_inodelk (call_frame_t *frame, xlator_t *this,
- 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;
int ret = -1;
stub = fop_inodelk_stub (frame, iot_inodelk_wrapper,
- volume, loc, cmd, lock);
+ volume, loc, cmd, lock, xdata);
if (!stub) {
ret = -ENOMEM;
goto out;
@@ -2007,7 +2052,7 @@ iot_inodelk (call_frame_t *frame, xlator_t *this,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (inodelk, frame, -1, -ret);
+ STACK_UNWIND_STRICT (inodelk, frame, -1, -ret, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -2018,9 +2063,9 @@ out:
int
iot_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;
}
@@ -2028,23 +2073,25 @@ iot_finodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
iot_finodelk_wrapper (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, iot_finodelk_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->finodelk, volume, fd, cmd, lock);
+ FIRST_CHILD (this)->fops->finodelk, volume, fd, cmd, lock,
+ xdata);
return 0;
}
int
iot_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)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_finodelk_stub (frame, iot_finodelk_wrapper,
- volume, fd, cmd, lock);
+ volume, fd, cmd, lock, xdata);
if (!stub) {
gf_log (this->private, GF_LOG_ERROR,"cannot get finodelk stub"
"(out of memory)");
@@ -2055,7 +2102,7 @@ iot_finodelk (call_frame_t *frame, xlator_t *this,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (finodelk, frame, -1, -ret);
+ STACK_UNWIND_STRICT (finodelk, frame, -1, -ret, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -2066,9 +2113,9 @@ out:
int
iot_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;
}
@@ -2076,11 +2123,11 @@ iot_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
iot_entrylk_wrapper (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, iot_entrylk_cbk, FIRST_CHILD (this),
FIRST_CHILD (this)->fops->entrylk,
- volume, loc, basename, cmd, type);
+ volume, loc, basename, cmd, type, xdata);
return 0;
}
@@ -2088,13 +2135,13 @@ iot_entrylk_wrapper (call_frame_t *frame, xlator_t *this,
int
iot_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)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_entrylk_stub (frame, iot_entrylk_wrapper,
- volume, loc, basename, cmd, type);
+ volume, loc, basename, cmd, type, xdata);
if (!stub) {
gf_log (this->private, GF_LOG_ERROR,"cannot get entrylk stub"
"(out of memory)");
@@ -2105,7 +2152,7 @@ iot_entrylk (call_frame_t *frame, xlator_t *this,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (entrylk, frame, -1, -ret);
+ STACK_UNWIND_STRICT (entrylk, frame, -1, -ret, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -2116,9 +2163,9 @@ out:
int
iot_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;
}
@@ -2126,11 +2173,11 @@ iot_fentrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
iot_fentrylk_wrapper (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, iot_fentrylk_cbk, FIRST_CHILD (this),
FIRST_CHILD (this)->fops->fentrylk,
- volume, fd, basename, cmd, type);
+ volume, fd, basename, cmd, type, xdata);
return 0;
}
@@ -2138,13 +2185,13 @@ iot_fentrylk_wrapper (call_frame_t *frame, xlator_t *this,
int
iot_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)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_fentrylk_stub (frame, iot_fentrylk_wrapper,
- volume, fd, basename, cmd, type);
+ volume, fd, basename, cmd, type, xdata);
if (!stub) {
gf_log (this->private, GF_LOG_ERROR,"cannot get fentrylk stub"
"(out of memory)");
@@ -2155,7 +2202,7 @@ iot_fentrylk (call_frame_t *frame, xlator_t *this,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (fentrylk, frame, -1, -ret);
+ STACK_UNWIND_STRICT (fentrylk, frame, -1, -ret, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -2167,32 +2214,32 @@ out:
int
iot_xattrop_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)
{
- STACK_UNWIND_STRICT (xattrop, frame, op_ret, op_errno, xattr);
+ STACK_UNWIND_STRICT (xattrop, frame, op_ret, op_errno, xattr, xdata);
return 0;
}
int
iot_xattrop_wrapper (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)
{
STACK_WIND (frame, iot_xattrop_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->xattrop, loc, optype, xattr);
+ FIRST_CHILD (this)->fops->xattrop, loc, optype, xattr, xdata);
return 0;
}
int
iot_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)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_xattrop_stub (frame, iot_xattrop_wrapper, loc, optype,
- xattr);
+ xattr, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create xattrop stub"
"(out of memory)");
@@ -2203,7 +2250,7 @@ iot_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (xattrop, frame, -1, -ret, NULL);
+ STACK_UNWIND_STRICT (xattrop, frame, -1, -ret, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
@@ -2215,31 +2262,31 @@ out:
int
iot_fxattrop_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)
{
- STACK_UNWIND_STRICT (fxattrop, frame, op_ret, op_errno, xattr);
+ STACK_UNWIND_STRICT (fxattrop, frame, op_ret, op_errno, xattr, xdata);
return 0;
}
int
iot_fxattrop_wrapper (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)
{
STACK_WIND (frame, iot_fxattrop_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fxattrop, fd, optype, xattr);
+ FIRST_CHILD (this)->fops->fxattrop, fd, optype, xattr, xdata);
return 0;
}
int
iot_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)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_fxattrop_stub (frame, iot_fxattrop_wrapper, fd, optype,
- xattr);
+ xattr, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create fxattrop stub"
"(out of memory)");
@@ -2250,7 +2297,7 @@ iot_fxattrop (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (fxattrop, frame, -1, -ret, NULL);
+ STACK_UNWIND_STRICT (fxattrop, frame, -1, -ret, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
}
@@ -2262,33 +2309,33 @@ out:
int32_t
iot_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
iot_rchecksum_wrapper (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, iot_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
iot_rchecksum (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
- int32_t len)
+ int32_t len, dict_t *xdata)
{
call_stub_t *stub = NULL;
int ret = -1;
stub = fop_rchecksum_stub (frame, iot_rchecksum_wrapper, fd, offset,
- len);
+ len, xdata);
if (!stub) {
gf_log (this->name, GF_LOG_ERROR, "cannot create rchecksum stub"
"(out of memory)");
@@ -2299,7 +2346,7 @@ iot_rchecksum (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
ret = iot_schedule (frame, this, stub);
out:
if (ret < 0) {
- STACK_UNWIND_STRICT (rchecksum, frame, -1, -ret, -1, NULL);
+ STACK_UNWIND_STRICT (rchecksum, frame, -1, -ret, -1, NULL, NULL);
if (stub != NULL) {
call_stub_destroy (stub);
}
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c
index 5fa6e214b..13396a44e 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -632,7 +632,7 @@ out:
int
mdc_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
- dict_t *xattr_req)
+ dict_t *xdata)
{
int ret = 0;
struct iatt stbuf = {0, };
@@ -651,12 +651,12 @@ mdc_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
if (ret != 0)
goto uncached;
- if (xattr_req) {
+ if (xdata) {
ret = mdc_inode_xatt_get (this, loc->inode, &xattr_rsp);
if (ret != 0)
goto uncached;
- if (!mdc_xattr_satisfied (this, xattr_req, xattr_rsp))
+ if (!mdc_xattr_satisfied (this, xdata, xattr_rsp))
goto uncached;
}
@@ -669,11 +669,11 @@ mdc_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
return 0;
uncached:
- if (xattr_req)
- mdc_load_reqs (this, xattr_req);
+ if (xdata)
+ mdc_load_reqs (this, xdata);
STACK_WIND (frame, mdc_lookup_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->lookup, loc, xattr_req);
+ FIRST_CHILD (this)->fops->lookup, loc, xdata);
if (xattr_rsp)
dict_unref (xattr_rsp);
@@ -684,7 +684,7 @@ uncached:
int
mdc_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)
{
mdc_local_t *local = NULL;
@@ -698,14 +698,14 @@ mdc_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
mdc_inode_iatt_set (this, local->loc.inode, buf);
out:
- MDC_STACK_UNWIND (stat, frame, op_ret, op_errno, buf);
+ MDC_STACK_UNWIND (stat, frame, op_ret, op_errno, buf, xdata);
return 0;
}
int
-mdc_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
+mdc_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
int ret;
struct iatt stbuf;
@@ -721,21 +721,22 @@ mdc_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
if (ret != 0)
goto uncached;
- MDC_STACK_UNWIND (stat, frame, 0, 0, &stbuf);
+ MDC_STACK_UNWIND (stat, frame, 0, 0, &stbuf, xdata);
return 0;
uncached:
STACK_WIND (frame, mdc_stat_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->stat,
- loc);
+ loc, xdata);
return 0;
}
int
mdc_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)
{
mdc_local_t *local = NULL;
@@ -749,14 +750,14 @@ mdc_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
mdc_inode_iatt_set (this, local->fd->inode, buf);
out:
- MDC_STACK_UNWIND (fstat, frame, op_ret, op_errno, buf);
+ MDC_STACK_UNWIND (fstat, frame, op_ret, op_errno, buf, xdata);
return 0;
}
int
-mdc_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
+mdc_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
int ret;
struct iatt stbuf;
@@ -772,14 +773,14 @@ mdc_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
if (ret != 0)
goto uncached;
- MDC_STACK_UNWIND (fstat, frame, 0, 0, &stbuf);
+ MDC_STACK_UNWIND (fstat, frame, 0, 0, &stbuf, xdata);
return 0;
uncached:
STACK_WIND (frame, mdc_fstat_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->fstat,
- fd);
+ fd, xdata);
return 0;
}
@@ -787,7 +788,7 @@ uncached:
int
mdc_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 *prebuf, struct iatt *postbuf, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -802,7 +803,8 @@ mdc_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
mdc_inode_iatt_set (this, local->loc.inode, postbuf);
out:
- MDC_STACK_UNWIND (truncate, frame, op_ret, op_errno, prebuf, postbuf);
+ MDC_STACK_UNWIND (truncate, frame, op_ret, op_errno, prebuf, postbuf,
+ xdata);
return 0;
}
@@ -810,7 +812,7 @@ out:
int
mdc_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc,
- off_t offset)
+ off_t offset, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -820,7 +822,7 @@ mdc_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc,
STACK_WIND (frame, mdc_truncate_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->truncate,
- loc, offset);
+ loc, offset, xdata);
return 0;
}
@@ -828,7 +830,7 @@ mdc_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc,
int
mdc_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 *prebuf, struct iatt *postbuf, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -843,7 +845,8 @@ mdc_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
mdc_inode_iatt_set (this, local->fd->inode, postbuf);
out:
- MDC_STACK_UNWIND (ftruncate, frame, op_ret, op_errno, prebuf, postbuf);
+ MDC_STACK_UNWIND (ftruncate, frame, op_ret, op_errno, prebuf, postbuf,
+ xdata);
return 0;
}
@@ -851,7 +854,7 @@ out:
int
mdc_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd,
- off_t offset)
+ off_t offset, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -861,7 +864,7 @@ mdc_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, mdc_ftruncate_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->ftruncate,
- fd, offset);
+ fd, offset, xdata);
return 0;
}
@@ -869,7 +872,8 @@ mdc_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd,
int
mdc_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 *buf, struct iatt *preparent,
+ struct iatt *postparent, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -891,25 +895,25 @@ mdc_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
out:
MDC_STACK_UNWIND (mknod, frame, op_ret, op_errno, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
int
mdc_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc,
- mode_t mode, dev_t rdev, dict_t *params)
+ mode_t mode, dev_t rdev, mode_t umask, dict_t *xdata)
{
mdc_local_t *local = NULL;
local = mdc_local_get (frame);
loc_copy (&local->loc, loc);
- local->xattr = dict_ref (params);
+ local->xattr = dict_ref (xdata);
STACK_WIND (frame, mdc_mknod_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->mknod,
- loc, mode, rdev, params);
+ loc, mode, rdev, umask, xdata);
return 0;
}
@@ -917,7 +921,8 @@ mdc_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc,
int
mdc_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 *buf, struct iatt *preparent,
+ struct iatt *postparent, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -939,25 +944,25 @@ mdc_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
out:
MDC_STACK_UNWIND (mkdir, frame, op_ret, op_errno, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
int
mdc_mkdir (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)
{
mdc_local_t *local = NULL;
local = mdc_local_get (frame);
loc_copy (&local->loc, loc);
- local->xattr = dict_ref (params);
+ local->xattr = dict_ref (xdata);
STACK_WIND (frame, mdc_mkdir_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->mkdir,
- loc, mode, params);
+ loc, mode, umask, xdata);
return 0;
}
@@ -965,7 +970,7 @@ mdc_mkdir (call_frame_t *frame, xlator_t *this, loc_t *loc,
int
mdc_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)
{
mdc_local_t *local = NULL;
@@ -987,13 +992,14 @@ mdc_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
MDC_STACK_UNWIND (unlink, frame, op_ret, op_errno,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
int
-mdc_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc)
+mdc_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t xflag,
+ dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1003,7 +1009,7 @@ mdc_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc)
STACK_WIND (frame, mdc_unlink_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->unlink,
- loc);
+ loc, xflag, xdata);
return 0;
}
@@ -1011,7 +1017,7 @@ mdc_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc)
int
mdc_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 *preparent, struct iatt *postparent, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1029,13 +1035,14 @@ mdc_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
MDC_STACK_UNWIND (rmdir, frame, op_ret, op_errno,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
int
-mdc_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flag)
+mdc_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flag,
+ dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1045,7 +1052,7 @@ mdc_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flag)
STACK_WIND (frame, mdc_rmdir_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->rmdir,
- loc, flag);
+ loc, flag, xdata);
return 0;
}
@@ -1053,7 +1060,8 @@ mdc_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flag)
int
mdc_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 *buf, struct iatt *preparent,
+ struct iatt *postparent, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1074,14 +1082,14 @@ mdc_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
out:
MDC_STACK_UNWIND (symlink, frame, op_ret, op_errno, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
int
mdc_symlink (call_frame_t *frame, xlator_t *this, const char *linkname,
- loc_t *loc, dict_t *params)
+ loc_t *loc, mode_t umask, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1093,7 +1101,7 @@ mdc_symlink (call_frame_t *frame, xlator_t *this, const char *linkname,
STACK_WIND (frame, mdc_symlink_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->symlink,
- linkname, loc, params);
+ linkname, loc, umask, xdata);
return 0;
}
@@ -1102,7 +1110,8 @@ int
mdc_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)
{
mdc_local_t *local = NULL;
@@ -1131,14 +1140,15 @@ mdc_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
out:
MDC_STACK_UNWIND (rename, frame, op_ret, op_errno, buf,
- preoldparent, postoldparent, prenewparent, postnewparent);
+ preoldparent, postoldparent, prenewparent,
+ postnewparent, xdata);
return 0;
}
int
mdc_rename (call_frame_t *frame, xlator_t *this,
- loc_t *oldloc, loc_t *newloc)
+ loc_t *oldloc, loc_t *newloc, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1149,7 +1159,7 @@ mdc_rename (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, mdc_rename_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->rename,
- oldloc, newloc);
+ oldloc, newloc, xdata);
return 0;
}
@@ -1157,7 +1167,7 @@ mdc_rename (call_frame_t *frame, xlator_t *this,
int
mdc_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 *preparent, struct iatt *postparent, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1178,14 +1188,14 @@ mdc_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
out:
MDC_STACK_UNWIND (link, frame, op_ret, op_errno, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
int
mdc_link (call_frame_t *frame, xlator_t *this,
- loc_t *oldloc, loc_t *newloc)
+ loc_t *oldloc, loc_t *newloc, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1196,7 +1206,7 @@ mdc_link (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, mdc_link_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->link,
- oldloc, newloc);
+ oldloc, newloc, xdata);
return 0;
}
@@ -1204,7 +1214,8 @@ mdc_link (call_frame_t *frame, xlator_t *this,
int
mdc_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 *buf, struct iatt *preparent,
+ struct iatt *postparent, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1226,25 +1237,25 @@ mdc_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
out:
MDC_STACK_UNWIND (create, frame, op_ret, op_errno, fd, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
int
mdc_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags,
- mode_t mode, fd_t *fd, dict_t *params)
+ mode_t mode, mode_t umask, fd_t *fd, dict_t *xdata)
{
mdc_local_t *local = NULL;
local = mdc_local_get (frame);
loc_copy (&local->loc, loc);
- local->xattr = dict_ref (params);
+ local->xattr = dict_ref (xdata);
STACK_WIND (frame, mdc_create_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->create,
- loc, flags, mode, fd, params);
+ loc, flags, mode, umask, fd, xdata);
return 0;
}
@@ -1253,7 +1264,7 @@ int
mdc_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)
+ struct iatt *stbuf, struct iobref *iobref, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1269,7 +1280,7 @@ mdc_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
MDC_STACK_UNWIND (readv, frame, op_ret, op_errno, vector, count,
- stbuf, iobref);
+ stbuf, iobref, xdata);
return 0;
}
@@ -1277,7 +1288,7 @@ out:
int
mdc_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)
{
mdc_local_t *local = NULL;
@@ -1287,7 +1298,7 @@ mdc_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
STACK_WIND (frame, mdc_readv_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->readv,
- fd, size, offset, flags);
+ fd, size, offset, flags, xdata);
return 0;
}
@@ -1295,7 +1306,7 @@ mdc_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
int
mdc_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 *prebuf, struct iatt *postbuf, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1310,7 +1321,8 @@ mdc_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
mdc_inode_iatt_set (this, local->fd->inode, postbuf);
out:
- MDC_STACK_UNWIND (writev, frame, op_ret, op_errno, prebuf, postbuf);
+ MDC_STACK_UNWIND (writev, frame, op_ret, op_errno, prebuf, postbuf,
+ xdata);
return 0;
}
@@ -1318,7 +1330,8 @@ out:
int
mdc_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
- int count, off_t offset, uint32_t flags, struct iobref *iobref)
+ int count, off_t offset, uint32_t flags, struct iobref *iobref,
+ dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1328,7 +1341,7 @@ mdc_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
STACK_WIND (frame, mdc_writev_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->writev,
- fd, vector, count, offset, flags, iobref);
+ fd, vector, count, offset, flags, iobref, xdata);
return 0;
}
@@ -1336,7 +1349,7 @@ mdc_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
int
mdc_setattr_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)
{
mdc_local_t *local = NULL;
@@ -1353,7 +1366,8 @@ mdc_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
mdc_inode_iatt_set (this, local->loc.inode, postbuf);
out:
- MDC_STACK_UNWIND (setattr, frame, op_ret, op_errno, prebuf, postbuf);
+ MDC_STACK_UNWIND (setattr, frame, op_ret, op_errno, prebuf, postbuf,
+ xdata);
return 0;
}
@@ -1361,7 +1375,7 @@ out:
int
mdc_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
- struct iatt *stbuf, int valid)
+ struct iatt *stbuf, int valid, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1371,7 +1385,7 @@ mdc_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
STACK_WIND (frame, mdc_setattr_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->setattr,
- loc, stbuf, valid);
+ loc, stbuf, valid, xdata);
return 0;
}
@@ -1379,7 +1393,7 @@ mdc_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
int
mdc_fsetattr_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)
{
mdc_local_t *local = NULL;
@@ -1394,7 +1408,8 @@ mdc_fsetattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
mdc_inode_iatt_set (this, local->fd->inode, postbuf);
out:
- MDC_STACK_UNWIND (fsetattr, frame, op_ret, op_errno, prebuf, postbuf);
+ MDC_STACK_UNWIND (fsetattr, frame, op_ret, op_errno, prebuf, postbuf,
+ xdata);
return 0;
}
@@ -1402,7 +1417,7 @@ out:
int
mdc_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
- struct iatt *stbuf, int valid)
+ struct iatt *stbuf, int valid, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1412,7 +1427,7 @@ mdc_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, mdc_setattr_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->fsetattr,
- fd, stbuf, valid);
+ fd, stbuf, valid, xdata);
return 0;
}
@@ -1420,7 +1435,7 @@ mdc_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
int
mdc_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)
{
mdc_local_t *local = NULL;
@@ -1435,14 +1450,16 @@ mdc_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
mdc_inode_iatt_set (this, local->fd->inode, postbuf);
out:
- MDC_STACK_UNWIND (fsync, frame, op_ret, op_errno, prebuf, postbuf);
+ MDC_STACK_UNWIND (fsync, frame, op_ret, op_errno, prebuf, postbuf,
+ xdata);
return 0;
}
int
-mdc_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync)
+mdc_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync,
+ dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1452,14 +1469,14 @@ mdc_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync)
STACK_WIND (frame, mdc_fsync_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->fsync,
- fd, datasync);
+ fd, datasync, xdata);
return 0;
}
int
mdc_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)
{
mdc_local_t *local = NULL;
@@ -1474,7 +1491,7 @@ mdc_setxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
mdc_inode_xatt_update (this, local->loc.inode, local->xattr);
out:
- MDC_STACK_UNWIND (setxattr, frame, op_ret, op_errno);
+ MDC_STACK_UNWIND (setxattr, frame, op_ret, op_errno, xdata);
return 0;
}
@@ -1482,7 +1499,7 @@ out:
int
mdc_setxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
- dict_t *xattr, int flags)
+ dict_t *xattr, int flags, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1493,14 +1510,14 @@ mdc_setxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
STACK_WIND (frame, mdc_setxattr_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->setxattr,
- loc, xattr, flags);
+ loc, xattr, flags, xdata);
return 0;
}
int
mdc_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)
{
mdc_local_t *local = NULL;
@@ -1515,7 +1532,7 @@ mdc_fsetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
mdc_inode_xatt_update (this, local->fd->inode, local->xattr);
out:
- MDC_STACK_UNWIND (fsetxattr, frame, op_ret, op_errno);
+ MDC_STACK_UNWIND (fsetxattr, frame, op_ret, op_errno, xdata);
return 0;
}
@@ -1523,7 +1540,7 @@ out:
int
mdc_fsetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
- dict_t *xattr, int flags)
+ dict_t *xattr, int flags, dict_t *xdata)
{
mdc_local_t *local = NULL;
@@ -1534,13 +1551,14 @@ mdc_fsetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, mdc_fsetxattr_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->fsetxattr,
- fd, xattr, flags);
+ fd, xattr, flags, xdata);
return 0;
}
int
mdc_getxattr_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)
{
mdc_local_t *local = NULL;
@@ -1554,14 +1572,15 @@ mdc_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
mdc_inode_xatt_update (this, local->loc.inode, xattr);
out:
- MDC_STACK_UNWIND (getxattr, frame, op_ret, op_errno, xattr);
+ MDC_STACK_UNWIND (getxattr, frame, op_ret, op_errno, xattr, xdata);
return 0;
}
int
-mdc_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, const char *key)
+mdc_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, const char *key,
+ dict_t *xdata)
{
int ret;
mdc_local_t *local = NULL;
@@ -1583,21 +1602,22 @@ mdc_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, const char *key)
if (!dict_get (xattr, (char *)key))
goto uncached;
- MDC_STACK_UNWIND (getxattr, frame, 0, 0, xattr);
+ MDC_STACK_UNWIND (getxattr, frame, 0, 0, xattr, xdata);
return 0;
uncached:
STACK_WIND (frame, mdc_getxattr_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->getxattr,
- loc, key);
+ loc, key, xdata);
return 0;
}
int
mdc_fgetxattr_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)
{
mdc_local_t *local = NULL;
@@ -1611,14 +1631,15 @@ mdc_fgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
mdc_inode_xatt_update (this, local->fd->inode, xattr);
out:
- MDC_STACK_UNWIND (fgetxattr, frame, op_ret, op_errno, xattr);
+ MDC_STACK_UNWIND (fgetxattr, frame, op_ret, op_errno, xattr, xdata);
return 0;
}
int
-mdc_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, const char *key)
+mdc_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, const char *key,
+ dict_t *xdata)
{
int ret;
mdc_local_t *local = NULL;
@@ -1640,21 +1661,21 @@ mdc_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, const char *key)
if (!dict_get (xattr, (char *)key))
goto uncached;
- MDC_STACK_UNWIND (fgetxattr, frame, 0, 0, xattr);
+ MDC_STACK_UNWIND (fgetxattr, frame, 0, 0, xattr, xdata);
return 0;
uncached:
STACK_WIND (frame, mdc_fgetxattr_cbk,
FIRST_CHILD(this), FIRST_CHILD(this)->fops->fgetxattr,
- fd, key);
+ fd, key, xdata);
return 0;
}
int
mdc_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)
{
gf_dirent_t *entry = NULL;
@@ -1669,39 +1690,43 @@ mdc_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
unwind:
- STACK_UNWIND_STRICT (readdirp, frame, op_ret, op_errno, entries);
+ STACK_UNWIND_STRICT (readdirp, frame, op_ret, op_errno, entries, xdata);
return 0;
}
int
mdc_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd,
- size_t size, off_t offset, dict_t *xattr_req)
+ size_t size, off_t offset, dict_t *xdata)
{
STACK_WIND (frame, mdc_readdirp_cbk,
FIRST_CHILD (this), FIRST_CHILD (this)->fops->readdirp,
- fd, size, offset, xattr_req);
+ fd, size, offset, xdata);
return 0;
}
int
mdc_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd,
- size_t size, off_t offset)
+ size_t size, off_t offset, dict_t *xdata)
{
- dict_t *xattr_req = NULL;
+ int need_unref = 0;
- xattr_req = dict_new ();
+ if (!xdata) {
+ xdata = dict_new ();
+ need_unref = 1;
+ }
- if (xattr_req) {
- mdc_load_reqs (this, xattr_req);
- }
+ if (xdata)
+ mdc_load_reqs (this, xdata);
STACK_WIND (frame, mdc_readdirp_cbk,
FIRST_CHILD (this), FIRST_CHILD (this)->fops->readdirp,
- fd, size, offset, xattr_req);
+ fd, size, offset, xdata);
+
+ if (need_unref && xdata)
+ dict_unref (xdata);
- dict_unref (xattr_req);
return 0;
}
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 56f665f67..fed814460 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -48,7 +48,7 @@ out:
int32_t
qr_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);
static void
@@ -301,7 +301,7 @@ out:
int32_t
qr_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)
{
data_t *content = NULL;
qr_inode_t *qr_inode = NULL;
@@ -314,7 +314,7 @@ qr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
GF_ASSERT (frame);
- if ((op_ret == -1) || (dict == NULL)) {
+ if ((op_ret == -1) || (xdata == NULL)) {
goto out;
}
@@ -349,7 +349,7 @@ qr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto out;
}
- content = dict_get (dict, GF_CONTENT_KEY);
+ content = dict_get (xdata, GF_CONTENT_KEY);
if (content == NULL) {
goto out;
}
@@ -397,7 +397,7 @@ qr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
table->cache_used -= qr_inode->stbuf.ia_size;
}
- qr_inode->xattr = dict_ref (dict);
+ qr_inode->xattr = dict_ref (xdata);
qr_inode->stbuf = *buf;
table->cache_used += buf->ia_size;
@@ -414,7 +414,7 @@ out:
* FIXME: content size in dict can be greater than the size application
* requested for. Applications need to be careful till this is fixed.
*/
- QR_STACK_UNWIND (lookup, frame, op_ret, op_errno, inode, buf, dict,
+ QR_STACK_UNWIND (lookup, frame, op_ret, op_errno, inode, buf, xdata,
postparent);
return 0;
@@ -422,7 +422,8 @@ out:
int32_t
-qr_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req)
+qr_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ dict_t *xdata)
{
qr_conf_t *conf = NULL;
dict_t *new_req_dict = NULL;
@@ -473,9 +474,9 @@ qr_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req)
}
UNLOCK (&table->lock);
- if ((xattr_req == NULL) && (conf->max_file_size > 0)) {
- new_req_dict = xattr_req = dict_new ();
- if (xattr_req == NULL) {
+ if ((xdata == NULL) && (conf->max_file_size > 0)) {
+ new_req_dict = xdata = dict_new ();
+ if (xdata == NULL) {
op_ret = -1;
op_errno = ENOMEM;
goto unwind;
@@ -483,8 +484,8 @@ qr_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req)
}
if (!cached) {
- if (xattr_req) {
- content = dict_get (xattr_req, GF_CONTENT_KEY);
+ if (xdata) {
+ content = dict_get (xdata, GF_CONTENT_KEY);
if (content) {
requested_size = data_to_uint64 (content);
}
@@ -495,7 +496,7 @@ qr_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req)
size = (conf->max_file_size > requested_size) ?
conf->max_file_size : requested_size;
- op_ret = dict_set (xattr_req, GF_CONTENT_KEY,
+ op_ret = dict_set (xdata, GF_CONTENT_KEY,
data_from_uint64 (size));
if (op_ret < 0) {
op_ret = -1;
@@ -510,7 +511,7 @@ qr_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req)
}
STACK_WIND (frame, qr_lookup_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->lookup, loc, xattr_req);
+ FIRST_CHILD(this)->fops->lookup, loc, xdata);
if (new_req_dict) {
dict_unref (new_req_dict);
@@ -519,8 +520,8 @@ qr_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req)
return 0;
unwind:
- QR_STACK_UNWIND (lookup, frame, op_ret, op_errno, NULL, NULL, NULL,
- NULL);
+ QR_STACK_UNWIND (lookup, frame, op_ret, op_errno, NULL, NULL,
+ NULL, NULL);
if (new_req_dict) {
dict_unref (new_req_dict);
@@ -532,7 +533,7 @@ unwind:
int32_t
qr_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_errno, fd_t *fd, dict_t *xdata)
{
uint64_t value = 0;
int32_t ret = -1;
@@ -618,7 +619,7 @@ qr_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
}
out:
if (is_open) {
- QR_STACK_UNWIND (open, frame, op_ret, op_errno, fd);
+ QR_STACK_UNWIND (open, frame, op_ret, op_errno, fd, xdata);
} else {
STACK_DESTROY (frame->root);
}
@@ -629,7 +630,7 @@ out:
int32_t
qr_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)
{
qr_inode_t *qr_inode = NULL;
int32_t ret = -1;
@@ -668,7 +669,6 @@ qr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
}
qr_fd_ctx->flags = flags;
- qr_fd_ctx->wbflags = wbflags;
ret = fd_ctx_set (fd, this, (uint64_t)(long)qr_fd_ctx);
if (ret == -1) {
@@ -717,8 +717,7 @@ qr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
if (!content_cached || ((flags & O_ACCMODE) == O_WRONLY)
|| ((flags & O_TRUNC) == O_TRUNC)
- || ((flags & O_DIRECT) == O_DIRECT)
- || ((wbflags & GF_OPEN_NOWB) != 0)) {
+ || ((flags & O_DIRECT) == O_DIRECT)) {
LOCK (&qr_fd_ctx->lock);
{
/*
@@ -727,8 +726,7 @@ qr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
*/
qr_fd_ctx->open_in_transit = 1;
- if (((flags & O_DIRECT) == O_DIRECT)
- || ((wbflags & GF_OPEN_NOWB)) != 0) {
+ if ((flags & O_DIRECT) == O_DIRECT) {
qr_fd_ctx->disabled = 1;
}
}
@@ -745,12 +743,13 @@ unwind:
qr_fd_ctx_free (tmp_fd_ctx);
}
- QR_STACK_UNWIND (open, frame, op_ret, op_errno, fd);
+ QR_STACK_UNWIND (open, frame, op_ret, op_errno, fd, NULL);
return 0;
wind:
STACK_WIND (frame, qr_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;
}
@@ -791,7 +790,8 @@ out:
static int32_t
qr_validate_cache_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)
{
qr_inode_t *qr_inode = NULL;
qr_local_t *local = NULL;
@@ -858,13 +858,15 @@ qr_validate_cache_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
unwind:
/* this is actually unwind of readv */
- QR_STACK_UNWIND (readv, frame, op_ret, op_errno, NULL, -1, NULL, NULL);
+ QR_STACK_UNWIND (readv, frame, op_ret, op_errno, NULL, -1, NULL, NULL,
+ NULL);
return 0;
}
int32_t
-qr_validate_cache_helper (call_frame_t *frame, xlator_t *this, fd_t *fd)
+qr_validate_cache_helper (call_frame_t *frame, xlator_t *this, fd_t *fd,
+ dict_t *xdata)
{
qr_local_t *local = NULL;
int32_t op_ret = -1, op_errno = -1;
@@ -884,10 +886,10 @@ qr_validate_cache_helper (call_frame_t *frame, xlator_t *this, fd_t *fd)
out:
if (op_ret == -1) {
qr_validate_cache_cbk (frame, NULL, this, op_ret, op_errno,
- NULL);
+ NULL, NULL);
} else {
STACK_WIND (frame, qr_validate_cache_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fstat, fd);
+ FIRST_CHILD (this)->fops->fstat, fd, xdata);
}
return 0;
@@ -949,7 +951,7 @@ qr_validate_cache (call_frame_t *frame, xlator_t *this, fd_t *fd,
} else {
validate_stub = fop_fstat_stub (frame,
qr_validate_cache_helper,
- fd);
+ fd, NULL);
if (validate_stub == NULL) {
ret = -1;
if (need_open) {
@@ -990,12 +992,12 @@ qr_validate_cache (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (open_frame, qr_open_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open,
- &loc, flags, fd, qr_fd_ctx->wbflags);
+ &loc, flags, fd, NULL);
qr_loc_wipe (&loc);
} else if (can_wind) {
STACK_WIND (frame, qr_validate_cache_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fstat, fd);
+ FIRST_CHILD (this)->fops->fstat, fd, NULL);
}
ret = 0;
@@ -1005,7 +1007,7 @@ out:
call_stub_destroy (stub);
}
- qr_validate_cache_cbk (frame, NULL, this, -1, errno, NULL);
+ qr_validate_cache_cbk (frame, NULL, this, -1, errno, NULL, NULL);
}
return ret;
}
@@ -1014,19 +1016,19 @@ out:
int32_t
qr_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)
+ struct iatt *stbuf, struct iobref *iobref, dict_t *xdata)
{
GF_ASSERT (frame);
QR_STACK_UNWIND (readv, frame, op_ret, op_errno, vector, count,
- stbuf, iobref);
+ stbuf, iobref, xdata);
return 0;
}
int32_t
qr_readv_helper (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)
{
qr_local_t *local = NULL;
int32_t op_errno = EINVAL, ret = 0;
@@ -1055,18 +1057,19 @@ qr_readv_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
}
STACK_WIND (frame, qr_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;
unwind:
- QR_STACK_UNWIND (readv, frame, -1, op_errno, NULL, 0, NULL, NULL);
+ QR_STACK_UNWIND (readv, frame, -1, op_errno, NULL, 0, NULL, NULL, NULL);
return 0;
}
int32_t
qr_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
- off_t offset, uint32_t read_flags)
+ off_t offset, uint32_t read_flags, dict_t *xdata)
{
qr_inode_t *qr_inode = NULL;
int32_t ret = -1, op_ret = -1, op_errno = -1;
@@ -1216,11 +1219,11 @@ unlock:
out:
if (content_cached || need_unwind) {
QR_STACK_UNWIND (readv, frame, op_ret, op_errno, vector,
- count, &stbuf, iobref);
+ count, &stbuf, iobref, NULL);
} else if (need_validation) {
stub = fop_readv_stub (frame, qr_readv, fd, size, offset,
- read_flags);
+ read_flags, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -1259,7 +1262,7 @@ out:
qr_readv_helper,
fd, size,
offset,
- read_flags);
+ read_flags, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -1299,13 +1302,13 @@ out:
STACK_WIND (open_frame, qr_open_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open,
- &loc, flags, fd, qr_fd_ctx->wbflags);
+ &loc, flags, fd, NULL);
qr_loc_wipe (&loc);
} else if (can_wind) {
STACK_WIND (frame, qr_readv_cbk, FIRST_CHILD (this),
FIRST_CHILD (this)->fops->readv, fd, size,
- offset, read_flags);
+ offset, read_flags, xdata);
}
}
@@ -1325,10 +1328,11 @@ ret:
int32_t
qr_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)
{
GF_ASSERT (frame);
- QR_STACK_UNWIND (writev, frame, op_ret, op_errno, prebuf, postbuf);
+ QR_STACK_UNWIND (writev, frame, op_ret, op_errno, prebuf, postbuf,
+ xdata);
return 0;
}
@@ -1336,7 +1340,7 @@ qr_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t
qr_writev_helper (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)
{
qr_local_t *local = NULL;
qr_fd_ctx_t *fdctx = NULL;
@@ -1367,18 +1371,19 @@ qr_writev_helper (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, qr_writev_cbk, FIRST_CHILD (this),
FIRST_CHILD (this)->fops->writev, fd, vector, count, off,
- flags, iobref);
+ flags, iobref, xdata);
return 0;
unwind:
- QR_STACK_UNWIND (writev, frame, -1, op_errno, NULL, NULL);
+ QR_STACK_UNWIND (writev, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
int32_t
qr_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
- int32_t count, off_t off, uint32_t wr_flags, struct iobref *iobref)
+ int32_t count, off_t off, uint32_t wr_flags, struct iobref *iobref,
+ dict_t *xdata)
{
uint64_t value = 0;
int flags = 0;
@@ -1441,7 +1446,7 @@ qr_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
stub = fop_writev_stub (frame, qr_writev_helper,
fd, vector, count, off,
- wr_flags, iobref);
+ wr_flags, iobref, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -1461,11 +1466,11 @@ qr_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
}
if (need_unwind) {
- QR_STACK_UNWIND (writev, frame, op_ret, op_errno, NULL, NULL);
+ QR_STACK_UNWIND (writev, frame, op_ret, op_errno, NULL, NULL, NULL);
} else if (can_wind) {
STACK_WIND (frame, qr_writev_cbk, FIRST_CHILD (this),
FIRST_CHILD (this)->fops->writev, fd, vector, count,
- off, wr_flags, iobref);
+ off, wr_flags, iobref, xdata);
} else if (need_open) {
op_ret = qr_loc_fill (&loc, fd->inode, path);
if (op_ret == -1) {
@@ -1482,7 +1487,7 @@ qr_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
STACK_WIND (open_frame, qr_open_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open, &loc, flags, fd,
- qr_fd_ctx->wbflags);
+ NULL);
qr_loc_wipe (&loc);
}
@@ -1494,15 +1499,15 @@ ret:
int32_t
qr_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_errno, struct iatt *buf, dict_t *xdata)
{
- QR_STACK_UNWIND (fstat, frame, op_ret, op_errno, buf);
+ QR_STACK_UNWIND (fstat, frame, op_ret, op_errno, buf, xdata);
return 0;
}
int32_t
-qr_fstat_helper (call_frame_t *frame, xlator_t *this, fd_t *fd)
+qr_fstat_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
qr_local_t *local = NULL;
qr_fd_ctx_t *fdctx = NULL;
@@ -1532,17 +1537,17 @@ qr_fstat_helper (call_frame_t *frame, xlator_t *this, fd_t *fd)
}
STACK_WIND (frame, qr_fstat_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fstat, fd);
+ FIRST_CHILD (this)->fops->fstat, fd, xdata);
return 0;
unwind:
- QR_STACK_UNWIND (fstat, frame, -1, op_errno, NULL);
+ QR_STACK_UNWIND (fstat, frame, -1, op_errno, NULL, NULL);
return 0;
}
int32_t
-qr_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
+qr_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
qr_fd_ctx_t *qr_fd_ctx = NULL;
char need_open = 0, can_wind = 0, need_unwind = 0;
@@ -1593,7 +1598,7 @@ qr_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
}
stub = fop_fstat_stub (frame, qr_fstat_helper,
- fd);
+ fd, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -1614,10 +1619,10 @@ qr_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
unwind:
if (need_unwind) {
- QR_STACK_UNWIND (fstat, frame, op_ret, op_errno, NULL);
+ QR_STACK_UNWIND (fstat, frame, op_ret, op_errno, NULL, NULL);
} else if (can_wind) {
STACK_WIND (frame, qr_fstat_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fstat, fd);
+ FIRST_CHILD (this)->fops->fstat, fd, xdata);
} else if (need_open) {
op_ret = qr_loc_fill (&loc, fd->inode, path);
if (op_ret == -1) {
@@ -1634,7 +1639,7 @@ unwind:
STACK_WIND (open_frame, qr_open_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open, &loc, flags, fd,
- qr_fd_ctx->wbflags);
+ NULL);
qr_loc_wipe (&loc);
}
@@ -1647,17 +1652,18 @@ ret:
int32_t
qr_fsetattr_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)
{
GF_ASSERT (frame);
- QR_STACK_UNWIND (fsetattr, frame, op_ret, op_errno, preop, postop);
+ QR_STACK_UNWIND (fsetattr, frame, op_ret, op_errno, preop, postop,
+ xdata);
return 0;
}
int32_t
qr_fsetattr_helper (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)
{
qr_local_t *local = NULL;
qr_fd_ctx_t *fdctx = NULL;
@@ -1689,18 +1695,18 @@ qr_fsetattr_helper (call_frame_t *frame, xlator_t *this, fd_t *fd,
STACK_WIND (frame, qr_fsetattr_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->fsetattr, fd, stbuf,
- valid);
+ valid, xdata);
return 0;
unwind:
- QR_STACK_UNWIND (fsetattr, frame, -1, op_errno, NULL, NULL);
+ QR_STACK_UNWIND (fsetattr, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
int32_t
qr_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)
{
uint64_t value = 0;
int flags = 0;
@@ -1751,7 +1757,7 @@ qr_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
stub = fop_fsetattr_stub (frame,
qr_fsetattr_helper,
- fd, stbuf, valid);
+ fd, stbuf, valid, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -1772,11 +1778,12 @@ qr_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
out:
if (need_unwind) {
- QR_STACK_UNWIND (fsetattr, frame, op_ret, op_errno, NULL, NULL);
+ QR_STACK_UNWIND (fsetattr, frame, op_ret, op_errno, NULL, NULL,
+ NULL);
} else if (can_wind) {
STACK_WIND (frame, qr_fsetattr_cbk, FIRST_CHILD (this),
FIRST_CHILD (this)->fops->fsetattr, fd, stbuf,
- valid);
+ valid, xdata);
} else if (need_open) {
op_ret = qr_loc_fill (&loc, fd->inode, path);
if (op_ret == -1) {
@@ -1793,7 +1800,7 @@ out:
STACK_WIND (open_frame, qr_open_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open, &loc, flags, fd,
- qr_fd_ctx->wbflags);
+ NULL);
qr_loc_wipe (&loc);
}
@@ -1805,17 +1812,17 @@ ret:
int32_t
qr_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)
{
GF_ASSERT (frame);
- QR_STACK_UNWIND (fsetxattr, frame, op_ret, op_errno);
+ QR_STACK_UNWIND (fsetxattr, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
qr_fsetxattr_helper (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)
{
qr_local_t *local = NULL;
qr_fd_ctx_t *fdctx = NULL;
@@ -1846,18 +1853,19 @@ qr_fsetxattr_helper (call_frame_t *frame, xlator_t *this, fd_t *fd,
}
STACK_WIND (frame, qr_fsetxattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fsetxattr, fd, dict, flags);
+ FIRST_CHILD (this)->fops->fsetxattr, fd, dict, flags,
+ xdata);
return 0;
unwind:
- QR_STACK_UNWIND (fsetxattr, frame, -1, op_errno);
+ QR_STACK_UNWIND (fsetxattr, frame, -1, op_errno, NULL);
return 0;
}
int32_t
qr_fsetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *dict,
- int32_t flags)
+ int32_t flags, dict_t *xdata)
{
uint64_t value = 0;
call_stub_t *stub = NULL;
@@ -1909,7 +1917,7 @@ qr_fsetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *dict,
stub = fop_fsetxattr_stub (frame,
qr_fsetxattr_helper,
- fd, dict, flags);
+ fd, dict, flags, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -1930,11 +1938,11 @@ qr_fsetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *dict,
out:
if (need_unwind) {
- QR_STACK_UNWIND (fsetxattr, frame, op_ret, op_errno);
+ QR_STACK_UNWIND (fsetxattr, frame, op_ret, op_errno, NULL);
} else if (can_wind) {
STACK_WIND (frame, qr_fsetxattr_cbk, FIRST_CHILD (this),
FIRST_CHILD (this)->fops->fsetxattr, fd, dict,
- flags);
+ flags, xdata);
} else if (need_open) {
op_ret = qr_loc_fill (&loc, fd->inode, path);
if (op_ret == -1) {
@@ -1951,7 +1959,7 @@ out:
STACK_WIND (open_frame, qr_open_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open, &loc, open_flags,
- fd, qr_fd_ctx->wbflags);
+ fd, NULL);
qr_loc_wipe (&loc);
}
@@ -1963,17 +1971,17 @@ ret:
int32_t
qr_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)
{
GF_ASSERT (frame);
- QR_STACK_UNWIND (fgetxattr, frame, op_ret, op_errno, dict);
+ QR_STACK_UNWIND (fgetxattr, frame, op_ret, op_errno, dict, xdata);
return 0;
}
int32_t
qr_fgetxattr_helper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- const char *name)
+ const char *name, dict_t *xdata)
{
qr_local_t *local = NULL;
qr_fd_ctx_t *fdctx = NULL;
@@ -2004,17 +2012,18 @@ qr_fgetxattr_helper (call_frame_t *frame, xlator_t *this, fd_t *fd,
}
STACK_WIND (frame, qr_fgetxattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fgetxattr, fd, name);
+ FIRST_CHILD (this)->fops->fgetxattr, fd, name, xdata);
return 0;
unwind:
- QR_STACK_UNWIND (fgetxattr, frame, -1, op_errno, NULL);
+ QR_STACK_UNWIND (fgetxattr, frame, -1, op_errno, NULL, NULL);
return 0;
}
int32_t
-qr_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, const char *name)
+qr_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, const char *name,
+ dict_t *xdata)
{
int flags = 0;
uint64_t value = 0;
@@ -2071,7 +2080,7 @@ qr_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, const char *name)
stub = fop_fgetxattr_stub (frame,
qr_fgetxattr_helper,
- fd, name);
+ fd, name, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -2092,10 +2101,10 @@ qr_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, const char *name)
out:
if (need_unwind) {
- QR_STACK_UNWIND (open, frame, op_ret, op_errno, NULL);
+ QR_STACK_UNWIND (open, frame, op_ret, op_errno, NULL, NULL);
} else if (can_wind) {
STACK_WIND (frame, qr_fgetxattr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fgetxattr, fd, name);
+ FIRST_CHILD (this)->fops->fgetxattr, fd, name, xdata);
} else if (need_open) {
op_ret = qr_loc_fill (&loc, fd->inode, path);
if (op_ret == -1) {
@@ -2112,7 +2121,7 @@ out:
STACK_WIND (open_frame, qr_open_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open, &loc, flags, fd,
- qr_fd_ctx->wbflags);
+ NULL);
qr_loc_wipe (&loc);
}
@@ -2124,16 +2133,16 @@ ret:
int32_t
qr_flush_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)
{
GF_ASSERT (frame);
- QR_STACK_UNWIND (flush, frame, op_ret, op_errno);
+ QR_STACK_UNWIND (flush, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
-qr_flush_helper (call_frame_t *frame, xlator_t *this, fd_t *fd)
+qr_flush_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
qr_local_t *local = NULL;
qr_fd_ctx_t *fdctx = NULL;
@@ -2163,17 +2172,17 @@ qr_flush_helper (call_frame_t *frame, xlator_t *this, fd_t *fd)
}
STACK_WIND (frame, qr_flush_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->flush, fd);
+ FIRST_CHILD (this)->fops->flush, fd, xdata);
return 0;
unwind:
- QR_STACK_UNWIND (flush, frame, -1, op_errno);
+ QR_STACK_UNWIND (flush, frame, -1, op_errno, NULL);
return 0;
}
int32_t
-qr_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
+qr_flush (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
uint64_t value = 0;
call_stub_t *stub = NULL;
@@ -2211,7 +2220,7 @@ qr_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
}
stub = fop_flush_stub (frame, qr_flush_helper,
- fd);
+ fd, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -2235,10 +2244,10 @@ qr_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
out:
if (need_unwind) {
- QR_STACK_UNWIND (flush, frame, op_ret, op_errno);
+ QR_STACK_UNWIND (flush, frame, op_ret, op_errno, NULL);
} else if (can_wind) {
STACK_WIND (frame, qr_flush_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->flush, fd);
+ FIRST_CHILD (this)->fops->flush, fd, xdata);
}
return 0;
@@ -2247,10 +2256,10 @@ out:
int32_t
qr_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)
{
GF_ASSERT (frame);
- QR_STACK_UNWIND (fentrylk, frame, op_ret, op_errno);
+ QR_STACK_UNWIND (fentrylk, frame, op_ret, op_errno, xdata);
return 0;
}
@@ -2258,7 +2267,7 @@ qr_fentrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t
qr_fentrylk_helper (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)
{
qr_local_t *local = NULL;
qr_fd_ctx_t *fdctx = NULL;
@@ -2290,18 +2299,19 @@ qr_fentrylk_helper (call_frame_t *frame, xlator_t *this, const char *volume,
STACK_WIND(frame, qr_fentrylk_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->fentrylk, volume, fd, basename,
- cmd, type);
+ cmd, type, xdata);
return 0;
unwind:
- QR_STACK_UNWIND (fentrylk, frame, -1, op_errno);
+ QR_STACK_UNWIND (fentrylk, frame, -1, op_errno, NULL);
return 0;
}
int32_t
qr_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)
{
int flags = 0;
uint64_t value = 0;
@@ -2353,7 +2363,7 @@ qr_fentrylk (call_frame_t *frame, xlator_t *this, const char *volume, fd_t *fd,
stub = fop_fentrylk_stub (frame,
qr_fentrylk_helper,
volume, fd, basename,
- cmd, type);
+ cmd, type, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -2374,11 +2384,11 @@ qr_fentrylk (call_frame_t *frame, xlator_t *this, const char *volume, fd_t *fd,
out:
if (need_unwind) {
- QR_STACK_UNWIND (fentrylk, frame, op_ret, op_errno);
+ QR_STACK_UNWIND (fentrylk, frame, op_ret, op_errno, NULL);
} else if (can_wind) {
STACK_WIND (frame, qr_fentrylk_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->fentrylk, volume, fd,
- basename, cmd, type);
+ basename, cmd, type, xdata);
} else if (need_open) {
op_ret = qr_loc_fill (&loc, fd->inode, path);
if (op_ret == -1) {
@@ -2395,7 +2405,7 @@ out:
STACK_WIND (open_frame, qr_open_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open, &loc, flags, fd,
- qr_fd_ctx->wbflags);
+ NULL);
qr_loc_wipe (&loc);
}
@@ -2407,18 +2417,17 @@ ret:
int32_t
qr_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)
{
GF_ASSERT (frame);
- QR_STACK_UNWIND (finodelk, frame, op_ret, op_errno);
+ QR_STACK_UNWIND (finodelk, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
qr_finodelk_helper (call_frame_t *frame, xlator_t *this, const char *volume,
- fd_t *fd, int32_t cmd, struct gf_flock *lock)
+ fd_t *fd, int32_t cmd, struct gf_flock *lock, dict_t *xdata)
{
qr_local_t *local = NULL;
qr_fd_ctx_t *fdctx = NULL;
@@ -2449,18 +2458,19 @@ qr_finodelk_helper (call_frame_t *frame, xlator_t *this, const char *volume,
}
STACK_WIND (frame, qr_finodelk_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->finodelk, volume, fd, cmd, lock);
+ FIRST_CHILD(this)->fops->finodelk, volume, fd, cmd, lock,
+ xdata);
return 0;
unwind:
- QR_STACK_UNWIND (finodelk, frame, -1, op_errno);
+ QR_STACK_UNWIND (finodelk, frame, -1, op_errno, NULL);
return 0;
}
int32_t
qr_finodelk (call_frame_t *frame, xlator_t *this, const char *volume, fd_t *fd,
- int32_t cmd, struct gf_flock *lock)
+ int32_t cmd, struct gf_flock *lock, dict_t *xdata)
{
int flags = 0;
uint64_t value = 0;
@@ -2512,7 +2522,7 @@ qr_finodelk (call_frame_t *frame, xlator_t *this, const char *volume, fd_t *fd,
stub = fop_finodelk_stub (frame,
qr_finodelk_helper,
volume, fd, cmd,
- lock);
+ lock, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -2533,11 +2543,11 @@ qr_finodelk (call_frame_t *frame, xlator_t *this, const char *volume, fd_t *fd,
out:
if (need_unwind) {
- QR_STACK_UNWIND (finodelk, frame, op_ret, op_errno);
+ QR_STACK_UNWIND (finodelk, frame, op_ret, op_errno, NULL);
} else if (can_wind) {
STACK_WIND (frame, qr_finodelk_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->finodelk, volume, fd,
- cmd, lock);
+ cmd, lock, xdata);
} else if (need_open) {
op_ret = qr_loc_fill (&loc, fd->inode, path);
if (op_ret == -1) {
@@ -2554,7 +2564,7 @@ out:
STACK_WIND (open_frame, qr_open_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open, &loc, flags, fd,
- qr_fd_ctx->wbflags);
+ NULL);
qr_loc_wipe (&loc);
}
@@ -2566,16 +2576,18 @@ ret:
int32_t
qr_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)
+ int32_t op_errno, struct iatt *prebuf, struct iatt *postbuf,
+ dict_t *xdata)
{
GF_ASSERT (frame);
- QR_STACK_UNWIND (fsync, frame, op_ret, op_errno, prebuf, postbuf);
+ QR_STACK_UNWIND (fsync, frame, op_ret, op_errno, prebuf, postbuf, xdata);
return 0;
}
int32_t
-qr_fsync_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags)
+qr_fsync_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags,
+ dict_t *xdata)
{
qr_local_t *local = NULL;
qr_fd_ctx_t *fdctx = NULL;
@@ -2605,17 +2617,18 @@ qr_fsync_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags)
}
STACK_WIND (frame, qr_fsync_cbk, FIRST_CHILD (this),
- FIRST_CHILD(this)->fops->fsync, fd, flags);
+ FIRST_CHILD(this)->fops->fsync, fd, flags, xdata);
return 0;
unwind:
- QR_STACK_UNWIND (fsync, frame, -1, op_errno, NULL, NULL);
+ QR_STACK_UNWIND (fsync, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
int32_t
-qr_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags)
+qr_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags,
+ dict_t *xdata)
{
uint64_t value = 0;
call_stub_t *stub = NULL;
@@ -2665,7 +2678,7 @@ qr_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags)
}
stub = fop_fsync_stub (frame, qr_fsync_helper,
- fd, flags);
+ fd, flags, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -2686,10 +2699,10 @@ qr_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags)
out:
if (need_unwind) {
- QR_STACK_UNWIND (fsync, frame, op_ret, op_errno, NULL, NULL);
+ QR_STACK_UNWIND (fsync, frame, op_ret, op_errno, NULL, NULL, NULL);
} else if (can_wind) {
STACK_WIND (frame, qr_fsync_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fsync, fd, flags);
+ FIRST_CHILD (this)->fops->fsync, fd, flags, xdata);
} else if (need_open) {
op_ret = qr_loc_fill (&loc, fd->inode, path);
if (op_ret == -1) {
@@ -2706,7 +2719,7 @@ out:
STACK_WIND (open_frame, qr_open_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open, &loc, open_flags,
- fd, qr_fd_ctx->wbflags);
+ fd, NULL);
qr_loc_wipe (&loc);
}
@@ -2719,7 +2732,7 @@ ret:
int32_t
qr_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 ret = 0;
uint64_t value = 0;
@@ -2776,14 +2789,14 @@ qr_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
QR_STACK_UNWIND (ftruncate, frame, op_ret, op_errno, prebuf,
- postbuf);
+ postbuf, xdata);
return 0;
}
int32_t
qr_ftruncate_helper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- off_t offset)
+ off_t offset, dict_t *xdata)
{
qr_local_t *local = NULL;
qr_fd_ctx_t *fdctx = NULL;
@@ -2814,17 +2827,18 @@ qr_ftruncate_helper (call_frame_t *frame, xlator_t *this, fd_t *fd,
}
STACK_WIND (frame, qr_ftruncate_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->ftruncate, fd, offset);
+ FIRST_CHILD(this)->fops->ftruncate, fd, offset, xdata);
return 0;
unwind:
- QR_STACK_UNWIND (ftruncate, frame, -1, op_errno, NULL, NULL);
+ QR_STACK_UNWIND (ftruncate, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
int32_t
-qr_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
+qr_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
+ dict_t *xdata)
{
int flags = 0;
uint64_t value = 0;
@@ -2879,7 +2893,7 @@ qr_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
} else {
stub = fop_ftruncate_stub (frame,
qr_ftruncate_helper,
- fd, offset);
+ fd, offset, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -2901,10 +2915,10 @@ qr_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
out:
if (need_unwind) {
QR_STACK_UNWIND (ftruncate, frame, op_ret, op_errno, NULL,
- NULL);
+ NULL, NULL);
} else if (can_wind) {
STACK_WIND (frame, qr_ftruncate_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->ftruncate, fd, offset);
+ FIRST_CHILD(this)->fops->ftruncate, fd, offset, xdata);
} else if (need_open) {
op_ret = qr_loc_fill (&loc, fd->inode, path);
if (op_ret == -1) {
@@ -2921,7 +2935,7 @@ out:
STACK_WIND (open_frame, qr_open_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open, &loc, flags, fd,
- qr_fd_ctx->wbflags);
+ NULL);
qr_loc_wipe (&loc);
}
@@ -2933,17 +2947,17 @@ ret:
int32_t
qr_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_errno, struct gf_flock *lock, dict_t *xdata)
{
GF_ASSERT (frame);
- QR_STACK_UNWIND (lk, frame, op_ret, op_errno, lock);
+ QR_STACK_UNWIND (lk, frame, op_ret, op_errno, lock, xdata);
return 0;
}
int32_t
qr_lk_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
- struct gf_flock *lock)
+ struct gf_flock *lock, dict_t *xdata)
{
qr_local_t *local = NULL;
qr_fd_ctx_t *fdctx = NULL;
@@ -2973,19 +2987,19 @@ qr_lk_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
}
STACK_WIND (frame, qr_lk_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->lk, fd, cmd, lock);
+ FIRST_CHILD(this)->fops->lk, fd, cmd, lock, xdata);
return 0;
unwind:
- QR_STACK_UNWIND (lk, frame, -1, op_errno, NULL);
+ QR_STACK_UNWIND (lk, frame, -1, op_errno, NULL, NULL);
return 0;
}
int32_t
qr_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
- struct gf_flock *lock)
+ struct gf_flock *lock, dict_t *xdata)
{
int flags = 0;
uint64_t value = 0;
@@ -3036,7 +3050,7 @@ qr_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
}
stub = fop_lk_stub (frame, qr_lk_helper, fd,
- cmd, lock);
+ cmd, lock, xdata);
if (stub == NULL) {
op_ret = -1;
op_errno = ENOMEM;
@@ -3057,10 +3071,10 @@ qr_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
out:
if (need_unwind) {
- QR_STACK_UNWIND (lk, frame, op_ret, op_errno, NULL);
+ QR_STACK_UNWIND (lk, frame, op_ret, op_errno, NULL, NULL);
} else if (can_wind) {
STACK_WIND (frame, qr_lk_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->lk, fd, cmd, lock);
+ FIRST_CHILD(this)->fops->lk, fd, cmd, lock, xdata);
} else if (need_open) {
op_ret = qr_loc_fill (&loc, fd->inode, path);
if (op_ret == -1) {
@@ -3077,7 +3091,7 @@ out:
STACK_WIND (open_frame, qr_open_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->open, &loc, flags, fd,
- qr_fd_ctx->wbflags);
+ NULL);
qr_loc_wipe (&loc);
}
@@ -3218,8 +3232,6 @@ qr_fdctx_dump (xlator_t *this, fd_t *fd)
gf_proc_dump_write ("flags", "%d", fdctx->flags);
- gf_proc_dump_write ("wbflags", "%d", fdctx->wbflags);
-
list_for_each_entry (stub, &fdctx->waiting_ops, list) {
gf_proc_dump_build_key (key, "",
"waiting-ops[%d].frame", i);
diff --git a/xlators/performance/read-ahead/src/page.c b/xlators/performance/read-ahead/src/page.c
index 52b3fdaf3..bc8bb8d58 100644
--- a/xlators/performance/read-ahead/src/page.c
+++ b/xlators/performance/read-ahead/src/page.c
@@ -142,7 +142,8 @@ ra_waitq_return (ra_waitq_t *waitq)
int
ra_fault_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)
{
ra_local_t *local = NULL;
off_t pending_offset = 0;
@@ -278,7 +279,7 @@ ra_page_fault (ra_file_t *file, call_frame_t *frame, off_t offset)
STACK_WIND (fault_frame, ra_fault_cbk,
FIRST_CHILD (fault_frame->this),
FIRST_CHILD (fault_frame->this)->fops->readv,
- file->fd, file->page_size, offset, 0);
+ file->fd, file->page_size, offset, 0, NULL);
return;
@@ -447,7 +448,7 @@ ra_frame_unwind (call_frame_t *frame)
file = (ra_file_t *)(long)tmp_file;
STACK_UNWIND_STRICT (readv, frame, local->op_ret, local->op_errno,
- vector, count, &file->stbuf, iobref);
+ vector, count, &file->stbuf, iobref, NULL);
iobref_unref (iobref);
pthread_mutex_destroy (&local->local_lock);
diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c
index 718bf3398..9019943fd 100644
--- a/xlators/performance/read-ahead/src/read-ahead.c
+++ b/xlators/performance/read-ahead/src/read-ahead.c
@@ -44,12 +44,11 @@ read_ahead (call_frame_t *frame, ra_file_t *file);
int
ra_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)
{
ra_conf_t *conf = NULL;
ra_file_t *file = NULL;
int ret = 0;
- long wbflags = 0;
GF_ASSERT (frame);
GF_VALIDATE_OR_GOTO (frame->this->name, this, unwind);
@@ -60,8 +59,6 @@ ra_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto unwind;
}
- wbflags = (long)frame->local;
-
file = GF_CALLOC (1, sizeof (*file), gf_ra_mt_ra_file_t);
if (!file) {
op_ret = -1;
@@ -74,10 +71,6 @@ ra_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if ((fd->flags & O_DIRECT) || ((fd->flags & O_ACCMODE) == O_WRONLY))
file->disabled = 1;
- if (wbflags & GF_OPEN_NOWB) {
- file->disabled = 1;
- }
-
file->offset = (unsigned long long) 0;
file->conf = conf;
file->pages.next = &file->pages;
@@ -116,7 +109,7 @@ ra_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
unwind:
frame->local = NULL;
- STACK_UNWIND_STRICT (open, frame, op_ret, op_errno, fd);
+ STACK_UNWIND_STRICT (open, frame, op_ret, op_errno, fd, xdata);
return 0;
}
@@ -126,7 +119,7 @@ int
ra_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)
{
ra_conf_t *conf = NULL;
ra_file_t *file = NULL;
@@ -187,7 +180,7 @@ ra_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
unwind:
STACK_UNWIND_STRICT (create, frame, op_ret, op_errno, fd, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
@@ -195,17 +188,15 @@ unwind:
int
ra_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)
{
GF_ASSERT (frame);
GF_ASSERT (this);
- frame->local = (void *)(long)wbflags;
-
STACK_WIND (frame, ra_open_cbk,
FIRST_CHILD (this),
FIRST_CHILD (this)->fops->open,
- loc, flags, fd, wbflags);
+ loc, flags, fd, xdata);
return 0;
}
@@ -213,7 +204,7 @@ ra_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
int
ra_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)
{
GF_ASSERT (frame);
GF_ASSERT (this);
@@ -221,7 +212,7 @@ ra_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
STACK_WIND (frame, ra_create_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->create,
- loc, flags, mode, fd, params);
+ loc, flags, mode, umask, fd, xdata);
return 0;
}
@@ -362,7 +353,8 @@ out:
int
ra_need_atime_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)
{
GF_ASSERT (frame);
STACK_DESTROY (frame->root);
@@ -453,7 +445,7 @@ dispatch_requests (call_frame_t *frame, ra_file_t *file)
STACK_WIND (ra_frame, ra_need_atime_cbk,
FIRST_CHILD (frame->this),
FIRST_CHILD (frame->this)->fops->readv,
- file->fd, 1, 1, 0);
+ file->fd, 1, 1, 0, NULL);
}
out:
@@ -464,12 +456,13 @@ out:
int
ra_readv_disabled_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)
{
GF_ASSERT (frame);
STACK_UNWIND_STRICT (readv, frame, op_ret, op_errno, vector, count,
- stbuf, iobref);
+ stbuf, iobref, xdata);
return 0;
}
@@ -477,7 +470,7 @@ ra_readv_disabled_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
ra_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)
{
ra_file_t *file = NULL;
ra_local_t *local = NULL;
@@ -557,7 +550,8 @@ ra_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
return 0;
unwind:
- STACK_UNWIND_STRICT (readv, frame, -1, op_errno, NULL, 0, NULL, NULL);
+ STACK_UNWIND_STRICT (readv, frame, -1, op_errno, NULL, 0, NULL, NULL,
+ NULL);
return 0;
@@ -565,17 +559,17 @@ disabled:
STACK_WIND (frame, ra_readv_disabled_cbk,
FIRST_CHILD (frame->this),
FIRST_CHILD (frame->this)->fops->readv,
- fd, size, offset, flags);
+ fd, size, offset, flags, xdata);
return 0;
}
int
ra_flush_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)
{
GF_ASSERT (frame);
- STACK_UNWIND_STRICT (flush, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (flush, frame, op_ret, op_errno, xdata);
return 0;
}
@@ -583,16 +577,18 @@ ra_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
int
ra_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)
+ int32_t op_errno, struct iatt *prebuf, struct iatt *postbuf,
+ dict_t *xdata)
{
GF_ASSERT (frame);
- 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;
}
int
-ra_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
+ra_flush (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
ra_file_t *file = NULL;
uint64_t tmp_file = 0;
@@ -610,17 +606,18 @@ ra_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
}
STACK_WIND (frame, ra_flush_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->flush, fd);
+ FIRST_CHILD (this)->fops->flush, fd, xdata);
return 0;
unwind:
- STACK_UNWIND_STRICT (flush, frame, -1, op_errno);
+ STACK_UNWIND_STRICT (flush, frame, -1, op_errno, NULL);
return 0;
}
int
-ra_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync)
+ra_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync,
+ dict_t *xdata)
{
ra_file_t *file = NULL;
uint64_t tmp_file = 0;
@@ -638,11 +635,11 @@ ra_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync)
}
STACK_WIND (frame, ra_fsync_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fsync, fd, datasync);
+ FIRST_CHILD (this)->fops->fsync, fd, datasync, xdata);
return 0;
unwind:
- STACK_UNWIND_STRICT (fsync, frame, -1, op_errno, NULL, NULL);
+ STACK_UNWIND_STRICT (fsync, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
@@ -650,7 +647,7 @@ unwind:
int
ra_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)
{
ra_file_t *file = NULL;
@@ -663,14 +660,16 @@ ra_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
frame->local = NULL;
- 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;
}
int
ra_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)
+ int32_t count, off_t offset, uint32_t flags, struct iobref *iobref,
+ dict_t *xdata)
{
ra_file_t *file = NULL;
uint64_t tmp_file = 0;
@@ -692,12 +691,12 @@ ra_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
STACK_WIND (frame, ra_writev_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->writev,
- fd, vector, count, offset, flags, iobref);
+ fd, vector, count, offset, flags, iobref, xdata);
return 0;
unwind:
- STACK_UNWIND_STRICT (writev, frame, -1, op_errno, NULL, NULL);
+ STACK_UNWIND_STRICT (writev, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
@@ -705,29 +704,30 @@ unwind:
int
ra_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)
{
GF_ASSERT (frame);
STACK_UNWIND_STRICT (truncate, frame, op_ret, op_errno, prebuf,
- postbuf);
+ postbuf, xdata);
return 0;
}
int
ra_attr_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)
{
GF_ASSERT (frame);
- STACK_UNWIND_STRICT (stat, frame, op_ret, op_errno, buf);
+ STACK_UNWIND_STRICT (stat, frame, op_ret, op_errno, buf, xdata);
return 0;
}
int
-ra_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
+ra_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset,
+ dict_t *xdata)
{
ra_file_t *file = NULL;
fd_t *iter_fd = NULL;
@@ -766,11 +766,11 @@ ra_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
STACK_WIND (frame, ra_truncate_cbk,
FIRST_CHILD (this),
FIRST_CHILD (this)->fops->truncate,
- loc, offset);
+ loc, offset, xdata);
return 0;
unwind:
- STACK_UNWIND_STRICT (truncate, frame, -1, op_errno, NULL, NULL);
+ STACK_UNWIND_STRICT (truncate, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
@@ -867,7 +867,7 @@ out:
}
int
-ra_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
+ra_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
ra_file_t *file = NULL;
fd_t *iter_fd = NULL;
@@ -896,17 +896,18 @@ ra_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
UNLOCK (&inode->lock);
STACK_WIND (frame, ra_attr_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->fstat, fd);
+ FIRST_CHILD (this)->fops->fstat, fd, xdata);
return 0;
unwind:
- STACK_UNWIND_STRICT (stat, frame, -1, op_errno, NULL);
+ STACK_UNWIND_STRICT (stat, frame, -1, op_errno, NULL, NULL);
return 0;
}
int
-ra_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
+ra_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
+ dict_t *xdata)
{
ra_file_t *file = NULL;
fd_t *iter_fd = NULL;
@@ -942,11 +943,11 @@ ra_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
UNLOCK (&inode->lock);
STACK_WIND (frame, ra_truncate_cbk, FIRST_CHILD (this),
- FIRST_CHILD (this)->fops->ftruncate, fd, offset);
+ FIRST_CHILD (this)->fops->ftruncate, fd, offset, xdata);
return 0;
unwind:
- STACK_UNWIND_STRICT (truncate, frame, -1, op_errno, NULL, NULL);
+ STACK_UNWIND_STRICT (truncate, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}
diff --git a/xlators/performance/symlink-cache/src/symlink-cache.c b/xlators/performance/symlink-cache/src/symlink-cache.c
index a82786cce..538cdc956 100644
--- a/xlators/performance/symlink-cache/src/symlink-cache.c
+++ b/xlators/performance/symlink-cache/src/symlink-cache.c
@@ -242,7 +242,7 @@ sc_cache_get (xlator_t *this, inode_t *inode, char **link)
int
sc_readlink_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int op_ret, int op_errno,
- const char *link, struct iatt *sbuf)
+ const char *link, struct iatt *sbuf, dict_t *xdata)
{
if (op_ret > 0)
sc_cache_update (this, frame->local, link);
@@ -250,14 +250,15 @@ sc_readlink_cbk (call_frame_t *frame, void *cookie,
inode_unref (frame->local);
frame->local = NULL;
- STACK_UNWIND_STRICT (readlink, frame, op_ret, op_errno, link, sbuf);
+ STACK_UNWIND_STRICT (readlink, frame, op_ret, op_errno, link, sbuf,
+ xdata);
return 0;
}
int
sc_readlink (call_frame_t *frame, xlator_t *this,
- loc_t *loc, size_t size)
+ loc_t *loc, size_t size, dict_t *xdata)
{
char *link = NULL;
struct iatt buf = {0, };
@@ -275,7 +276,8 @@ sc_readlink (call_frame_t *frame, xlator_t *this,
using buf in readlink_cbk should be aware that @buf
is 0 filled
*/
- STACK_UNWIND_STRICT (readlink, frame, strlen (link), 0, link, &buf);
+ STACK_UNWIND_STRICT (readlink, frame, strlen (link), 0, link,
+ &buf, NULL);
FREE (link);
return 0;
}
@@ -285,7 +287,7 @@ sc_readlink (call_frame_t *frame, xlator_t *this,
STACK_WIND (frame, sc_readlink_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->readlink,
- loc, size);
+ loc, size, xdata);
return 0;
}
@@ -295,7 +297,7 @@ int
sc_symlink_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int op_ret, int op_errno,
inode_t *inode, struct iatt *buf, struct iatt *preparent,
- struct iatt *postparent)
+ struct iatt *postparent, dict_t *xdata)
{
if (op_ret == 0) {
if (frame->local) {
@@ -303,22 +305,22 @@ sc_symlink_cbk (call_frame_t *frame, void *cookie,
}
}
- STACK_UNWIND_STRICT (symlink, frame, op_ret, op_errno, inode, buf, preparent,
- postparent);
+ STACK_UNWIND_STRICT (symlink, frame, op_ret, op_errno, inode, buf,
+ preparent, postparent, xdata);
return 0;
}
int
sc_symlink (call_frame_t *frame, xlator_t *this,
- const char *dst, loc_t *src, dict_t *params)
+ const char *dst, loc_t *src, mode_t umask, dict_t *xdata)
{
frame->local = strdup (dst);
STACK_WIND (frame, sc_symlink_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->symlink,
- dst, src, params);
+ dst, src, umask, xdata);
return 0;
}
@@ -327,7 +329,7 @@ sc_symlink (call_frame_t *frame, xlator_t *this,
int
sc_lookup_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int op_ret, int op_errno,
- inode_t *inode, struct iatt *buf, dict_t *xattr,
+ inode_t *inode, struct iatt *buf, dict_t *xdata,
struct iatt *postparent)
{
if (op_ret == 0)
@@ -335,19 +337,20 @@ sc_lookup_cbk (call_frame_t *frame, void *cookie,
else
sc_cache_flush (this, inode);
- STACK_UNWIND_STRICT (lookup, frame, op_ret, op_errno, inode, buf, xattr, postparent);
+ STACK_UNWIND_STRICT (lookup, frame, op_ret, op_errno, inode, buf,
+ xdata, postparent);
return 0;
}
int
sc_lookup (call_frame_t *frame, xlator_t *this,
- loc_t *loc, dict_t *xattr_req)
+ loc_t *loc, dict_t *xdata)
{
STACK_WIND (frame, sc_lookup_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->lookup,
- loc, xattr_req);
+ loc, xdata);
return 0;
}
@@ -363,10 +366,9 @@ sc_forget (xlator_t *this,
}
-int32_t
+int32_t
init (xlator_t *this)
{
-
if (!this->children || this->children->next)
{
gf_log (this->name, GF_LOG_ERROR,
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index cc0569dd4..d1b9f6feb 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -107,7 +107,6 @@ struct wb_conf {
typedef struct wb_local {
list_head_t winds;
int32_t flags;
- int32_t wbflags;
struct wb_file *file;
wb_request_t *request;
int op_ret;
@@ -356,7 +355,8 @@ out:
int32_t
wb_sync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
- int32_t op_errno, struct iatt *prebuf, struct iatt *postbuf)
+ int32_t op_errno, struct iatt *prebuf, struct iatt *postbuf,
+ dict_t *xdata)
{
wb_local_t *local = NULL;
list_head_t *winds = NULL;
@@ -550,7 +550,7 @@ wb_sync (call_frame_t *frame, wb_file_t *file, list_head_t *winds)
fd, vector, count,
first_request->stub->args.writev.off,
first_request->stub->args.writev.flags,
- iobref);
+ iobref, NULL);
iobref_unref (iobref);
GF_FREE (vector);
@@ -618,7 +618,7 @@ out:
int32_t
wb_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_errno, struct iatt *buf, dict_t *xdata)
{
wb_local_t *local = NULL;
wb_request_t *request = NULL;
@@ -642,7 +642,7 @@ wb_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
}
}
- STACK_UNWIND_STRICT (stat, frame, op_ret, op_errno, buf);
+ STACK_UNWIND_STRICT (stat, frame, op_ret, op_errno, buf, xdata);
if (request != NULL) {
wb_request_unref (request);
@@ -682,19 +682,19 @@ wb_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
static int32_t
-wb_stat_helper (call_frame_t *frame, xlator_t *this, loc_t *loc)
+wb_stat_helper (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
GF_ASSERT (frame);
GF_ASSERT (this);
STACK_WIND (frame, wb_stat_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->stat, loc);
+ FIRST_CHILD(this)->fops->stat, loc, xdata);
return 0;
}
int32_t
-wb_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
+wb_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
wb_file_t *file = NULL;
fd_t *iter_fd = NULL;
@@ -732,7 +732,7 @@ wb_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
frame->local = local;
if (file) {
- stub = fop_stat_stub (frame, wb_stat_helper, loc);
+ stub = fop_stat_stub (frame, wb_stat_helper, loc, xdata);
if (stub == NULL) {
op_errno = ENOMEM;
goto unwind;
@@ -751,12 +751,12 @@ wb_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
}
} else {
STACK_WIND (frame, wb_stat_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->stat, loc);
+ FIRST_CHILD(this)->fops->stat, loc, xdata);
}
return 0;
unwind:
- STACK_UNWIND_STRICT (stat, frame, -1, op_errno, NULL);
+ STACK_UNWIND_STRICT (stat, frame, -1, op_errno, NULL, NULL);
if (stub) {
call_stub_destroy (stub);
@@ -772,7 +772,7 @@ unwind:
int32_t
wb_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_errno, struct iatt *buf, dict_t *xdata)
{
wb_local_t *local = NULL;
wb_request_t *request = NULL;
@@ -799,26 +799,26 @@ wb_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
}
}
- 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
-wb_fstat_helper (call_frame_t *frame, xlator_t *this, fd_t *fd)
+wb_fstat_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
GF_ASSERT (frame);
GF_ASSERT (this);
STACK_WIND (frame, wb_fstat_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fstat, fd);
+ FIRST_CHILD(this)->fops->fstat, fd, xdata);
return 0;
}
int32_t
-wb_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
+wb_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
wb_file_t *file = NULL;
wb_local_t *local = NULL;
@@ -857,7 +857,7 @@ wb_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
frame->local = local;
if (file) {
- stub = fop_fstat_stub (frame, wb_fstat_helper, fd);
+ stub = fop_fstat_stub (frame, wb_fstat_helper, fd, xdata);
if (stub == NULL) {
op_errno = ENOMEM;
goto unwind;
@@ -879,13 +879,13 @@ wb_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd)
}
} else {
STACK_WIND (frame, wb_fstat_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fstat, fd);
+ FIRST_CHILD(this)->fops->fstat, fd, xdata);
}
return 0;
unwind:
- STACK_UNWIND_STRICT (fstat, frame, -1, op_errno, NULL);
+ STACK_UNWIND_STRICT (fstat, frame, -1, op_errno, NULL, NULL);
if (stub) {
call_stub_destroy (stub);
@@ -898,7 +898,7 @@ unwind:
int32_t
wb_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)
{
wb_local_t *local = NULL;
wb_request_t *request = NULL;
@@ -922,7 +922,7 @@ wb_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
STACK_UNWIND_STRICT (truncate, frame, op_ret, op_errno, prebuf,
- postbuf);
+ postbuf, xdata);
if (request) {
wb_request_unref (request);
@@ -963,20 +963,21 @@ wb_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
static int32_t
wb_truncate_helper (call_frame_t *frame, xlator_t *this, loc_t *loc,
- off_t offset)
+ off_t offset, dict_t *xdata)
{
GF_ASSERT (frame);
GF_ASSERT (this);
STACK_WIND (frame, wb_truncate_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->truncate, loc, offset);
+ FIRST_CHILD(this)->fops->truncate, loc, offset, xdata);
return 0;
}
int32_t
-wb_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
+wb_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset,
+ dict_t *xdata)
{
wb_file_t *file = NULL;
fd_t *iter_fd = NULL;
@@ -1016,7 +1017,7 @@ wb_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
frame->local = local;
if (file) {
stub = fop_truncate_stub (frame, wb_truncate_helper, loc,
- offset);
+ offset, xdata);
if (stub == NULL) {
op_errno = ENOMEM;
goto unwind;
@@ -1035,13 +1036,14 @@ wb_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
}
} else {
STACK_WIND (frame, wb_truncate_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->truncate, loc, offset);
+ FIRST_CHILD(this)->fops->truncate, loc, offset,
+ xdata);
}
return 0;
unwind:
- STACK_UNWIND_STRICT (truncate, frame, -1, op_errno, NULL, NULL);
+ STACK_UNWIND_STRICT (truncate, frame, -1, op_errno, NULL, NULL, NULL);
if (stub) {
call_stub_destroy (stub);
@@ -1054,7 +1056,7 @@ unwind:
int32_t
wb_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)
{
wb_local_t *local = NULL;
wb_request_t *request = NULL;
@@ -1082,7 +1084,7 @@ wb_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
STACK_UNWIND_STRICT (ftruncate, frame, op_ret, op_errno, prebuf,
- postbuf);
+ postbuf, xdata);
return 0;
}
@@ -1090,19 +1092,20 @@ wb_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
static int32_t
wb_ftruncate_helper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- off_t offset)
+ off_t offset, dict_t *xdata)
{
GF_ASSERT (frame);
GF_ASSERT (this);
STACK_WIND (frame, wb_ftruncate_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->ftruncate, fd, offset);
+ FIRST_CHILD(this)->fops->ftruncate, fd, offset, xdata);
return 0;
}
int32_t
-wb_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
+wb_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
+ dict_t *xdata)
{
wb_file_t *file = NULL;
wb_local_t *local = NULL;
@@ -1142,7 +1145,7 @@ wb_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
if (file) {
stub = fop_ftruncate_stub (frame, wb_ftruncate_helper, fd,
- offset);
+ offset, xdata);
if (stub == NULL) {
op_errno = ENOMEM;
goto unwind;
@@ -1161,13 +1164,13 @@ wb_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
}
} else {
STACK_WIND (frame, wb_ftruncate_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->ftruncate, fd, offset);
+ FIRST_CHILD(this)->fops->ftruncate, fd, offset, xdata);
}
return 0;
unwind:
- STACK_UNWIND_STRICT (ftruncate, frame, -1, op_errno, NULL, NULL);
+ STACK_UNWIND_STRICT (ftruncate, frame, -1, op_errno, NULL, NULL, NULL);
if (stub) {
call_stub_destroy (stub);
@@ -1180,7 +1183,7 @@ unwind:
int32_t
wb_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)
{
wb_local_t *local = NULL;
wb_request_t *request = NULL;
@@ -1204,7 +1207,7 @@ wb_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
STACK_UNWIND_STRICT (setattr, frame, op_ret, op_errno, statpre,
- statpost);
+ statpost, xdata);
if (request) {
wb_request_unref (request);
@@ -1245,20 +1248,20 @@ wb_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
static int32_t
wb_setattr_helper (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)
{
GF_ASSERT (frame);
GF_ASSERT (this);
STACK_WIND (frame, wb_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
wb_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)
{
wb_file_t *file = NULL;
fd_t *iter_fd = NULL;
@@ -1283,7 +1286,7 @@ wb_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
if (!(valid & (GF_SET_ATTR_ATIME | GF_SET_ATTR_MTIME))) {
STACK_WIND (frame, wb_setattr_cbk, FIRST_CHILD (this),
FIRST_CHILD (this)->fops->setattr, loc, stbuf,
- valid);
+ valid, xdata);
goto out;
}
@@ -1307,7 +1310,7 @@ wb_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
if (file) {
stub = fop_setattr_stub (frame, wb_setattr_helper, loc, stbuf,
- valid);
+ valid, xdata);
if (stub == NULL) {
op_errno = ENOMEM;
goto unwind;
@@ -1327,12 +1330,12 @@ wb_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
} else {
STACK_WIND (frame, wb_setattr_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->setattr, loc, stbuf,
- valid);
+ valid, xdata);
}
return 0;
unwind:
- STACK_UNWIND_STRICT (setattr, frame, -1, op_errno, NULL, NULL);
+ STACK_UNWIND_STRICT (setattr, frame, -1, op_errno, NULL, NULL, NULL);
if (stub) {
call_stub_destroy (stub);
@@ -1367,9 +1370,9 @@ wb_disable_all (xlator_t *this, fd_t *origfd)
int32_t
wb_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_errno, fd_t *fd, dict_t *xdata)
{
- int32_t wbflags = 0, flags = 0;
+ int32_t flags = 0;
wb_file_t *file = NULL;
wb_conf_t *conf = NULL;
wb_local_t *local = NULL;
@@ -1385,7 +1388,6 @@ wb_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
EINVAL);
flags = local->flags;
- wbflags = local->wbflags;
if (op_ret != -1) {
file = wb_file_create (this, fd, flags);
@@ -1407,23 +1409,25 @@ wb_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
file->disabled = 1;
wb_disable_all(this,fd);
}
-
- else if (wbflags & GF_OPEN_NOWB) {
+ /* TODO: decide about wbflags's fate */
+ /*
+ else if (wbflags & GF_OPEN_NOWB) {
file->disabled = 1;
}
+ */
}
UNLOCK (&file->lock);
}
out:
- 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
wb_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)
{
wb_local_t *local = NULL;
int32_t op_errno = EINVAL;
@@ -1435,16 +1439,15 @@ wb_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
}
local->flags = flags;
- local->wbflags = wbflags;
frame->local = local;
STACK_WIND (frame, wb_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;
unwind:
- STACK_UNWIND_STRICT (open, frame, -1, op_errno, NULL);
+ STACK_UNWIND_STRICT (open, frame, -1, op_errno, NULL, NULL);
return 0;
}
@@ -1453,7 +1456,7 @@ int32_t
wb_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)
{
long flags = 0;
wb_file_t *file = NULL;
@@ -1495,14 +1498,14 @@ wb_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
STACK_UNWIND_STRICT (create, frame, op_ret, op_errno, fd, inode, buf,
- preparent, postparent);
+ preparent, postparent, xdata);
return 0;
}
int32_t
wb_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)
{
int32_t op_errno = EINVAL;
@@ -1515,12 +1518,12 @@ wb_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
STACK_WIND (frame, wb_create_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->create,
- loc, flags, mode, fd, params);
+ loc, flags, mode, umask, fd, xdata);
return 0;
unwind:
STACK_UNWIND_STRICT (create, frame, -1, op_errno, NULL, NULL, NULL,
- NULL, NULL);
+ NULL, NULL, NULL);
return 0;
}
@@ -1803,8 +1806,8 @@ wb_stack_unwind (list_head_t *unwinds)
frame = request->stub->frame;
local = frame->local;
- STACK_UNWIND (frame, local->op_ret, local->op_errno, &buf,
- &buf);
+ STACK_UNWIND (frame, local->op_ret, local->op_errno,
+ &buf, &buf, NULL, NULL);
ret = wb_request_unref (request);
if (ret == 0) {
@@ -2085,18 +2088,20 @@ out:
int32_t
wb_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)
{
GF_ASSERT (frame);
- 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
wb_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)
+ int32_t count, off_t offset, uint32_t flags, struct iobref *iobref,
+ dict_t *xdata)
{
wb_file_t *file = NULL;
char wb_disabled = 0;
@@ -2157,14 +2162,14 @@ wb_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
if (op_ret == -1) {
STACK_UNWIND_STRICT (writev, frame, op_ret, op_errno, NULL,
- NULL);
+ NULL, NULL);
return 0;
}
if (wb_disabled) {
STACK_WIND (frame, wb_writev_cbk, FIRST_CHILD (frame->this),
FIRST_CHILD (frame->this)->fops->writev,
- fd, vector, count, offset, flags, iobref);
+ fd, vector, count, offset, flags, iobref, xdata);
return 0;
}
@@ -2184,7 +2189,7 @@ wb_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
local->file = file;
stub = fop_writev_stub (frame, NULL, fd, vector, count, offset, flags,
- iobref);
+ iobref, xdata);
if (stub == NULL) {
op_errno = ENOMEM;
goto unwind;
@@ -2207,7 +2212,7 @@ wb_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
return 0;
unwind:
- STACK_UNWIND_STRICT (writev, frame, -1, op_errno, NULL, NULL);
+ STACK_UNWIND_STRICT (writev, frame, -1, op_errno, NULL, NULL, NULL);
if (process_frame) {
STACK_DESTROY (process_frame->root);
@@ -2224,7 +2229,7 @@ unwind:
int32_t
wb_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)
+ struct iatt *stbuf, struct iobref *iobref, dict_t *xdata)
{
wb_local_t *local = NULL;
wb_file_t *file = NULL;
@@ -2253,7 +2258,7 @@ wb_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
}
STACK_UNWIND_STRICT (readv, frame, op_ret, op_errno, vector, count,
- stbuf, iobref);
+ stbuf, iobref, xdata);
return 0;
}
@@ -2261,10 +2266,11 @@ wb_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
static int32_t
wb_readv_helper (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, wb_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;
}
@@ -2272,7 +2278,7 @@ wb_readv_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
int32_t
wb_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)
{
wb_file_t *file = NULL;
wb_local_t *local = NULL;
@@ -2311,7 +2317,7 @@ wb_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
frame->local = local;
if (file) {
stub = fop_readv_stub (frame, wb_readv_helper, fd, size,
- offset, flags);
+ offset, flags, xdata);
if (stub == NULL) {
op_errno = ENOMEM;
goto unwind;
@@ -2332,20 +2338,21 @@ wb_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
} else {
STACK_WIND (frame, wb_readv_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->readv,
- fd, size, offset, flags);
+ fd, size, offset, flags, xdata);
}
return 0;
unwind:
- STACK_UNWIND_STRICT (readv, frame, -1, op_errno, NULL, 0, NULL, NULL);
+ STACK_UNWIND_STRICT (readv, frame, -1, op_errno, NULL, 0, NULL, NULL,
+ NULL);
return 0;
}
int32_t
wb_ffr_bg_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_DESTROY (frame->root);
return 0;
@@ -2354,7 +2361,7 @@ wb_ffr_bg_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t
wb_ffr_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)
{
wb_local_t *local = NULL;
wb_file_t *file = NULL;
@@ -2377,14 +2384,14 @@ wb_ffr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
UNLOCK (&file->lock);
}
- STACK_UNWIND_STRICT (flush, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (flush, frame, op_ret, op_errno, xdata);
return 0;
}
int32_t
-wb_flush_helper (call_frame_t *frame, xlator_t *this, fd_t *fd)
+wb_flush_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
wb_conf_t *conf = NULL;
wb_local_t *local = NULL;
@@ -2426,10 +2433,10 @@ wb_flush_helper (call_frame_t *frame, xlator_t *this, fd_t *fd)
}
STACK_WIND (flush_frame, wb_ffr_bg_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->flush, fd);
+ FIRST_CHILD(this)->fops->flush, fd, xdata);
} else {
STACK_WIND (frame, wb_ffr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->flush, fd);
+ FIRST_CHILD(this)->fops->flush, fd, xdata);
}
if (process_frame != NULL) {
@@ -2443,19 +2450,19 @@ wb_flush_helper (call_frame_t *frame, xlator_t *this, fd_t *fd)
}
if (conf->flush_behind) {
- STACK_UNWIND_STRICT (flush, frame, op_ret, op_errno);
+ STACK_UNWIND_STRICT (flush, frame, op_ret, op_errno, NULL);
}
return 0;
unwind:
- STACK_UNWIND_STRICT (flush, frame, -1, op_errno);
+ STACK_UNWIND_STRICT (flush, frame, -1, op_errno, NULL);
return 0;
}
int32_t
-wb_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
+wb_flush (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
wb_conf_t *conf = NULL;
wb_file_t *file = NULL;
@@ -2499,7 +2506,7 @@ wb_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
frame->local = local;
- stub = fop_flush_stub (frame, wb_flush_helper, fd);
+ stub = fop_flush_stub (frame, wb_flush_helper, fd, xdata);
if (stub == NULL) {
op_errno = ENOMEM;
goto unwind;
@@ -2525,28 +2532,29 @@ wb_flush (call_frame_t *frame, xlator_t *this, fd_t *fd)
goto unwind;
}
- STACK_UNWIND_STRICT (flush, frame, 0, 0);
+ STACK_UNWIND_STRICT (flush, frame, 0, 0, NULL);
STACK_WIND (flush_frame, wb_ffr_bg_cbk,
FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->flush, fd);
+ FIRST_CHILD(this)->fops->flush, fd, xdata);
} else {
STACK_WIND (frame, wb_ffr_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->flush, fd);
+ FIRST_CHILD(this)->fops->flush, fd, xdata);
}
}
return 0;
unwind:
- STACK_UNWIND_STRICT (flush, frame, -1, op_errno);
+ STACK_UNWIND_STRICT (flush, frame, -1, op_errno, NULL);
return 0;
}
static int32_t
wb_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)
+ int32_t op_errno, struct iatt *prebuf, struct iatt *postbuf,
+ dict_t *xdata)
{
wb_local_t *local = NULL;
wb_file_t *file = NULL;
@@ -2587,7 +2595,8 @@ wb_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
}
- 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;
}
@@ -2595,16 +2604,17 @@ wb_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
static int32_t
wb_fsync_helper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int32_t datasync)
+ int32_t datasync, dict_t *xdata)
{
STACK_WIND (frame, wb_fsync_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fsync, fd, datasync);
+ FIRST_CHILD(this)->fops->fsync, fd, datasync, xdata);
return 0;
}
int32_t
-wb_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync)
+wb_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync,
+ dict_t *xdata)
{
wb_file_t *file = NULL;
wb_local_t *local = NULL;
@@ -2644,7 +2654,8 @@ wb_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync)
frame->local = local;
if (file) {
- stub = fop_fsync_stub (frame, wb_fsync_helper, fd, datasync);
+ stub = fop_fsync_stub (frame, wb_fsync_helper, fd, datasync,
+ xdata);
if (stub == NULL) {
op_errno = ENOMEM;
goto unwind;
@@ -2664,13 +2675,13 @@ wb_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync)
}
} else {
STACK_WIND (frame, wb_fsync_cbk, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->fsync, fd, datasync);
+ FIRST_CHILD(this)->fops->fsync, fd, datasync, xdata);
}
return 0;
unwind:
- STACK_UNWIND_STRICT (fsync, frame, -1, op_errno, NULL, NULL);
+ STACK_UNWIND_STRICT (fsync, frame, -1, op_errno, NULL, NULL, NULL);
return 0;
}