Module Name: src
Committed By: pooka
Date: Tue Mar 2 21:32:29 UTC 2010
Modified Files:
src/sys/dev: vnd.c
src/sys/uvm: uvm_swap.c
Log Message:
For the nfs throttling kludge, test against v_tag == VT_NFS instead
of v_op (the latter imposes linkage).
To generate a diff of this commit:
cvs rdiff -u -r1.207 -r1.208 src/sys/dev/vnd.c
cvs rdiff -u -r1.149 -r1.150 src/sys/uvm/uvm_swap.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/dev/vnd.c
diff -u src/sys/dev/vnd.c:1.207 src/sys/dev/vnd.c:1.208
--- src/sys/dev/vnd.c:1.207 Sun Jan 31 15:40:08 2010
+++ src/sys/dev/vnd.c Tue Mar 2 21:32:29 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.207 2010/01/31 15:40:08 mlelstv Exp $ */
+/* $NetBSD: vnd.c,v 1.208 2010/03/02 21:32:29 pooka Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -130,10 +130,9 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.207 2010/01/31 15:40:08 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.208 2010/03/02 21:32:29 pooka Exp $");
#if defined(_KERNEL_OPT)
-#include "fs_nfs.h"
#include "opt_vnd.h"
#endif
@@ -1560,13 +1559,10 @@
static void
vndthrottle(struct vnd_softc *vnd, struct vnode *vp)
{
-#ifdef NFS
- extern int (**nfsv2_vnodeop_p)(void *);
- if (vp->v_op == nfsv2_vnodeop_p)
+ if (vp->v_tag == VT_NFS)
vnd->sc_maxactive = 2;
else
-#endif
vnd->sc_maxactive = 8;
if (vnd->sc_maxactive < 1)
Index: src/sys/uvm/uvm_swap.c
diff -u src/sys/uvm/uvm_swap.c:1.149 src/sys/uvm/uvm_swap.c:1.150
--- src/sys/uvm/uvm_swap.c:1.149 Sun Feb 7 15:51:28 2010
+++ src/sys/uvm/uvm_swap.c Tue Mar 2 21:32:29 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_swap.c,v 1.149 2010/02/07 15:51:28 mlelstv Exp $ */
+/* $NetBSD: uvm_swap.c,v 1.150 2010/03/02 21:32:29 pooka Exp $ */
/*
* Copyright (c) 1995, 1996, 1997, 2009 Matthew R. Green
@@ -30,9 +30,8 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.149 2010/02/07 15:51:28 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.150 2010/03/02 21:32:29 pooka Exp $");
-#include "fs_nfs.h"
#include "opt_uvmhist.h"
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
@@ -818,9 +817,6 @@
long addr;
u_long result;
struct vattr va;
-#ifdef NFS
- extern int (**nfsv2_vnodeop_p)(void *);
-#endif /* NFS */
const struct bdevsw *bdev;
dev_t dev;
UVMHIST_FUNC("swap_on"); UVMHIST_CALLED(pdhist);
@@ -877,11 +873,9 @@
* limit the max # of outstanding I/O requests we issue
* at any one time. take it easy on NFS servers.
*/
-#ifdef NFS
- if (vp->v_op == nfsv2_vnodeop_p)
+ if (vp->v_tag == VT_NFS)
sdp->swd_maxactive = 2; /* XXX */
else
-#endif /* NFS */
sdp->swd_maxactive = 8; /* XXX */
break;