Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Only use generic readahead on VREG vnodes, the space...
details: https://anonhg.NetBSD.org/src/rev/8ebeee01db99
branches: trunk
changeset: 779524:8ebeee01db99
user: martin <martin%NetBSD.org@localhost>
date: Fri Jun 01 14:52:48 2012 +0000
description:
Only use generic readahead on VREG vnodes, the space used to store the
context is not valid on other types.
Prevents the crash reported in PR kern/38889, but does not fix the
mmap of block devices, more work is needed (no size on VBLK vnodes).
diffstat:
sys/uvm/uvm_vnode.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r f8200385f6de -r 8ebeee01db99 sys/uvm/uvm_vnode.c
--- a/sys/uvm/uvm_vnode.c Fri Jun 01 14:47:06 2012 +0000
+++ b/sys/uvm/uvm_vnode.c Fri Jun 01 14:52:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_vnode.c,v 1.97 2011/09/06 16:41:55 matt Exp $ */
+/* $NetBSD: uvm_vnode.c,v 1.98 2012/06/01 14:52:48 martin Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.97 2011/09/06 16:41:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.98 2012/06/01 14:52:48 martin Exp $");
#include "opt_uvmhist.h"
@@ -170,7 +170,8 @@
UVMHIST_LOG(ubchist, "vp %p off 0x%x", vp, (int)offset, 0,0);
- if ((access_type & VM_PROT_WRITE) == 0 && (flags & PGO_LOCKED) == 0) {
+ if (vp->v_type == VREG && (access_type & VM_PROT_WRITE) == 0
+ && (flags & PGO_LOCKED) == 0) {
vn_ra_allocctx(vp);
uvm_ra_request(vp->v_ractx, advice, uobj, offset,
*npagesp << PAGE_SHIFT);
Home |
Main Index |
Thread Index |
Old Index