summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2009-08-12 16:42:25 +0000
committerBob Beck <beck@cvs.openbsd.org>2009-08-12 16:42:25 +0000
commitc1f8a7de1a0cef9103fc122529d02253e13267ff (patch)
tree5715c84db7225dd634277053f1187f5d6ffdce79 /sys/kern/vfs_subr.c
parent71c1c313d7a054c7699c03b66e1e598b1d7ae5b0 (diff)
Namecache revamp.
This eliminates the large single namecache hash table, and implements the name cache as a global lru of entires, and a redblack tree in each vnode. It makes cache_purge actually purge the namecache entries associated with a vnode when a vnode is recycled (very important for later on actually being able to resize the vnode pool) This commit does #if 0 out a bunch of procmap code that was already broken before this change, but needs to be redone completely. Tested by many, including in thib's nfs test setup. ok oga@,art@,thib@,miod@
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 7a420752b26..98be032d3f4 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.180 2009/08/02 16:28:40 beck Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.181 2009/08/12 16:42:24 beck Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -360,6 +360,8 @@ getnewvnode(enum vtagtype tag, struct mount *mp, int (**vops)(void *),
splx(s);
vp = pool_get(&vnode_pool, PR_WAITOK | PR_ZERO);
RB_INIT(&vp->v_bufs_tree);
+ RB_INIT(&vp->v_nc_tree);
+ TAILQ_INIT(&vp->v_cache_dst);
numvnodes++;
} else {
for (vp = TAILQ_FIRST(listhd); vp != NULLVP;