Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpvfs Use the same base pagerflags for bo...
details: https://anonhg.NetBSD.org/src/rev/e78c61f95e35
branches: trunk
changeset: 757202:e78c61f95e35
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Aug 19 02:07:11 2010 +0000
description:
Use the same base pagerflags for both ubc_uiomove and ubc_zerorange.
diffstat:
sys/rump/librump/rumpvfs/vm_vfs.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (45 lines):
diff -r 4a5bf8372069 -r e78c61f95e35 sys/rump/librump/rumpvfs/vm_vfs.c
--- a/sys/rump/librump/rumpvfs/vm_vfs.c Wed Aug 18 21:28:03 2010 +0000
+++ b/sys/rump/librump/rumpvfs/vm_vfs.c Thu Aug 19 02:07:11 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_vfs.c,v 1.16 2010/06/02 12:07:03 pooka Exp $ */
+/* $NetBSD: vm_vfs.c,v 1.17 2010/08/19 02:07:11 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_vfs.c,v 1.16 2010/06/02 12:07:03 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_vfs.c,v 1.17 2010/08/19 02:07:11 pooka Exp $");
#include <sys/param.h>
@@ -89,6 +89,8 @@
* UBC
*/
+#define PAGERFLAGS (PGO_SYNCIO | PGO_NOBLOCKALLOC | PGO_NOTIMESTAMP)
+
void
uvm_vnp_zerorange(struct vnode *vp, off_t off, size_t len)
{
@@ -106,7 +108,7 @@
memset(pgs, 0, npages * sizeof(struct vm_page *));
mutex_enter(&uobj->vmobjlock);
rv = uobj->pgops->pgo_get(uobj, off, pgs, &npages, 0,
- VM_PROT_READ | VM_PROT_WRITE, 0, PGO_SYNCIO);
+ VM_PROT_READ | VM_PROT_WRITE, 0, PAGERFLAGS | PGO_PASTEOF);
KASSERT(npages > 0);
for (i = 0; i < npages; i++) {
@@ -147,7 +149,7 @@
pgalloc = npages * sizeof(pgs);
pgs = kmem_zalloc(pgalloc, KM_SLEEP);
- pagerflags = PGO_SYNCIO | PGO_NOBLOCKALLOC | PGO_NOTIMESTAMP;
+ pagerflags = PAGERFLAGS;
if (flags & UBC_WRITE)
pagerflags |= PGO_PASTEOF;
if (flags & UBC_FAULTBUSY)
Home |
Main Index |
Thread Index |
Old Index