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/afr/src/afr-self-heal-entry.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/afr/src/afr-self-heal-entry.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 1f3ea38ffd9..ab0d98bd014 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -56,7 +56,7 @@ afr_selfheal_entry_delete (xlator_t *this, inode_t *dir, const char *name, uuid_utoa (dir->gfid), name, uuid_utoa_r (replies[child].poststat.ia_gfid, g), subvol->name); - ret = syncop_rmdir (subvol, &loc, 1); + ret = syncop_rmdir (subvol, &loc, 1, NULL, NULL); break; default: gf_log (this->name, GF_LOG_WARNING, @@ -64,7 +64,7 @@ afr_selfheal_entry_delete (xlator_t *this, inode_t *dir, const char *name, uuid_utoa (dir->gfid), name, uuid_utoa_r (replies[child].poststat.ia_gfid, g), subvol->name); - ret = syncop_unlink (subvol, &loc); + ret = syncop_unlink (subvol, &loc, NULL, NULL); break; } } @@ -119,21 +119,23 @@ afr_selfheal_recreate_entry (xlator_t *this, int dst, int source, inode_t *dir, switch (iatt->ia_type) { case IA_IFDIR: - ret = syncop_mkdir (priv->children[dst], &loc, mode, xdata, 0); + ret = syncop_mkdir (priv->children[dst], &loc, mode, 0, + xdata, NULL); if (ret == 0) newentry[dst] = 1; break; case IA_IFLNK: ret = syncop_lookup (priv->children[dst], &srcloc, 0, 0, 0, 0); if (ret == 0) { - ret = syncop_link (priv->children[dst], &srcloc, &loc); + ret = syncop_link (priv->children[dst], &srcloc, &loc, + NULL, NULL); } else { ret = syncop_readlink (priv->children[source], &srcloc, - &linkname, 4096); + &linkname, 4096, NULL, NULL); if (ret <= 0) goto out; - ret = syncop_symlink (priv->children[dst], &loc, linkname, - xdata, NULL); + ret = syncop_symlink (priv->children[dst], &loc, + linkname, NULL, xdata, NULL); if (ret == 0) newentry[dst] = 1; } @@ -143,7 +145,7 @@ afr_selfheal_recreate_entry (xlator_t *this, int dst, int source, inode_t *dir, if (ret) goto out; ret = syncop_mknod (priv->children[dst], &loc, mode, - iatt->ia_rdev, xdata, &newent); + iatt->ia_rdev, &newent, xdata, NULL); if (ret == 0 && newent.ia_nlink == 1) { /* New entry created. Mark @dst pending on all sources */ newentry[dst] = 1; @@ -508,7 +510,8 @@ afr_selfheal_entry_do_subvol (call_frame_t *frame, xlator_t *this, if (!iter_frame) return -ENOMEM; - while ((ret = syncop_readdir (subvol, fd, 131072, offset, &entries))) { + while ((ret = syncop_readdir (subvol, fd, 131072, offset, &entries, + NULL, NULL))) { if (ret > 0) ret = 0; list_for_each_entry (entry, &entries.list, list) { @@ -682,7 +685,7 @@ afr_selfheal_data_opendir (xlator_t *this, inode_t *inode) loc.inode = inode_ref (inode); gf_uuid_copy (loc.gfid, inode->gfid); - ret = syncop_opendir (this, &loc, fd); + ret = syncop_opendir (this, &loc, fd, NULL, NULL); if (ret) { fd_unref (fd); fd = NULL; |