From 34c0850533d77ff6db89bb3d799e83b5f148dffa Mon Sep 17 00:00:00 2001 From: pooka Date: Tue, 7 Aug 2007 19:14:51 +0000 Subject: [PATCH] When doing "ubc faults", truncate offsets to page boundary to get the last page also if it's accessed from the middle of the page. --- sys/rump/librump/rumpkern/vm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/rump/librump/rumpkern/vm.c b/sys/rump/librump/rumpkern/vm.c index f4f983bdab24..a023491e87db 100644 --- a/sys/rump/librump/rumpkern/vm.c +++ b/sys/rump/librump/rumpkern/vm.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.3 2007/08/06 20:46:28 pooka Exp $ */ +/* $NetBSD: vm.c,v 1.4 2007/08/07 19:14:51 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -128,10 +128,10 @@ rump_vopwrite_fault(struct vnode *vp, voff_t offset, size_t len, struct vm_page *pgs[npages]; int rv; - if (offset >= vp->v_size) + if (trunc_page(offset) >= vp->v_size) return 0; - rv = VOP_GETPAGES(vp, offset, pgs, &npages, 0, 0, 0, 0); + rv = VOP_GETPAGES(vp, trunc_page(offset), pgs, &npages, 0, 0, 0, 0); if (rv) return rv;