Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpkern Instead of causing a catastrophic ...



details:   https://anonhg.NetBSD.org/src/rev/4ba360d7f887
branches:  trunk
changeset: 754350:4ba360d7f887
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Apr 28 16:34:25 2010 +0000

description:
Instead of causing a catastrophic failure when uvm_loanuobjpages()
is called, just pretend it hit a wired page and return EBUSY.  This
should cause callers to use a non-loaning access path instead.

Fixes file read path of stock nfs kernel module (previously it was
easy to just frob the nfsd_use_loan boolean into the other position
by simple value assingment, but now that nfsserver can be autoloaded
at runtime into the rump kernel, that approach is a little more
challenging since the variable isn't available in application
linkage.  yes, things like adding a sysctl for the variable would
work, but now everything works out-of-the-box).

diffstat:

 sys/rump/librump/rumpkern/vm.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d33edad057a4 -r 4ba360d7f887 sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c    Wed Apr 28 15:56:24 2010 +0000
+++ b/sys/rump/librump/rumpkern/vm.c    Wed Apr 28 16:34:25 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm.c,v 1.71 2010/04/21 16:16:31 pooka Exp $    */
+/*     $NetBSD: vm.c,v 1.72 2010/04/28 16:34:25 pooka Exp $    */
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.71 2010/04/21 16:16:31 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.72 2010/04/28 16:34:25 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -508,7 +508,7 @@
        struct vm_page **opp)
 {
 
-       panic("%s: unimplemented", __func__);
+       return EBUSY;
 }
 
 void



Home | Main Index | Thread Index | Old Index