From: Marc Dionne Date: Sun, 7 Nov 2010 18:35:36 +0000 (-0500) Subject: Cache bypass: adjust read size for non-contiguous readpages X-Git-Tag: upstream/1.6.0.pre2^2~150 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3fbac5f800b689d40fd7bdef63dacfd5125e3714;p=packages%2Fo%2Fopenafs.git 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. Reviewed-on: http://gerrit.openafs.org/3282 Reviewed-by: Matt Benjamin Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 0b6b2b3cab09eacf9b03638d8770c83aeb0b8fea) Change-Id: Ic7241fb27bd177eb7279292804def753f9120407 Reviewed-on: http://gerrit.openafs.org/3643 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index b799bc115..204cc21af 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -1748,7 +1748,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) {