From 346e64e578573296028efa516cd93cfaf2b17b8f Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Wed, 11 Mar 2015 18:36:01 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/9859 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- libglusterfs/src/syncop-utils.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'libglusterfs/src/syncop-utils.c') diff --git a/libglusterfs/src/syncop-utils.c b/libglusterfs/src/syncop-utils.c index 3c0df0ab6ad..2f3b50f18cd 100644 --- a/libglusterfs/src/syncop-utils.c +++ b/libglusterfs/src/syncop-utils.c @@ -34,7 +34,7 @@ syncop_dirfd (xlator_t *subvol, loc_t *loc, fd_t **fd, int pid) goto out; } - ret = syncop_opendir (subvol, loc, dirfd); + ret = syncop_opendir (subvol, loc, dirfd, NULL, NULL); if (ret) { /* * On Linux, if the brick was not updated, opendir will @@ -88,8 +88,8 @@ syncop_ftw (xlator_t *subvol, loc_t *loc, int pid, void *data, INIT_LIST_HEAD (&entries.list); - while ((ret = syncop_readdirp (subvol, fd, 131072, offset, 0, - &entries))) { + while ((ret = syncop_readdirp (subvol, fd, 131072, offset, &entries, + NULL, NULL))) { if (ret < 0) break; @@ -167,8 +167,8 @@ syncop_ftw_throttle (xlator_t *subvol, loc_t *loc, int pid, void *data, INIT_LIST_HEAD (&entries.list); - while ((ret = syncop_readdirp (subvol, fd, 131072, offset, 0, - &entries))) { + while ((ret = syncop_readdirp (subvol, fd, 131072, offset, &entries, + NULL, NULL))) { if (ret < 0) break; @@ -236,7 +236,8 @@ syncop_dir_scan (xlator_t *subvol, loc_t *loc, int pid, void *data, INIT_LIST_HEAD (&entries.list); - while ((ret = syncop_readdir (subvol, fd, 131072, offset, &entries))) { + while ((ret = syncop_readdir (subvol, fd, 131072, offset, &entries, + NULL, NULL))) { if (ret < 0) break; @@ -283,7 +284,8 @@ syncop_is_subvol_local (xlator_t *this, loc_t *loc, gf_boolean_t *is_local) *is_local = _gf_false; - ret = syncop_getxattr (this, loc, &xattr, GF_XATTR_PATHINFO_KEY, NULL); + ret = syncop_getxattr (this, loc, &xattr, GF_XATTR_PATHINFO_KEY, NULL, + NULL); if (ret < 0) { ret = -1; goto out; @@ -322,7 +324,8 @@ syncop_gfid_to_path (inode_table_t *itable, xlator_t *subvol, uuid_t gfid, gf_uuid_copy (loc.gfid, gfid); loc.inode = inode_new (itable); - ret = syncop_getxattr (subvol, &loc, &xattr, GFID_TO_PATH_KEY, NULL); + ret = syncop_getxattr (subvol, &loc, &xattr, GFID_TO_PATH_KEY, NULL, + NULL); if (ret < 0) goto out; -- cgit