summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/src/bitd
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 /xlators/features/bit-rot/src/bitd
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 'xlators/features/bit-rot/src/bitd')
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot-scrub.c8
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot.c25
2 files changed, 18 insertions, 15 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
index d2b179027a2..1e9c2035c81 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
@@ -36,7 +36,7 @@ bitd_fetch_signature (xlator_t *this, br_child_t *child,
int32_t ret = -1;
ret = syncop_fgetxattr (child->xl, fd, xattr,
- GLUSTERFS_GET_OBJECT_SIGNATURE, NULL);
+ GLUSTERFS_GET_OBJECT_SIGNATURE, NULL, NULL);
if (ret < 0) {
br_log_object (this, "fgetxattr", fd->inode->gfid, -ret);
goto out;
@@ -224,7 +224,7 @@ bitd_compare_ckum (xlator_t *this,
gf_log (this->name, GF_LOG_INFO, "Marking %s [GFID: %s] as corrupted..",
entry->d_name, uuid_utoa (linked_inode->gfid));
- ret = syncop_fsetxattr (child->xl, fd, xattr, 0);
+ ret = syncop_fsetxattr (child->xl, fd, xattr, 0, NULL, NULL);
if (ret)
gf_log (this->name, GF_LOG_ERROR,
"Error marking object %s [GFID: %s] as corrupted",
@@ -274,7 +274,7 @@ bitd_start_scrub (xlator_t *subvol,
syncopctx_setfspid (&pid);
- ret = syncop_lookup (child->xl, &loc, NULL, &iatt, NULL, &parent_buf);
+ ret = syncop_lookup (child->xl, &loc, &iatt, &parent_buf, NULL, NULL);
if (ret) {
br_log_object_path (this, "lookup", loc.path, -ret);
goto out;
@@ -304,7 +304,7 @@ bitd_start_scrub (xlator_t *subvol,
goto unref_inode;
}
- ret = syncop_open (child->xl, &loc, O_RDWR, fd);
+ ret = syncop_open (child->xl, &loc, O_RDWR, fd, NULL, NULL);
if (ret) {
br_log_object (this, "open", linked_inode->gfid, -ret);
ret = -1;
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c
index 6a4de70bfbb..1202ca260eb 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot.c
@@ -167,10 +167,12 @@ bitd_is_bad_file (xlator_t *this, br_child_t *child, loc_t *loc, fd_t *fd)
if (fd)
ret = syncop_fgetxattr (child->xl, fd, &xattr,
- "trusted.glusterfs.bad-file", NULL);
+ "trusted.glusterfs.bad-file", NULL,
+ NULL);
else if (loc)
ret = syncop_getxattr (child->xl, loc, &xattr,
- "trusted.glusterfs.bad-file", NULL);
+ "trusted.glusterfs.bad-file", NULL,
+ NULL);
if (!ret) {
gf_log (this->name, GF_LOG_DEBUG, "[GFID: %s] is marked "
@@ -213,7 +215,7 @@ br_object_lookup (xlator_t *this, br_object_t *object,
gf_uuid_copy (loc.gfid, object->gfid);
- ret = syncop_lookup (object->child->xl, &loc, NULL, iatt, NULL, NULL);
+ ret = syncop_lookup (object->child->xl, &loc, iatt, NULL, NULL, NULL);
if (ret < 0)
goto out;
@@ -259,7 +261,7 @@ br_object_open (xlator_t *this,
loc.inode = inode_ref (inode);
gf_uuid_copy (loc.gfid, inode->gfid);
- ret = syncop_open (object->child->xl, &loc, O_RDONLY, fd);
+ ret = syncop_open (object->child->xl, &loc, O_RDONLY, fd, NULL, NULL);
if (ret) {
br_log_object (this, "open", inode->gfid, -ret);
fd_unref (fd);
@@ -295,7 +297,8 @@ br_object_read_block_and_sign (xlator_t *this, fd_t *fd, br_child_t *child,
GF_VALIDATE_OR_GOTO (this->name, child, out);
ret = syncop_readv (child->xl, fd,
- size, offset, 0, &iovec, &count, &iobref);
+ size, offset, 0, &iovec, &count, &iobref, NULL,
+ NULL);
if (ret < 0) {
gf_log (this->name, GF_LOG_ERROR, "readv on %s failed (%s)",
@@ -422,7 +425,7 @@ br_object_read_sign (inode_t *linked_inode, fd_t *fd, br_object_t *object,
goto free_isign;
}
- ret = syncop_fsetxattr (object->child->xl, fd, xattr, 0);
+ ret = syncop_fsetxattr (object->child->xl, fd, xattr, 0, NULL, NULL);
if (ret) {
gf_log (this->name, GF_LOG_ERROR, "fsetxattr of signature to "
"the object %s failed", uuid_utoa (fd->inode->gfid));
@@ -799,7 +802,7 @@ br_trigger_sign (xlator_t *this, br_child_t *child, inode_t *linked_inode,
goto out;
}
- ret = syncop_open (child->xl, loc, O_RDWR, fd);
+ ret = syncop_open (child->xl, loc, O_RDWR, fd, NULL, NULL);
if (ret) {
br_log_object (this, "open", linked_inode->gfid, -ret);
fd_unref (fd);
@@ -891,7 +894,7 @@ bitd_oneshot_crawl (xlator_t *subvol,
if (!ret)
goto out;
- ret = syncop_lookup (child->xl, &loc, NULL, &iatt, NULL, &parent_buf);
+ ret = syncop_lookup (child->xl, &loc, &iatt, &parent_buf, NULL, NULL);
if (ret) {
br_log_object_path (this, "lookup", loc.path, -ret);
goto out;
@@ -931,7 +934,7 @@ bitd_oneshot_crawl (xlator_t *subvol,
}
ret = syncop_getxattr (child->xl, &loc, &xattr,
- GLUSTERFS_GET_OBJECT_SIGNATURE, NULL);
+ GLUSTERFS_GET_OBJECT_SIGNATURE, NULL, NULL);
if (ret < 0) {
op_errno = -ret;
br_log_object (this, "getxattr", linked_inode->gfid, op_errno);
@@ -1088,7 +1091,7 @@ br_brick_connect (xlator_t *this, br_child_t *child)
gf_uuid_copy (loc.gfid, loc.inode->gfid);
loc.path = gf_strdup ("/");
- ret = syncop_lookup (child->xl, &loc, NULL, &buf, NULL, &parent);
+ ret = syncop_lookup (child->xl, &loc, &buf, &parent, NULL, NULL);
if (ret) {
op_errno = -ret;
ret = -1;
@@ -1098,7 +1101,7 @@ br_brick_connect (xlator_t *this, br_child_t *child)
}
ret = syncop_getxattr (child->xl, &loc, &xattr,
- GLUSTERFS_GET_BR_STUB_INIT_TIME, NULL);
+ GLUSTERFS_GET_BR_STUB_INIT_TIME, NULL, NULL);
if (ret) {
op_errno = -ret;
ret = -1;