summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorShyamsundarR <srangana@redhat.com>2018-05-08 11:06:15 -0400
committerShyamsundarR <srangana@redhat.com>2018-05-08 11:27:48 -0400
commit16873e16f3fdfe7f83ca919ad188075eebb5dd7c (patch)
treec48e33a299a52c533c134942aca8c33992c26dbe /xlators
parent427951b7f74c643d5b7c7c946bc348209b974274 (diff)
Revert "gfapi: return pre/post attributes from glfs_pread/pwrite"
This reverts commit d01f7244e9d9f7e3ef84e0ba7b48ef1b1b09d809. This is being reverted as the API signatures should adapt to a statx like structure, and also all APIs that need to return pre/post attrs are not complete. As a result, instead of fixing up part of the APIs and then refixing the same in a later release, removing these set of fixes from the branch Additionally fixed up posix-entry-ops.c which was using the new syncop signature Updates: bz#1575386 Change-Id: I35222dadc4a2e97010bc1e6b97b6f83583c311f6
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c6
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c5
-rwxr-xr-xxlators/experimental/fdl/src/gen_recon.py2
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot.c2
-rw-r--r--xlators/features/snapview-server/src/snapview-server.c12
-rw-r--r--xlators/storage/posix/src/posix-entry-ops.c2
6 files changed, 19 insertions, 10 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 40dee7a7d6c..72e0e85a0a5 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -141,7 +141,7 @@ __afr_is_sink_zero_filled (xlator_t *this, fd_t *fd, size_t size,
priv = this->private;
ret = syncop_readv (priv->children[sink], fd, size, offset, 0, &iovec,
- &count, &iobref, NULL, NULL, NULL);
+ &count, &iobref, NULL, NULL);
if (ret < 0)
goto out;
ret = iov_0filled (iovec, count);
@@ -171,7 +171,7 @@ __afr_selfheal_data_read_write (call_frame_t *frame, xlator_t *this, fd_t *fd,
priv = this->private;
ret = syncop_readv (priv->children[source], fd, size, offset, 0,
- &iovec, &count, &iobref, NULL, NULL, NULL);
+ &iovec, &count, &iobref, NULL, NULL);
if (ret <= 0)
return ret;
@@ -220,7 +220,7 @@ __afr_selfheal_data_read_write (call_frame_t *frame, xlator_t *this, fd_t *fd,
}
ret = syncop_writev (priv->children[i], fd, iovec, count,
- offset, iobref, 0, NULL, NULL, NULL, NULL);
+ offset, iobref, 0, NULL, NULL);
if (ret != iov_length (iovec, count)) {
/* write() failed on this sink. unset the corresponding
member in sinks[] (which is healed_sinks[] in the
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 6f29f91913f..a2a051e27b7 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -1160,7 +1160,7 @@ __dht_rebalance_migrate_data (xlator_t *this, gf_defrag_info_t *defrag,
ret = syncop_readv (from, src, read_size,
offset, 0, &vector, &count, &iobref, NULL,
- NULL, NULL);
+ NULL);
if (!ret || (ret < 0)) {
*fop_errno = -ret;
break;
@@ -1206,8 +1206,7 @@ __dht_rebalance_migrate_data (xlator_t *this, gf_defrag_info_t *defrag,
}
ret = syncop_writev (to, dst, vector, count,
- offset, iobref, 0, NULL, NULL,
- xdata, NULL);
+ offset, iobref, 0, xdata, NULL);
if (ret < 0) {
*fop_errno = -ret;
}
diff --git a/xlators/experimental/fdl/src/gen_recon.py b/xlators/experimental/fdl/src/gen_recon.py
index 75323ea3dd9..db7f7bbc31c 100755
--- a/xlators/experimental/fdl/src/gen_recon.py
+++ b/xlators/experimental/fdl/src/gen_recon.py
@@ -142,7 +142,7 @@ def get_special_subs (name, args, fop_type):
# is not stored in or read from the journal. There are other ways to
# do that, but this is the only place we need anything similar and we
# already have to treat it as a special case so this is simplest.
- s_args_str = 'fd, &vector, 1, off, iobref, flags, &preop, &postop, xdata'
+ s_args_str = 'fd, &vector, 1, off, iobref, flags, xdata'
elif name == 'symlink':
# Swap 'linkpath' and 'loc'.
s_args_str = '&loc, linkpath, &iatt, xdata'
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c
index a9b70b61f8a..db97ce54735 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot.c
@@ -296,7 +296,7 @@ br_object_read_block_and_sign (xlator_t *this, fd_t *fd, br_child_t *child,
ret = syncop_readv (child->xl, fd,
size, offset, 0, &iovec, &count, &iobref, NULL,
- NULL, NULL);
+ NULL);
if (ret < 0) {
gf_msg (this->name, GF_LOG_ERROR, errno, BRB_MSG_READV_FAILED,
diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c
index 18f00d7d2d8..8fee435de64 100644
--- a/xlators/features/snapview-server/src/snapview-server.c
+++ b/xlators/features/snapview-server/src/snapview-server.c
@@ -1990,7 +1990,7 @@ svs_readv (call_frame_t *frame, xlator_t *this,
goto out;
}
- ret = glfs_pread (glfd, iobuf->ptr, size, offset, 0, &fstatbuf);
+ ret = glfs_pread (glfd, iobuf->ptr, size, offset, 0);
if (ret < 0) {
op_ret = -1;
op_errno = errno;
@@ -2005,6 +2005,16 @@ svs_readv (call_frame_t *frame, xlator_t *this,
iobref = iobref_new ();
iobref_add (iobref, iobuf);
+
+ ret = glfs_fstat (glfd, &fstatbuf);
+ if (ret) {
+ op_ret = -1;
+ op_errno = errno;
+ gf_log (this->name, GF_LOG_ERROR, "glfs_fstat failed after "
+ "readv on %s", uuid_utoa (fd->inode->gfid));
+ goto out;
+ }
+
iatt_from_stat (&stbuf, &fstatbuf);
gf_uuid_copy (stbuf.ia_gfid, fd->inode->gfid);
svs_fill_ino_from_gfid (&stbuf);
diff --git a/xlators/storage/posix/src/posix-entry-ops.c b/xlators/storage/posix/src/posix-entry-ops.c
index 377fece5610..d8ec34a742b 100644
--- a/xlators/storage/posix/src/posix-entry-ops.c
+++ b/xlators/storage/posix/src/posix-entry-ops.c
@@ -2278,7 +2278,7 @@ posix_put (call_frame_t *frame, xlator_t *this, loc_t *loc,
}
op_ret = syncop_writev (this, fd, vector, count, offset, iobref,
- flags, NULL, NULL, xdata, NULL);
+ flags, xdata, NULL);
if (op_ret < 0) {
op_errno = errno;
gf_msg (this->name, GF_LOG_ERROR, errno, P_MSG_WRITE_FAILED,