diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2010-09-06 23:44:12 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2010-09-06 23:44:12 +0000 |
commit | 87f3d58d3064a78c9b29faa668f1d98225f01e71 (patch) | |
tree | bbc6c4fb3c1748ac72b8b1b8bab76b4e91896fd0 /sys/uvm/uvm_swap.c | |
parent | a41bd31e53cce764c5bc6861ce6be4074cc59551 (diff) |
End the VOP experiment. Instead of the ridicolusly complicated operation
vector setup that has questionable features (that have, as far as I can
tell never been used in practice, atleast not in OpenBSD), remove all
the gunk and favor a simple struct full of function pointers that get
set directly by each of the filesystems.
Removes gobs of ugly code and makes things simpler by a magnitude.
The only downside of this is that we loose the vnoperate feature so
the spec/fifo operations of the filesystems need to be kept in sync
with specfs and fifofs, this is no big deal as the API it self is pretty
static.
Many thanks to armani@ who pulled an earlier version of this diff to
current after c2k10 and Gabriel Kihlman on tech@ for testing.
Liked by many. "come on, find your balls" deraadt@.
Diffstat (limited to 'sys/uvm/uvm_swap.c')
-rw-r--r-- | sys/uvm/uvm_swap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index 252e6ff2efc..289e27942d1 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_swap.c,v 1.95 2010/09/06 16:33:41 thib Exp $ */ +/* $OpenBSD: uvm_swap.c,v 1.96 2010/09/06 23:44:11 thib Exp $ */ /* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */ /* @@ -904,7 +904,7 @@ swap_on(struct proc *p, struct swapdev *sdp) long addr; struct vattr va; #if defined(NFSCLIENT) - extern int (**nfsv2_vnodeop_p)(void *); + extern struct vops nfs_vops; #endif /* defined(NFSCLIENT) */ dev_t dev; UVMHIST_FUNC("swap_on"); UVMHIST_CALLED(pdhist); @@ -965,7 +965,7 @@ swap_on(struct proc *p, struct swapdev *sdp) * at any one time. take it easy on NFS servers. */ #if defined(NFSCLIENT) - if (vp->v_op == nfsv2_vnodeop_p) + if (vp->v_op == &nfs_vops) sdp->swd_maxactive = 2; /* XXX */ else #endif /* defined(NFSCLIENT) */ |