From bc10ade1cff9d6cd3b3528ec6c845efadc722481 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 7 Mar 2012 21:02:16 +0530 Subject: 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 Reviewed-on: http://review.gluster.com/2894 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/performance/io-cache/src/io-cache.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'xlators/performance/io-cache/src/io-cache.c') diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index 823bac38d48..3296682303d 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); -- cgit