From 642267bcc731c5ebbe6d7926b42297c386bc67f7 Mon Sep 17 00:00:00 2001 From: ad Date: Wed, 8 Nov 2000 14:28:12 +0000 Subject: [PATCH] Update for hashinit() change. --- sys/filecorefs/filecore_node.c | 6 +++--- sys/isofs/cd9660/cd9660_node.c | 9 +++++---- sys/kern/kern_proc.c | 11 +++++++---- sys/kern/vfs_bio.c | 4 ++-- sys/kern/vfs_cache.c | 8 +++++--- sys/miscfs/fdesc/fdesc_vnops.c | 4 ++-- sys/miscfs/nullfs/null_vfsops.c | 6 +++--- sys/miscfs/overlay/overlay_vfsops.c | 6 +++--- sys/miscfs/procfs/procfs_subr.c | 6 +++--- sys/miscfs/umapfs/umap_vfsops.c | 6 +++--- sys/msdosfs/msdosfs_denode.c | 5 +++-- sys/netinet/in_pcb.c | 10 +++++----- sys/netinet/ip_input.c | 6 +++--- sys/netinet/ip_mroute.c | 5 +++-- sys/nfs/nfs_node.c | 5 +++-- sys/nfs/nfs_srvcache.c | 5 +++-- sys/nfs/nfs_subs.c | 9 +++++---- sys/ntfs/ntfs.h | 4 ++-- sys/ufs/ffs/ffs_softdep.c | 13 +++++++------ sys/ufs/ufs/ufs_ihash.c | 5 +++-- sys/ufs/ufs/ufs_quota.c | 5 +++-- sys/uvm/uvm_aobj.c | 4 ++-- 22 files changed, 78 insertions(+), 64 deletions(-) diff --git a/sys/filecorefs/filecore_node.c b/sys/filecorefs/filecore_node.c index 02252989a713..18dd0fcc28a7 100644 --- a/sys/filecorefs/filecore_node.c +++ b/sys/filecorefs/filecore_node.c @@ -1,4 +1,4 @@ -/* $NetBSD: filecore_node.c,v 1.5 2000/03/16 18:08:22 jdolecek Exp $ */ +/* $NetBSD: filecore_node.c,v 1.6 2000/11/08 14:28:12 ad Exp $ */ /*- * Copyright (c) 1998 Andrew McMurry @@ -73,8 +73,8 @@ int prtactive; /* 1 => print out reclaim of active vnodes */ void filecore_init() { - filecorehashtbl = hashinit(desiredvnodes, M_FILECOREMNT, M_WAITOK, - &filecorehash); + filecorehashtbl = hashinit(desiredvnodes, HASH_LIST, M_FILECOREMNT, + M_WAITOK, &filecorehash); simple_lock_init(&filecore_ihash_slock); pool_init(&filecore_node_pool, sizeof(struct filecore_node), 0, 0, 0, "filecrnopl", 0, pool_page_alloc_nointr, diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c index ae0f377d916d..2fb051eb38f0 100644 --- a/sys/isofs/cd9660/cd9660_node.c +++ b/sys/isofs/cd9660/cd9660_node.c @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_node.c,v 1.23 2000/03/30 12:13:31 augustss Exp $ */ +/* $NetBSD: cd9660_node.c,v 1.24 2000/11/08 14:28:13 ad Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1994 @@ -85,11 +85,12 @@ static u_int cd9660_chars2ui __P((u_char *, int)); void cd9660_init() { - isohashtbl = hashinit(desiredvnodes, M_ISOFSMNT, M_WAITOK, &isohash); + isohashtbl = hashinit(desiredvnodes, HASH_LIST, M_ISOFSMNT, M_WAITOK, + &isohash); simple_lock_init(&cd9660_ihash_slock); #ifdef ISODEVMAP - idvhashtbl = hashinit(desiredvnodes / 8, M_ISOFSMNT, M_WAITOK, - &idvhash); + idvhashtbl = hashinit(desiredvnodes / 8, HASH_LIST, M_ISOFSMNT, + M_WAITOK, &idvhash); #endif pool_init(&cd9660_node_pool, sizeof(struct iso_node), 0, 0, 0, "cd9660nopl", 0, pool_page_alloc_nointr, pool_page_free_nointr, diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 585caac207e1..8620ab625b6b 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_proc.c,v 1.42 2000/08/17 14:37:54 thorpej Exp $ */ +/* $NetBSD: kern_proc.c,v 1.43 2000/11/08 14:28:13 ad Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -179,9 +179,12 @@ procinit() LIST_INIT(&deadproc); simple_lock_init(&deadproc_slock); - pidhashtbl = hashinit(maxproc / 4, M_PROC, M_WAITOK, &pidhash); - pgrphashtbl = hashinit(maxproc / 4, M_PROC, M_WAITOK, &pgrphash); - uihashtbl = hashinit(maxproc / 16, M_PROC, M_WAITOK, &uihash); + pidhashtbl = + hashinit(maxproc / 4, HASH_LIST, M_PROC, M_WAITOK, &pidhash); + pgrphashtbl = + hashinit(maxproc / 4, HASH_LIST, M_PROC, M_WAITOK, &pgrphash); + uihashtbl = + hashinit(maxproc / 16, HASH_LIST, M_PROC, M_WAITOK, &uihash); pool_init(&proc_pool, sizeof(struct proc), 0, 0, 0, "procpl", 0, pool_page_alloc_nointr, pool_page_free_nointr, M_PROC); diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 102cfa269779..65202e2b38bd 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_bio.c,v 1.69 2000/11/08 05:53:10 chs Exp $ */ +/* $NetBSD: vfs_bio.c,v 1.70 2000/11/08 14:28:13 ad Exp $ */ /*- * Copyright (c) 1994 Christopher G. Demetriou @@ -157,7 +157,7 @@ bufinit() for (dp = bufqueues; dp < &bufqueues[BQUEUES]; dp++) TAILQ_INIT(dp); - bufhashtbl = hashinit(nbuf, M_CACHE, M_WAITOK, &bufhash); + bufhashtbl = hashinit(nbuf, HASH_LIST, M_CACHE, M_WAITOK, &bufhash); base = bufpages / nbuf; residual = bufpages % nbuf; for (i = 0; i < nbuf; i++) { diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 3bcaeecd8634..94028ccafed1 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_cache.c,v 1.25 2000/04/16 21:41:49 chs Exp $ */ +/* $NetBSD: vfs_cache.c,v 1.26 2000/11/08 14:28:13 ad Exp $ */ /* * Copyright (c) 1989, 1993 @@ -399,8 +399,10 @@ nchinit() { TAILQ_INIT(&nclruhead); - nchashtbl = hashinit(desiredvnodes, M_CACHE, M_WAITOK, &nchash); - ncvhashtbl = hashinit(desiredvnodes/8, M_CACHE, M_WAITOK, &ncvhash); + nchashtbl = + hashinit(desiredvnodes, HASH_LIST, M_CACHE, M_WAITOK, &nchash); + ncvhashtbl = + hashinit(desiredvnodes/8, HASH_LIST, M_CACHE, M_WAITOK, &ncvhash); pool_init(&namecache_pool, sizeof(struct namecache), 0, 0, 0, "ncachepl", 0, pool_page_alloc_nointr, pool_page_free_nointr, M_CACHE); diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c index bd122053739c..25a7da0998dc 100644 --- a/sys/miscfs/fdesc/fdesc_vnops.c +++ b/sys/miscfs/fdesc/fdesc_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: fdesc_vnops.c,v 1.56 2000/08/03 03:41:17 thorpej Exp $ */ +/* $NetBSD: fdesc_vnops.c,v 1.57 2000/11/08 14:28:13 ad Exp $ */ /* * Copyright (c) 1992, 1993 @@ -195,7 +195,7 @@ fdesc_init() if (cdevsw[cttymajor].d_open == cttyopen) break; devctty = makedev(cttymajor, 0); - fdhashtbl = hashinit(NFDCACHE, M_CACHE, M_NOWAIT, &fdhash); + fdhashtbl = hashinit(NFDCACHE, HASH_LIST, M_CACHE, M_NOWAIT, &fdhash); } /* diff --git a/sys/miscfs/nullfs/null_vfsops.c b/sys/miscfs/nullfs/null_vfsops.c index 676a707cee08..95598f1bd31b 100644 --- a/sys/miscfs/nullfs/null_vfsops.c +++ b/sys/miscfs/nullfs/null_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: null_vfsops.c,v 1.27 2000/06/10 18:27:03 assar Exp $ */ +/* $NetBSD: null_vfsops.c,v 1.28 2000/11/08 14:28:13 ad Exp $ */ /* * Copyright (c) 1999 National Aeronautics & Space Administration @@ -176,8 +176,8 @@ nullfs_mount(mp, path, data, ndp, p) nmp->nullm_alloc = layer_node_alloc; /* the default alloc is fine */ nmp->nullm_vnodeop_p = null_vnodeop_p; simple_lock_init(&nmp->nullm_hashlock); - nmp->nullm_node_hashtbl = hashinit(NNULLNODECACHE, M_CACHE, M_WAITOK, - &nmp->nullm_node_hash); + nmp->nullm_node_hashtbl = hashinit(NNULLNODECACHE, HASH_LIST, M_CACHE, + M_WAITOK, &nmp->nullm_node_hash); /* * Fix up null node for root vnode diff --git a/sys/miscfs/overlay/overlay_vfsops.c b/sys/miscfs/overlay/overlay_vfsops.c index aad49336ee6d..6e175bf94f77 100644 --- a/sys/miscfs/overlay/overlay_vfsops.c +++ b/sys/miscfs/overlay/overlay_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: overlay_vfsops.c,v 1.4 2000/06/10 18:27:03 assar Exp $ */ +/* $NetBSD: overlay_vfsops.c,v 1.5 2000/11/08 14:28:14 ad Exp $ */ /* * Copyright (c) 1999, 2000 National Aeronautics & Space Administration @@ -167,8 +167,8 @@ ov_mount(mp, path, data, ndp, p) nmp->ovm_alloc = layer_node_alloc; /* the default alloc is fine */ nmp->ovm_vnodeop_p = overlay_vnodeop_p; simple_lock_init(&nmp->ovm_hashlock); - nmp->ovm_node_hashtbl = hashinit(NOVERLAYNODECACHE, M_CACHE, M_WAITOK, - &nmp->ovm_node_hash); + nmp->ovm_node_hashtbl = hashinit(NOVERLAYNODECACHE, HASH_LIST, M_CACHE, + M_WAITOK, &nmp->ovm_node_hash); /* * Fix up overlay node for root vnode diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c index e76a75a98911..9750477a077c 100644 --- a/sys/miscfs/procfs/procfs_subr.c +++ b/sys/miscfs/procfs/procfs_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_subr.c,v 1.31 2000/03/16 18:08:26 jdolecek Exp $ */ +/* $NetBSD: procfs_subr.c,v 1.32 2000/11/08 14:28:14 ad Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou. All rights reserved. @@ -316,8 +316,8 @@ void procfs_hashinit() { lockinit(&pfs_hashlock, PINOD, "pfs_hashlock", 0, 0); - pfs_hashtbl = hashinit(desiredvnodes / 4, M_UFSMNT, M_WAITOK, - &pfs_ihash); + pfs_hashtbl = hashinit(desiredvnodes / 4, HASH_LIST, M_UFSMNT, + M_WAITOK, &pfs_ihash); simple_lock_init(&pfs_hash_slock); } diff --git a/sys/miscfs/umapfs/umap_vfsops.c b/sys/miscfs/umapfs/umap_vfsops.c index 5bf4092a6ab2..1f54ab7eb8b0 100644 --- a/sys/miscfs/umapfs/umap_vfsops.c +++ b/sys/miscfs/umapfs/umap_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: umap_vfsops.c,v 1.25 2000/06/10 18:27:04 assar Exp $ */ +/* $NetBSD: umap_vfsops.c,v 1.26 2000/11/08 14:28:14 ad Exp $ */ /* * Copyright (c) 1992, 1993 @@ -188,8 +188,8 @@ umapfs_mount(mp, path, data, ndp, p) amp->umapm_alloc = layer_node_alloc; /* the default alloc is fine */ amp->umapm_vnodeop_p = umap_vnodeop_p; simple_lock_init(&->umapm_hashlock); - amp->umapm_node_hashtbl = hashinit(NUMAPNODECACHE, M_CACHE, M_WAITOK, - &->umapm_node_hash); + amp->umapm_node_hashtbl = hashinit(NUMAPNODECACHE, HASH_LIST, M_CACHE, + M_WAITOK, &->umapm_node_hash); /* diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index 73afdc8bffc7..615364796fe8 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $NetBSD: msdosfs_denode.c,v 1.45 2000/06/28 02:49:15 mrg Exp $ */ +/* $NetBSD: msdosfs_denode.c,v 1.46 2000/11/08 14:28:14 ad Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -83,7 +83,8 @@ static void msdosfs_hashrem __P((struct denode *)); void msdosfs_init() { - dehashtbl = hashinit(desiredvnodes/2, M_MSDOSFSMNT, M_WAITOK, &dehash); + dehashtbl = hashinit(desiredvnodes/2, HASH_LIST, M_MSDOSFSMNT, + M_WAITOK, &dehash); simple_lock_init(&msdosfs_ihash_slock); pool_init(&msdosfs_denode_pool, sizeof(struct denode), 0, 0, 0, "msdosnopl", 0, pool_page_alloc_nointr, pool_page_free_nointr, diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index c799b31566a2..7c44c938d4da 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1,4 +1,4 @@ -/* $NetBSD: in_pcb.c,v 1.67 2000/08/25 13:35:05 tron Exp $ */ +/* $NetBSD: in_pcb.c,v 1.68 2000/11/08 14:28:14 ad Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -166,10 +166,10 @@ in_pcbinit(table, bindhashsize, connecthashsize) } CIRCLEQ_INIT(&table->inpt_queue); - table->inpt_bindhashtbl = - hashinit(bindhashsize, M_PCB, M_WAITOK, &table->inpt_bindhash); - table->inpt_connecthashtbl = - hashinit(connecthashsize, M_PCB, M_WAITOK, &table->inpt_connecthash); + table->inpt_bindhashtbl = hashinit(bindhashsize, HASH_LIST, M_PCB, + M_WAITOK, &table->inpt_bindhash); + table->inpt_connecthashtbl = hashinit(connecthashsize, HASH_LIST, + M_PCB, M_WAITOK, &table->inpt_connecthash); table->inpt_lastlow = IPPORT_RESERVEDMAX; table->inpt_lastport = (u_int16_t)anonportmax; } diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 9355fc3733a5..1b25d965cfcf 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.119 2000/10/13 01:50:04 itojun Exp $ */ +/* $NetBSD: ip_input.c,v 1.120 2000/11/08 14:28:15 ad Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -304,8 +304,8 @@ ip_init() ip_id = time.tv_sec & 0xffff; ipintrq.ifq_maxlen = ipqmaxlen; TAILQ_INIT(&in_ifaddr); - in_ifaddrhashtbl = - hashinit(IN_IFADDR_HASH_SIZE, M_IFADDR, M_WAITOK, &in_ifaddrhash); + in_ifaddrhashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IFADDR, + M_WAITOK, &in_ifaddrhash); if (ip_mtudisc != 0) ip_mtudisc_timeout_q = rt_timer_queue_create(ip_mtudisc_timeout); diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index e2def0078a12..67f80d554750 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip_mroute.c,v 1.50 2000/04/19 06:30:55 itojun Exp $ */ +/* $NetBSD: ip_mroute.c,v 1.51 2000/11/08 14:28:15 ad Exp $ */ /* * IP multicast forwarding procedures @@ -413,7 +413,8 @@ ip_mrouter_init(so, m) ip_mrouter = so; - mfchashtbl = hashinit(MFCTBLSIZ, M_MRTABLE, M_WAITOK, &mfchash); + mfchashtbl = + hashinit(MFCTBLSIZ, HASH_LIST, M_MRTABLE, M_WAITOK, &mfchash); bzero((caddr_t)nexpire, sizeof(nexpire)); pim_assert = 0; diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index d65a9158396e..b3feb0eb92a4 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/nfs_node.c @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_node.c,v 1.36 2000/09/19 22:13:01 fvdl Exp $ */ +/* $NetBSD: nfs_node.c,v 1.37 2000/11/08 14:28:15 ad Exp $ */ /* * Copyright (c) 1989, 1993 @@ -77,7 +77,8 @@ void nfs_nhinit() { - nfsnodehashtbl = hashinit(desiredvnodes, M_NFSNODE, M_WAITOK, &nfsnodehash); + nfsnodehashtbl = hashinit(desiredvnodes, HASH_LIST, M_NFSNODE, + M_WAITOK, &nfsnodehash); lockinit(&nfs_hashlock, PINOD, "nfs_hashlock", 0, 0); pool_init(&nfs_node_pool, sizeof(struct nfsnode), 0, 0, 0, "nfsnodepl", diff --git a/sys/nfs/nfs_srvcache.c b/sys/nfs/nfs_srvcache.c index 4cc32ad5755b..f390708c250a 100644 --- a/sys/nfs/nfs_srvcache.c +++ b/sys/nfs/nfs_srvcache.c @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_srvcache.c,v 1.16 2000/03/30 12:51:16 augustss Exp $ */ +/* $NetBSD: nfs_srvcache.c,v 1.17 2000/11/08 14:28:15 ad Exp $ */ /* * Copyright (c) 1989, 1993 @@ -145,7 +145,8 @@ void nfsrv_initcache() { - nfsrvhashtbl = hashinit(desirednfsrvcache, M_NFSD, M_WAITOK, &nfsrvhash); + nfsrvhashtbl = hashinit(desirednfsrvcache, HASH_LIST, M_NFSD, + M_WAITOK, &nfsrvhash); TAILQ_INIT(&nfsrvlruhead); } diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index 6665830f9a66..8ed14a97a01a 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_subs.c,v 1.87 2000/10/24 12:02:04 fvdl Exp $ */ +/* $NetBSD: nfs_subs.c,v 1.88 2000/11/08 14:28:15 ad Exp $ */ /* * Copyright (c) 1989, 1993 @@ -1219,8 +1219,8 @@ nfs_initdircache(vp) np->n_dircachesize = 0; np->n_dblkno = 1; - np->n_dircache = - hashinit(NFS_DIRHASHSIZ, M_NFSDIROFF, M_WAITOK, &nfsdirhashmask); + np->n_dircache = hashinit(NFS_DIRHASHSIZ, HASH_LIST, M_NFSDIROFF, + M_WAITOK, &nfsdirhashmask); TAILQ_INIT(&np->n_dirchain); if (nmp->nm_flag & NFSMNT_XLATECOOKIE) { MALLOC(np->n_dirgens, unsigned *, @@ -1466,7 +1466,8 @@ nfs_init() + nqsrv_clockskew + nqsrv_writeslack; NQLOADNOVRAM(nqnfsstarttime); CIRCLEQ_INIT(&nqtimerhead); - nqfhhashtbl = hashinit(NQLCHSZ, M_NQLEASE, M_WAITOK, &nqfhhash); + nqfhhashtbl = hashinit(NQLCHSZ, HASH_LIST, M_NQLEASE, + M_WAITOK, &nqfhhash); } #endif diff --git a/sys/ntfs/ntfs.h b/sys/ntfs/ntfs.h index 07534b088a4d..e7229b3e2bad 100644 --- a/sys/ntfs/ntfs.h +++ b/sys/ntfs/ntfs.h @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs.h,v 1.9 1999/10/31 19:45:26 jdolecek Exp $ */ +/* $NetBSD: ntfs.h,v 1.10 2000/11/08 14:28:15 ad Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko @@ -303,7 +303,7 @@ MALLOC_DECLARE(M_NTFSNTHASH); #define M_NTFSFNODE M_NTFS #define M_NTFSDIR M_NTFS typedef int (vop_t) __P((void *)); -#define HASHINIT(a, b, c, d) hashinit((a), (b), (c), (d)) +#define HASHINIT(a, b, c, d) hashinit((a), HASH_LIST, (b), (c), (d)) #define bqrelse(bp) brelse(bp) #define VOP__UNLOCK(a, b, c) VOP_UNLOCK((a), (b)) #define VGET(a, b, c) vget((a), (b)) diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index dc4d74055a6c..6c4291dffac5 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_softdep.c,v 1.6 2000/09/19 22:04:09 fvdl Exp $ */ +/* $NetBSD: ffs_softdep.c,v 1.7 2000/11/08 14:28:16 ad Exp $ */ /* * Copyright 1998 Marshall Kirk McKusick. All Rights Reserved. @@ -893,13 +893,14 @@ softdep_initialize() LIST_INIT(&mkdirlisthd); LIST_INIT(&softdep_workitem_pending); max_softdeps = desiredvnodes * 4; - pagedep_hashtbl = hashinit(desiredvnodes / 5, M_PAGEDEP, M_WAITOK, - &pagedep_hash); + pagedep_hashtbl = hashinit(desiredvnodes / 5, HASH_LIST, M_PAGEDEP, + M_WAITOK, &pagedep_hash); sema_init(&pagedep_in_progress, "pagedep", PRIBIO, 0); - inodedep_hashtbl = hashinit(desiredvnodes, M_INODEDEP, M_WAITOK, - &inodedep_hash); + inodedep_hashtbl = hashinit(desiredvnodes, HASH_LIST, M_INODEDEP, + M_WAITOK, &inodedep_hash); sema_init(&inodedep_in_progress, "inodedep", PRIBIO, 0); - newblk_hashtbl = hashinit(64, M_NEWBLK, M_WAITOK, &newblk_hash); + newblk_hashtbl = hashinit(64, HASH_LIST, M_NEWBLK, M_WAITOK, + &newblk_hash); sema_init(&newblk_in_progress, "newblk", PRIBIO, 0); } diff --git a/sys/ufs/ufs/ufs_ihash.c b/sys/ufs/ufs/ufs_ihash.c index 9cf6633b0cf0..7277b0ac599e 100644 --- a/sys/ufs/ufs/ufs_ihash.c +++ b/sys/ufs/ufs/ufs_ihash.c @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_ihash.c,v 1.10 2000/03/16 18:26:49 jdolecek Exp $ */ +/* $NetBSD: ufs_ihash.c,v 1.11 2000/11/08 14:28:16 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991, 1993 @@ -63,7 +63,8 @@ void ufs_ihashinit() { lockinit(&ufs_hashlock, PINOD, "ufs_hashlock", 0, 0); - ihashtbl = hashinit(desiredvnodes, M_UFSMNT, M_WAITOK, &ihash); + ihashtbl = + hashinit(desiredvnodes, HASH_LIST, M_UFSMNT, M_WAITOK, &ihash); simple_lock_init(&ufs_ihash_slock); } diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index a1120357f5d5..bc45f6b9899f 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_quota.c,v 1.19 2000/07/05 17:08:14 jdolecek Exp $ */ +/* $NetBSD: ufs_quota.c,v 1.20 2000/11/08 14:28:16 ad Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993, 1995 @@ -685,7 +685,8 @@ long numdquot, desireddquot = DQUOTINC; void dqinit() { - dqhashtbl = hashinit(desiredvnodes, M_DQUOT, M_WAITOK, &dqhash); + dqhashtbl = + hashinit(desiredvnodes, HASH_LIST, M_DQUOT, M_WAITOK, &dqhash); TAILQ_INIT(&dqfreelist); } diff --git a/sys/uvm/uvm_aobj.c b/sys/uvm/uvm_aobj.c index 504bb7ff2c4c..88a638a9242c 100644 --- a/sys/uvm/uvm_aobj.c +++ b/sys/uvm/uvm_aobj.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_aobj.c,v 1.34 2000/08/02 20:23:23 thorpej Exp $ */ +/* $NetBSD: uvm_aobj.c,v 1.35 2000/11/08 14:28:16 ad Exp $ */ /* * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and @@ -526,7 +526,7 @@ uao_create(size, flags) /* allocate hash table or array depending on object size */ if (UAO_USES_SWHASH(aobj)) { aobj->u_swhash = hashinit(UAO_SWHASH_BUCKETS(aobj), - M_UVMAOBJ, mflags, &aobj->u_swhashmask); + HASH_LIST, M_UVMAOBJ, mflags, &aobj->u_swhashmask); if (aobj->u_swhash == NULL) panic("uao_create: hashinit swhash failed"); } else {