diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2018-02-12 15:13:49 +0800 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-02-12 21:34:46 +0000 |
commit | d01f7244e9d9f7e3ef84e0ba7b48ef1b1b09d809 (patch) | |
tree | 1a95023e8a4097e9a07ded99642228894876d8b5 /xlators/features/snapview-server | |
parent | bfb66cc535ce473afa7e330800d2d2c38afe42c9 (diff) |
gfapi: return pre/post attributes from glfs_pread/pwrite
As nfs-ganesha, a wcc data contains pre/post attributes is return
in read/write rpc reply. nfs-ganesha get those attributes by
two getattr between the real read/write right now.
But, gluster has return pre/post attributes from glusterfsd,
those attributes are skipped in syncop/gfapi, if gfapi return them,
the upper user (nfs-ganesha) can use them directly without any
duplicate getattr.
Updates: #389
Change-Id: I7b643ae4241cfe2aeb17063de00192d81674024a
Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
Diffstat (limited to 'xlators/features/snapview-server')
-rw-r--r-- | xlators/features/snapview-server/src/snapview-server.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c index 8fee435de64..18f00d7d2d8 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); + ret = glfs_pread (glfd, iobuf->ptr, size, offset, 0, &fstatbuf); if (ret < 0) { op_ret = -1; op_errno = errno; @@ -2005,16 +2005,6 @@ 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); |