From d01f7244e9d9f7e3ef84e0ba7b48ef1b1b09d809 Mon Sep 17 00:00:00 2001 From: Kinglong Mee Date: Mon, 12 Feb 2018 15:13:49 +0800 Subject: 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 --- tests/basic/gfapi/upcall-cache-invalidate.c | 2 +- tests/basic/gfapi/upcall-register-api.c | 2 +- tests/bugs/io-cache/bug-read-hang.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/basic/gfapi/upcall-cache-invalidate.c b/tests/basic/gfapi/upcall-cache-invalidate.c index 9add3381278..d1b421dff18 100644 --- a/tests/basic/gfapi/upcall-cache-invalidate.c +++ b/tests/basic/gfapi/upcall-cache-invalidate.c @@ -137,7 +137,7 @@ main (int argc, char *argv[]) LOG_ERR ("glfs_lseek", ret); memset (readbuf, 0, sizeof(readbuf)); - ret = glfs_pread (fd_tmp2, readbuf, 4, 0, 0); + ret = glfs_pread (fd_tmp2, readbuf, 4, 0, 0, NULL); if (ret <= 0) { ret = -1; diff --git a/tests/basic/gfapi/upcall-register-api.c b/tests/basic/gfapi/upcall-register-api.c index 56227a93d0a..cabd8be4f31 100644 --- a/tests/basic/gfapi/upcall-register-api.c +++ b/tests/basic/gfapi/upcall-register-api.c @@ -117,7 +117,7 @@ int perform_io (glfs_t *fs, glfs_t *fs2, int cnt) LOG_ERR ("glfs_lseek", ret); memset (readbuf, 0, sizeof(readbuf)); - ret = glfs_pread (fd_tmp2, readbuf, 4, 0, 0); + ret = glfs_pread (fd_tmp2, readbuf, 4, 0, 0, NULL); if (ret <= 0) { ret = -1; diff --git a/tests/bugs/io-cache/bug-read-hang.c b/tests/bugs/io-cache/bug-read-hang.c index 74dfddd7a6e..7709a41719d 100644 --- a/tests/bugs/io-cache/bug-read-hang.c +++ b/tests/bugs/io-cache/bug-read-hang.c @@ -102,7 +102,7 @@ main (int argc, char *argv[]) buf = (char *) malloc (5); - ret = glfs_pread (fd, buf, 5, 0, 0); + ret = glfs_pread (fd, buf, 5, 0, 0, NULL); if (ret < 0) { fprintf (stderr, "Read(%s): %d (%s)\n", "test", ret, strerror (errno)); -- cgit