svn commit: r293389 - projects/sendfile/sys/kern
Gleb Smirnoff
glebius at FreeBSD.org
Thu Jan 7 22:59:11 UTC 2016
Author: glebius
Date: Thu Jan 7 22:59:09 2016
New Revision: 293389
URL: https://svnweb.freebsd.org/changeset/base/293389
Log:
Use the application supplied readahead value the way it is documented,
and expected by developers.
Modified:
projects/sendfile/sys/kern/uipc_syscalls.c
Modified: projects/sendfile/sys/kern/uipc_syscalls.c
==============================================================================
--- projects/sendfile/sys/kern/uipc_syscalls.c Thu Jan 7 22:57:14 2016 (r293388)
+++ projects/sendfile/sys/kern/uipc_syscalls.c Thu Jan 7 22:59:09 2016 (r293389)
@@ -2537,7 +2537,7 @@ retry_space:
* since vm_pager_has_page() can hint beyond EOF.
*/
rhpages = howmany(rem + (off & PAGE_MASK), PAGE_SIZE) - npages;
- rhpages = max(SF_READAHEAD(flags), rhpages);
+ rhpages += SF_READAHEAD(flags);
rhpages = min(howmany(MAXPHYS, PAGE_SIZE), rhpages);
rhpages = min(howmany(obj_size - trunc_page(off), PAGE_SIZE) -
npages, rhpages);
More information about the svn-src-projects
mailing list