summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-resolve.c
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2015-03-11 18:36:01 +0530
committerVijay Bellur <vbellur@redhat.com>2015-04-08 15:14:59 +0000
commit346e64e578573296028efa516cd93cfaf2b17b8f (patch)
tree5858b85260226377f23358fbd227e63d44abea5d /api/src/glfs-resolve.c
parent4f0c068d8fe2654f205202e129e673aaa9342c63 (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 'api/src/glfs-resolve.c')
-rw-r--r--api/src/glfs-resolve.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index 7bd81c5aa37..2e351e16ecd 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -98,7 +98,7 @@ glfs_refresh_inode_safe (xlator_t *subvol, inode_t *oldinode)
if (!loc.inode)
return NULL;
- ret = syncop_lookup (subvol, &loc, 0, &iatt, 0, 0);
+ ret = syncop_lookup (subvol, &loc, &iatt, 0, 0, 0);
DECODE_SYNCOP_ERR (ret);
if (ret) {
@@ -168,7 +168,7 @@ glfs_resolve_symlink (struct glfs *fs, xlator_t *subvol, inode_t *inode,
goto out;
loc.path = rpath;
- ret = syncop_readlink (subvol, &loc, &path, 4096);
+ ret = syncop_readlink (subvol, &loc, &path, 4096, NULL, NULL);
DECODE_SYNCOP_ERR (ret);
if (ret < 0)
@@ -198,7 +198,7 @@ glfs_resolve_base (struct glfs *fs, xlator_t *subvol, inode_t *inode,
if (ret < 0)
goto out;
- ret = syncop_lookup (subvol, &loc, NULL, iatt, NULL, NULL);
+ ret = syncop_lookup (subvol, &loc, iatt, NULL, NULL, NULL);
DECODE_SYNCOP_ERR (ret);
out:
loc_wipe (&loc);
@@ -283,7 +283,7 @@ glfs_resolve_component (struct glfs *fs, xlator_t *subvol, inode_t *parent,
goto out;
}
- ret = syncop_lookup (subvol, &loc, xattr_req, &ciatt, NULL, NULL);
+ ret = syncop_lookup (subvol, &loc, &ciatt, NULL, xattr_req, NULL);
if (ret && reval) {
/*
* A stale mapping might exist for a dentry/inode that has been
@@ -313,8 +313,8 @@ glfs_resolve_component (struct glfs *fs, xlator_t *subvol, inode_t *parent,
goto out;
}
- ret = syncop_lookup (subvol, &loc, xattr_req, &ciatt,
- NULL, NULL);
+ ret = syncop_lookup (subvol, &loc, &ciatt, NULL,
+ xattr_req, NULL);
}
DECODE_SYNCOP_ERR (ret);
if (ret)
@@ -550,7 +550,7 @@ glfs_migrate_fd_locks_safe (struct glfs *fs, xlator_t *oldsubvol, fd_t *oldfd,
newfd->lk_ctx = fd_lk_ctx_ref (oldfd->lk_ctx);
ret = syncop_fgetxattr (oldsubvol, oldfd, &lockinfo,
- GF_XATTR_LOCKINFO_KEY, NULL);
+ GF_XATTR_LOCKINFO_KEY, NULL, NULL);
DECODE_SYNCOP_ERR (ret);
if (ret < 0) {
gf_log (fs->volname, GF_LOG_WARNING,
@@ -569,7 +569,7 @@ glfs_migrate_fd_locks_safe (struct glfs *fs, xlator_t *oldsubvol, fd_t *oldfd,
goto out;
}
- ret = syncop_fsetxattr (newsubvol, newfd, lockinfo, 0);
+ ret = syncop_fsetxattr (newsubvol, newfd, lockinfo, 0, NULL, NULL);
DECODE_SYNCOP_ERR (ret);
if (ret < 0) {
gf_log (fs->volname, GF_LOG_WARNING,
@@ -605,7 +605,7 @@ glfs_migrate_fd_safe (struct glfs *fs, xlator_t *newsubvol, fd_t *oldfd)
return fd_ref (oldfd);
if (!oldsubvol->switched) {
- ret = syncop_fsync (oldsubvol, oldfd, 0);
+ ret = syncop_fsync (oldsubvol, oldfd, 0, NULL, NULL);
DECODE_SYNCOP_ERR (ret);
if (ret) {
gf_log (fs->volname, GF_LOG_WARNING,
@@ -648,11 +648,11 @@ glfs_migrate_fd_safe (struct glfs *fs, xlator_t *newsubvol, fd_t *oldfd)
if (IA_ISDIR (oldinode->ia_type))
- ret = syncop_opendir (newsubvol, &loc, newfd);
+ ret = syncop_opendir (newsubvol, &loc, newfd, NULL, NULL);
else
ret = syncop_open (newsubvol, &loc,
oldfd->flags & ~(O_TRUNC|O_EXCL|O_CREAT),
- newfd);
+ newfd, NULL, NULL);
DECODE_SYNCOP_ERR (ret);
loc_wipe (&loc);