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 --- heal/src/glfs-heal.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'heal/src/glfs-heal.c') diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c index 19e6d2d96bf..770a3c6883c 100644 --- a/heal/src/glfs-heal.c +++ b/heal/src/glfs-heal.c @@ -59,7 +59,7 @@ glfsh_get_index_dir_loc (loc_t *rootloc, xlator_t *xl, loc_t *dirloc, struct iatt parent = {0}; ret = syncop_getxattr (xl, rootloc, &xattr, GF_XATTROP_INDEX_GFID, - NULL); + NULL, NULL); if (ret < 0) { *op_errno = -ret; goto out; @@ -74,8 +74,7 @@ glfsh_get_index_dir_loc (loc_t *rootloc, xlator_t *xl, loc_t *dirloc, gf_uuid_copy (dirloc->gfid, index_gfid); dirloc->path = ""; dirloc->inode = inode_new (rootloc->inode->table); - ret = syncop_lookup (xl, dirloc, NULL, - &iattr, NULL, &parent); + ret = syncop_lookup (xl, dirloc, &iattr, &parent, NULL, NULL); dirloc->path = NULL; if (ret < 0) { *op_errno = -ret; @@ -129,7 +128,7 @@ glfsh_index_purge (xlator_t *subvol, inode_t *inode, char *name) loc.parent = inode_ref (inode); loc.name = name; - ret = syncop_unlink (subvol, &loc); + ret = syncop_unlink (subvol, &loc, NULL, NULL); loc_wipe (&loc); return ret; @@ -244,7 +243,8 @@ glfsh_process_entries (xlator_t *xl, fd_t *fd, gf_dirent_t *entries, gf_uuid_parse (entry->d_name, gfid); gf_uuid_copy (loc.gfid, gfid); - ret = syncop_getxattr (this, &loc, &dict, GF_HEAL_INFO, NULL); + ret = syncop_getxattr (this, &loc, &dict, GF_HEAL_INFO, NULL, + NULL); if (ret) continue; @@ -286,7 +286,8 @@ glfsh_crawl_directory (glfs_t *fs, xlator_t *top_subvol, loc_t *rootloc, return ret; while (1) { - ret = syncop_readdir (readdir_xl, fd, 131072, offset, &entries); + ret = syncop_readdir (readdir_xl, fd, 131072, offset, &entries, + NULL, NULL); if (ret <= 0) break; ret = 0; @@ -347,7 +348,7 @@ glfsh_print_brick (xlator_t *xl, loc_t *rootloc) char *brick_end = NULL; ret = syncop_getxattr (xl, rootloc, &xattr, GF_XATTR_PATHINFO_KEY, - NULL); + NULL, NULL); if (ret < 0) goto out; @@ -555,7 +556,7 @@ glfsh_heal_splitbrain_file (glfs_t *fs, xlator_t *top_subvol, loc_t *rootloc, gf_uuid_parse (path, loc.gfid); loc.path = gf_strdup (uuid_utoa (loc.gfid)); loc.inode = inode_new (rootloc->inode->table); - ret = syncop_lookup (xl, &loc, xattr_req, 0, &xattr_rsp, 0); + ret = syncop_lookup (xl, &loc, 0, 0, xattr_req, &xattr_rsp); if (ret) { op_errno = -ret; printf ("Lookup failed on %s:%s.\n", file, @@ -580,7 +581,7 @@ retry: } ret = syncop_getxattr (xl, &loc, &xattr_rsp, GF_AFR_HEAL_SBRAIN, - xattr_req); + xattr_req, NULL); if (ret) { op_errno = -ret; printf ("Healing %s failed:%s.\n", file, strerror(op_errno)); -- cgit