summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache/src/io-cache.c
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2012-03-14 10:14:18 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-14 03:36:14 -0700
commiteae8a469e7172380dd9c820405e7528a0ec33bad (patch)
treeb0ffc0a047c8a9c14b93a9b6dd51354f69bfd0d9 /xlators/performance/io-cache/src/io-cache.c
parentc0b3ba9b3b65de88628a36cc51d2864ec72de0d0 (diff)
performance/io-cache: store op_errno in page.
This will enable us to pass appropriate op_errno indicating EOF even during cache-hits. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Change-Id: Ib239b5de9b8fca2bd8eb5ec87c93f2cb1c11a99c BUG: 795789 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/2939 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 78c8b14bf..5b909091e 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -999,7 +999,8 @@ 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, 0);
+ waitq = __ioc_page_wakeup (trav,
+ trav->op_errno);
} else {
/* if waitq already exists, fstat
* revalidate is
@@ -1017,7 +1018,7 @@ ioc_dispatch_requests (call_frame_t *frame, ioc_inode_t *ioc_inode, fd_t *fd,
need_validate = 0;
waitq = __ioc_page_wakeup (trav,
- 0);
+ trav->op_errno);
ioc_inode_unlock (ioc_inode);
ioc_waitq_return (waitq);
@@ -1049,7 +1050,8 @@ 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, 0);
+ waitq = __ioc_page_wakeup (trav,
+ trav->op_errno);
}
ioc_inode_unlock (ioc_inode);