Module Name:    src
Committed By:   pooka
Date:           Sun Oct 18 00:41:09 UTC 2009

Modified Files:
        src/sys/rump/librump/rumpvfs: vm_vfs.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/rump/librump/rumpvfs/vm_vfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpvfs/vm_vfs.c
diff -u src/sys/rump/librump/rumpvfs/vm_vfs.c:1.12 src/sys/rump/librump/rumpvfs/vm_vfs.c:1.13
--- src/sys/rump/librump/rumpvfs/vm_vfs.c:1.12	Wed Oct  7 10:23:50 2009
+++ src/sys/rump/librump/rumpvfs/vm_vfs.c	Sun Oct 18 00:41:09 2009
@@ -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);

Reply via email to