diff options
author | Raghavendra Talur <rtalur@redhat.com> | 2015-03-11 18:36:01 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-04-08 15:14:59 +0000 |
commit | 346e64e578573296028efa516cd93cfaf2b17b8f (patch) | |
tree | 5858b85260226377f23358fbd227e63d44abea5d /xlators/features/qemu-block | |
parent | 4f0c068d8fe2654f205202e129e673aaa9342c63 (diff) |
libglusterfs/syncop: Add xdata to all syncop calls
This patch adds support for xdata in both the
request and response path of syncops.
Few calls like lookup already had the support;
have renamed variables in few places to maintain
uniformity.
xdata passed downwards is known as xdata_in
and xdata passed upwards is known as xdata_out.
There is an old patch by Jeff Darcy at
http://review.gluster.org/#/c/8769/3 which does the
same for some selected calls. It also brings in
xdata support at gfapi level.
xdata support at gfapi level would be introduced
in subsequent patches.
Change-Id: I340e94ebaf2a38e160e65bc30732e8fe1c532dcc
BUG: 1158621
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/9859
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/qemu-block')
-rw-r--r-- | xlators/features/qemu-block/src/bdrv-xlator.c | 24 | ||||
-rw-r--r-- | xlators/features/qemu-block/src/qb-coroutines.c | 12 |
2 files changed, 19 insertions, 17 deletions
diff --git a/xlators/features/qemu-block/src/bdrv-xlator.c b/xlators/features/qemu-block/src/bdrv-xlator.c index 5a14f89e5af..5dbe292d6d7 100644 --- a/xlators/features/qemu-block/src/bdrv-xlator.c +++ b/xlators/features/qemu-block/src/bdrv-xlator.c @@ -105,8 +105,8 @@ qemu_gluster_open (BlockDriverState *bs, QDict *options, int bdrv_flags) } gf_uuid_copy(loc.gfid, loc.inode->gfid); - ret = syncop_lookup(FIRST_CHILD(THIS), &loc, NULL, &buf, NULL, - NULL); + ret = syncop_lookup(FIRST_CHILD(THIS), &loc, &buf, NULL, + NULL, NULL); if (ret) { loc_wipe(&loc); return ret; @@ -150,7 +150,7 @@ qemu_gluster_create (const char *filename, QEMUOptionParameter *options) if (!fd) return -ENOMEM; - ret = syncop_fstat (FIRST_CHILD(THIS), fd, &stat); + ret = syncop_fstat (FIRST_CHILD(THIS), fd, &stat, NULL, NULL); if (ret) { fd_unref (fd); return ret; @@ -163,7 +163,8 @@ qemu_gluster_create (const char *filename, QEMUOptionParameter *options) } if (total_size) { - ret = syncop_ftruncate (FIRST_CHILD(THIS), fd, total_size); + ret = syncop_ftruncate (FIRST_CHILD(THIS), fd, total_size, + NULL, NULL); if (ret) { fd_unref (fd); return ret; @@ -195,7 +196,7 @@ qemu_gluster_co_readv (BlockDriverState *bs, int64_t sector_num, int nb_sectors, size = nb_sectors * BDRV_SECTOR_SIZE; ret = syncop_readv (FIRST_CHILD(THIS), fd, size, offset, 0, - &iov, &count, &iobref); + &iov, &count, &iobref, NULL, NULL); if (ret < 0) goto out; @@ -245,7 +246,8 @@ qemu_gluster_co_writev (BlockDriverState *bs, int64_t sector_num, int nb_sectors iov.iov_base = iobuf_ptr (iobuf); iov.iov_len = size; - ret = syncop_writev (FIRST_CHILD(THIS), fd, &iov, 1, offset, iobref, 0); + ret = syncop_writev (FIRST_CHILD(THIS), fd, &iov, 1, offset, iobref, 0, + NULL, NULL); out: if (iobuf) @@ -265,7 +267,7 @@ qemu_gluster_co_flush (BlockDriverState *bs) fd = fd_from_bs (bs); - ret = syncop_flush (FIRST_CHILD(THIS), fd); + ret = syncop_flush (FIRST_CHILD(THIS), fd, NULL, NULL); fd_unref (fd); @@ -281,7 +283,7 @@ qemu_gluster_co_fsync (BlockDriverState *bs) fd = fd_from_bs (bs); - ret = syncop_fsync (FIRST_CHILD(THIS), fd, 0); + ret = syncop_fsync (FIRST_CHILD(THIS), fd, 0, NULL, NULL); fd_unref (fd); @@ -297,7 +299,7 @@ qemu_gluster_truncate (BlockDriverState *bs, int64_t offset) fd = fd_from_bs (bs); - ret = syncop_ftruncate (FIRST_CHILD(THIS), fd, offset); + ret = syncop_ftruncate (FIRST_CHILD(THIS), fd, offset, NULL, NULL); fd_unref (fd); @@ -314,7 +316,7 @@ qemu_gluster_getlength (BlockDriverState *bs) fd = fd_from_bs (bs); - ret = syncop_fstat (FIRST_CHILD(THIS), fd, &iatt); + ret = syncop_fstat (FIRST_CHILD(THIS), fd, &iatt, NULL, NULL); if (ret < 0) return -1; @@ -331,7 +333,7 @@ qemu_gluster_allocated_file_size (BlockDriverState *bs) fd = fd_from_bs (bs); - ret = syncop_fstat (FIRST_CHILD(THIS), fd, &iatt); + ret = syncop_fstat (FIRST_CHILD(THIS), fd, &iatt, NULL, NULL); if (ret < 0) return -1; diff --git a/xlators/features/qemu-block/src/qb-coroutines.c b/xlators/features/qemu-block/src/qb-coroutines.c index 7dee80d1d00..4457576314e 100644 --- a/xlators/features/qemu-block/src/qb-coroutines.c +++ b/xlators/features/qemu-block/src/qb-coroutines.c @@ -81,8 +81,8 @@ qb_format_and_resume (void *opaque) * Lookup the backing image. Verify existence and/or get the * gfid if we don't already have it. */ - ret = syncop_lookup(FIRST_CHILD(frame->this), &loc, NULL, &buf, - NULL, NULL); + ret = syncop_lookup(FIRST_CHILD(frame->this), &loc, &buf, NULL, + NULL, NULL); GF_FREE(qb_inode->backing_fname); if (ret) { loc_wipe(&loc); @@ -148,7 +148,7 @@ qb_format_and_resume (void *opaque) return 0; } - ret = syncop_fsetxattr (FIRST_CHILD(THIS), fd, xattr, 0); + ret = syncop_fsetxattr (FIRST_CHILD(THIS), fd, xattr, 0, NULL, NULL); if (ret) { gf_log (frame->this->name, GF_LOG_ERROR, "failed to setxattr for %s", @@ -437,7 +437,7 @@ qb_update_size_xattr (xlator_t *this, fd_t *fd, const char *fmt, off_t offset) return; } - syncop_fsetxattr (FIRST_CHILD(this), fd, xattr, 0); + syncop_fsetxattr (FIRST_CHILD(this), fd, xattr, 0, NULL, NULL); dict_unref (xattr); } @@ -476,7 +476,7 @@ qb_co_truncate (void *opaque) } ret = syncop_fstat (FIRST_CHILD(this), local->fd, - &stub->args_cbk.prestat); + &stub->args_cbk.prestat, NULL, NULL); if (ret < 0) goto out; stub->args_cbk.prestat.ia_size = qb_inode->size; @@ -490,7 +490,7 @@ qb_co_truncate (void *opaque) qb_inode->size = offset; ret = syncop_fstat (FIRST_CHILD(this), local->fd, - &stub->args_cbk.poststat); + &stub->args_cbk.poststat, NULL, NULL); if (ret < 0) goto out; stub->args_cbk.poststat.ia_size = qb_inode->size; |