From 0b6b2b3cab09eacf9b03638d8770c83aeb0b8fea Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Sun, 7 Nov 2010 13:35:36 -0500 Subject: [PATCH] Cache bypass: adjust read size for non-contiguous readpages The bypass code's readpages does deal with a non-contiguous list of pages, but it doesn't adjust the size of the read it requests from the background daemon accordingly. As a result we'll ask the server for pages we were not asked to read. Change-Id: I5468a4a68f4f415961298144f5bb581faeda540a Reviewed-on: http://gerrit.openafs.org/3282 Reviewed-by: Matt Benjamin Reviewed-by: Derrick Brashear Tested-by: BuildBot --- src/afs/LINUX/osi_vnodeops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index e16092f6e1..7489529670 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -1758,7 +1758,8 @@ afs_linux_bypass_readpages(struct file *fp, struct address_space *mapping, page_cache_release(pp); iovecp[page_ix].iov_base = (void *) 0; base_index++; - continue; + ancr->length -= PAGE_SIZE; + continue; } base_index++; if(code) {