summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache/src/io-cache.c
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2012-03-07 21:02:16 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-08 19:22:02 -0800
commitbc10ade1cff9d6cd3b3528ec6c845efadc722481 (patch)
treebc3f1b0edf9e96bffd0cd39a56996290673bc73f /xlators/performance/io-cache/src/io-cache.c
parent204ab142977163f634cbf4ec92be58754225504a (diff)
performance/io-cache: pass appropriate op_errno even during successful
reads. An op_errno equal to ENOENT with op_ret equal to zero is used by storage/posix xlator to indicate EOF. NFS relies on this protocol for correct functioning. Change-Id: I136fbf429a829bd7bd75ce8ce236f9557a418a5d BUG: 795789 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/2894 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/performance/io-cache/src/io-cache.c')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 823bac38d..329668230 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -999,7 +999,7 @@ ioc_dispatch_requests (call_frame_t *frame, ioc_inode_t *ioc_inode, fd_t *fd,
"cache hit for trav_offset=%"
PRId64"/local_offset=%"PRId64"",
trav_offset, local_offset);
- waitq = __ioc_page_wakeup (trav);
+ waitq = __ioc_page_wakeup (trav, 0);
} else {
/* if waitq already exists, fstat
* revalidate is
@@ -1016,7 +1016,8 @@ ioc_dispatch_requests (call_frame_t *frame, ioc_inode_t *ioc_inode, fd_t *fd,
local->op_errno = -ret;
need_validate = 0;
- waitq = __ioc_page_wakeup (trav);
+ waitq = __ioc_page_wakeup (trav,
+ 0);
ioc_inode_unlock (ioc_inode);
ioc_waitq_return (waitq);
@@ -1048,7 +1049,7 @@ ioc_dispatch_requests (call_frame_t *frame, ioc_inode_t *ioc_inode, fd_t *fd,
if (ret == -1) {
ioc_inode_lock (ioc_inode);
{
- waitq = __ioc_page_wakeup (trav);
+ waitq = __ioc_page_wakeup (trav, 0);
}
ioc_inode_unlock (ioc_inode);