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 Clear PG_FAKE for pages we wrote to...
details: https://anonhg.NetBSD.org/src/rev/d1eaee58651a
branches: trunk
changeset: 748238:d1eaee58651a
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Oct 18 00:41:09 2009 +0000
description:
Clear PG_FAKE for pages we wrote to. This avoids paging in data
we already have (and the backend might not yet have) in cases where
fs_bshift > PAGE_SHIFT.
diffstat:
sys/rump/librump/rumpvfs/vm_vfs.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r cb23871850dd -r d1eaee58651a sys/rump/librump/rumpvfs/vm_vfs.c
--- a/sys/rump/librump/rumpvfs/vm_vfs.c Sat Oct 17 23:43:22 2009 +0000
+++ b/sys/rump/librump/rumpvfs/vm_vfs.c Sun Oct 18 00:41:09 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_vfs.c,v 1.12 2009/10/07 10:23:50 pooka Exp $ */
+/* $NetBSD: vm_vfs.c,v 1.13 2009/10/18 00:41:09 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.12 2009/10/07 10:23:50 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_vfs.c,v 1.13 2009/10/18 00:41:09 pooka Exp $");
#include <sys/param.h>
@@ -157,10 +157,11 @@
pageoff = uio->uio_offset & PAGE_MASK;
xfersize = MIN(MIN(todo, PAGE_SIZE), PAGE_SIZE-pageoff);
+ KASSERT(xfersize > 0);
uiomove((uint8_t *)pgs[i]->uanon + pageoff,
xfersize, uio);
if (uio->uio_rw == UIO_WRITE)
- pgs[i]->flags &= ~PG_CLEAN;
+ pgs[i]->flags &= ~(PG_CLEAN | PG_FAKE);
todo -= xfersize;
}
uvm_page_unbusy(pgs, npages);
Home |
Main Index |
Thread Index |
Old Index