svn commit: r292376 - projects/sendfile/sys/kern
Gleb Smirnoff
glebius at FreeBSD.org
Wed Dec 16 21:52:38 UTC 2015
Author: glebius
Date: Wed Dec 16 21:52:36 2015
New Revision: 292376
URL: https://svnweb.freebsd.org/changeset/base/292376
Log:
Adopt new sendfile to new vm_pager_get_pages() KPI.
Modified:
projects/sendfile/sys/kern/uipc_syscalls.c
Modified: projects/sendfile/sys/kern/uipc_syscalls.c
==============================================================================
--- projects/sendfile/sys/kern/uipc_syscalls.c Wed Dec 16 21:33:57 2015 (r292375)
+++ projects/sendfile/sys/kern/uipc_syscalls.c Wed Dec 16 21:52:36 2015 (r292376)
@@ -2084,13 +2084,14 @@ struct sf_io {
};
static void
-sf_iodone(void *arg, vm_page_t *pg, int reqpage, int error)
+sf_iodone(void *arg, vm_page_t *pg, int count, int error)
{
struct sf_io *sfio = arg;
struct socket *so;
if (pg) {
- vm_page_xunbusy(pg[reqpage]);
+ for (int i = 0; i < count; i++)
+ vm_page_xunbusy(pg[i]);
if (error)
sfio->error = error;
}
@@ -2220,7 +2221,7 @@ sendfile_swapin(vm_object_t obj, struct
}
refcount_acquire(&sfio->nios);
- rv = vm_pager_get_pages_async(obj, pa + i, count, 0,
+ rv = vm_pager_get_pages_async(obj, pa + i, count, NULL, NULL,
&sf_iodone, sfio);
KASSERT(rv == VM_PAGER_OK, ("%s: pager fail obj %p page %p",
More information about the svn-src-projects
mailing list