summaryrefslogtreecommitdiffstats
path: root/xlators/features/snapview-server/src/snapview-server.c
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/features/snapview-server/src/snapview-server.c
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/features/snapview-server/src/snapview-server.c')
-rw-r--r--xlators/features/snapview-server/src/snapview-server.c12
1 files changed, 11 insertions, 1 deletions
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);