From 054e6b6e930755b473d225762beb9d058c6dcaba Mon Sep 17 00:00:00 2001 From: pooka Date: Tue, 10 Nov 2009 16:55:12 +0000 Subject: [PATCH] Code which uses pages fetched by the pager needs PGO_SYNCIO for obvious reasons. --- sys/rump/librump/rumpvfs/vm_vfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/rump/librump/rumpvfs/vm_vfs.c b/sys/rump/librump/rumpvfs/vm_vfs.c index a45f2da72131..15953f1fac86 100644 --- a/sys/rump/librump/rumpvfs/vm_vfs.c +++ b/sys/rump/librump/rumpvfs/vm_vfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_vfs.c,v 1.13 2009/10/18 00:41:09 pooka Exp $ */ +/* $NetBSD: vm_vfs.c,v 1.14 2009/11/10 16:55:12 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_vfs.c,v 1.13 2009/10/18 00:41:09 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_vfs.c,v 1.14 2009/11/10 16:55:12 pooka Exp $"); #include @@ -96,7 +96,8 @@ uvm_vnp_zerorange(struct vnode *vp, off_t off, size_t len) npages = MIN(maxpages, round_page(len) >> PAGE_SHIFT); memset(pgs, 0, npages * sizeof(struct vm_page *)); mutex_enter(&uobj->vmobjlock); - rv = uobj->pgops->pgo_get(uobj, off, pgs, &npages, 0, 0, 0, 0); + rv = uobj->pgops->pgo_get(uobj, off, pgs, &npages, 0, + VM_PROT_READ | VM_PROT_WRITE, 0, PGO_SYNCIO); KASSERT(npages > 0); for (i = 0; i < npages; i++) {