svn commit: r328847 - stable/11/sys/kern
Andriy Gapon
avg at FreeBSD.org
Sun Feb 4 14:00:39 UTC 2018
Author: avg
Date: Sun Feb 4 14:00:38 2018
New Revision: 328847
URL: https://svnweb.freebsd.org/changeset/base/328847
Log:
MFC r328126: correct read-ahead calculations in vfs_bio_getpages
Modified:
stable/11/sys/kern/vfs_bio.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/kern/vfs_bio.c
==============================================================================
--- stable/11/sys/kern/vfs_bio.c Sun Feb 4 13:58:31 2018 (r328846)
+++ stable/11/sys/kern/vfs_bio.c Sun Feb 4 14:00:38 2018 (r328847)
@@ -4764,7 +4764,14 @@ vfs_bio_getpages(struct vnode *vp, vm_page_t *ma, int
la = IDX_TO_OFF(ma[count - 1]->pindex);
if (la >= object->un_pager.vnp.vnp_size)
return (VM_PAGER_BAD);
- lpart = la + PAGE_SIZE > object->un_pager.vnp.vnp_size;
+
+ /*
+ * Change the meaning of la from where the last requested page starts
+ * to where it ends, because that's the end of the requested region
+ * and the start of the potential read-ahead region.
+ */
+ la += PAGE_SIZE;
+ lpart = la > object->un_pager.vnp.vnp_size;
bo_bs = get_blksize(vp, get_lblkno(vp, IDX_TO_OFF(ma[0]->pindex)));
/*
More information about the svn-src-all
mailing list