summaryrefslogtreecommitdiffstats
path: root/api/src/glfs.h
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2018-02-12 15:13:49 +0800
committerAmar Tumballi <amarts@redhat.com>2018-02-12 21:34:46 +0000
commitd01f7244e9d9f7e3ef84e0ba7b48ef1b1b09d809 (patch)
tree1a95023e8a4097e9a07ded99642228894876d8b5 /api/src/glfs.h
parentbfb66cc535ce473afa7e330800d2d2c38afe42c9 (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 'api/src/glfs.h')
-rw-r--r--api/src/glfs.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/api/src/glfs.h b/api/src/glfs.h
index 4613cd193ea..39caf3efc3f 100644
--- a/api/src/glfs.h
+++ b/api/src/glfs.h
@@ -534,11 +534,12 @@ int glfs_writev_async (glfs_fd_t *fd, const struct iovec *iov, int count,
// glfs_p{read,write}[_async]
ssize_t glfs_pread (glfs_fd_t *fd, void *buf, size_t count, off_t offset,
- int flags) __THROW
- GFAPI_PUBLIC(glfs_pread, 3.4.0);
+ int flags, struct stat *poststat) __THROW
+ GFAPI_PUBLIC(glfs_pread, 4.0.0);
ssize_t glfs_pwrite (glfs_fd_t *fd, const void *buf, size_t count,
- off_t offset, int flags) __THROW
- GFAPI_PUBLIC(glfs_pwrite, 3.4.0);
+ off_t offset, int flags, struct stat *prestat,
+ struct stat *poststat) __THROW
+ GFAPI_PUBLIC(glfs_pwrite, 4.0.0);
int glfs_pread_async (glfs_fd_t *fd, void *buf, size_t count, off_t offset,
int flags, glfs_io_cbk fn, void *data) __THROW
GFAPI_PUBLIC(glfs_pread_async, 3.4.0);