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/cluster/dht/src/dht-helper.c | |
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/cluster/dht/src/dht-helper.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-helper.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index 35d3d0f9dba..cab66017b84 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -846,11 +846,11 @@ dht_migration_complete_check_task (void *data) if (!local->loc.inode) { ret = syncop_fgetxattr (src_node, local->fd, &dict, - conf->link_xattr_name, NULL); + conf->link_xattr_name, NULL, NULL); } else { SYNCTASK_SETID (0, 0); ret = syncop_getxattr (src_node, &local->loc, &dict, - conf->link_xattr_name, NULL); + conf->link_xattr_name, NULL, NULL); SYNCTASK_SETID (frame->root->uid, frame->root->gid); } @@ -880,8 +880,8 @@ dht_migration_complete_check_task (void *data) } /* Need to do lookup on hashed subvol, then get the file */ - ret = syncop_lookup (this, &local->loc, NULL, &stbuf, NULL, - NULL); + ret = syncop_lookup (this, &local->loc, &stbuf, NULL, + NULL, NULL); if (ret) { local->op_errno = -ret; ret = -1; @@ -902,8 +902,8 @@ dht_migration_complete_check_task (void *data) /* lookup on dst */ if (local->loc.inode) { - ret = syncop_lookup (dst_node, &local->loc, NULL, &stbuf, NULL, - NULL); + ret = syncop_lookup (dst_node, &local->loc, &stbuf, NULL, + NULL, NULL); if (ret) { gf_log (this->name, GF_LOG_ERROR, @@ -990,7 +990,8 @@ dht_migration_complete_check_task (void *data) * truncate the file again as rebalance is moving the data */ ret = syncop_open (dst_node, &tmp_loc, (iter_fd->flags & - ~(O_CREAT | O_EXCL | O_TRUNC)), iter_fd); + ~(O_CREAT | O_EXCL | O_TRUNC)), iter_fd, + NULL, NULL); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to open " "the fd (%p, flags=0%o) on file %s @ %s", @@ -1073,11 +1074,11 @@ dht_rebalance_inprogress_task (void *data) if (local->loc.inode) { SYNCTASK_SETID (0, 0); ret = syncop_getxattr (src_node, &local->loc, &dict, - conf->link_xattr_name, NULL); + conf->link_xattr_name, NULL, NULL); SYNCTASK_SETID (frame->root->uid, frame->root->gid); } else { ret = syncop_fgetxattr (src_node, local->fd, &dict, - conf->link_xattr_name, NULL); + conf->link_xattr_name, NULL, NULL); } if (ret < 0) { @@ -1101,8 +1102,8 @@ dht_rebalance_inprogress_task (void *data) if (local->loc.inode) { /* lookup on dst */ - ret = syncop_lookup (dst_node, &local->loc, NULL, - &stbuf, NULL, NULL); + ret = syncop_lookup (dst_node, &local->loc, &stbuf, NULL, + NULL, NULL); if (ret) { gf_log (this->name, GF_LOG_ERROR, "%s: failed to lookup the file on %s", @@ -1145,7 +1146,8 @@ dht_rebalance_inprogress_task (void *data) * truncate the file again as rebalance is moving the data */ ret = syncop_open (dst_node, &tmp_loc, (iter_fd->flags & - ~(O_CREAT | O_EXCL | O_TRUNC)), iter_fd); + ~(O_CREAT | O_EXCL | O_TRUNC)), iter_fd, + NULL, NULL); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to send open " "the fd (%p, flags=0%o) on file %s @ %s", |