diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-04-28 09:28:19 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-04-28 09:28:19 +0000 |
commit | b8c7f7d225a0818af863141be01804bafd685c8f (patch) | |
tree | 80bf9d5ac5f1bc35b15507e8ef5b88e7a17c80ff /sys/ufs | |
parent | ae56ece12b92c7cacfd911b0acbdda5aaf9aa098 (diff) |
zap the newhashinit hack.
Add an extra flag to hashinit telling if it should wait in malloc.
update all calls to hashinit.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 7 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_ihash.c | 4 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_quota.c | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index b286321fc53..8162bc3ddf9 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -890,12 +890,13 @@ softdep_initialize() LIST_INIT(&mkdirlisthd); LIST_INIT(&softdep_workitem_pending); max_softdeps = desiredvnodes * (32 / sizeof(register_t)); - pagedep_hashtbl = hashinit(desiredvnodes / 5, M_PAGEDEP, + pagedep_hashtbl = hashinit(desiredvnodes / 5, M_PAGEDEP, M_WAITOK, &pagedep_hash); sema_init(&pagedep_in_progress, "pagedep", PRIBIO, 0); - inodedep_hashtbl = hashinit(desiredvnodes, M_INODEDEP, &inodedep_hash); + inodedep_hashtbl = hashinit(desiredvnodes, M_INODEDEP, M_WAITOK, + &inodedep_hash); sema_init(&inodedep_in_progress, "inodedep", PRIBIO, 0); - newblk_hashtbl = hashinit(64, M_NEWBLK, &newblk_hash); + newblk_hashtbl = hashinit(64, 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 73abce20529..29239bc6e67 100644 --- a/sys/ufs/ufs/ufs_ihash.c +++ b/sys/ufs/ufs/ufs_ihash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_ihash.c,v 1.6 1998/01/09 20:38:05 csapuntz Exp $ */ +/* $OpenBSD: ufs_ihash.c,v 1.7 1999/04/28 09:28:18 art Exp $ */ /* $NetBSD: ufs_ihash.c,v 1.3 1996/02/09 22:36:04 christos Exp $ */ /* @@ -61,7 +61,7 @@ void ufs_ihashinit() { - ihashtbl = hashinit(desiredvnodes, M_UFSMNT, &ihash); + ihashtbl = hashinit(desiredvnodes, 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 667491eea28..affc8bbfde5 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_quota.c,v 1.6 1997/11/06 05:59:28 csapuntz Exp $ */ +/* $OpenBSD: ufs_quota.c,v 1.7 1999/04/28 09:28:18 art Exp $ */ /* $NetBSD: ufs_quota.c,v 1.8 1996/02/09 22:36:09 christos Exp $ */ /* @@ -688,7 +688,7 @@ void dqinit() { - dqhashtbl = hashinit(desiredvnodes, M_DQUOT, &dqhash); + dqhashtbl = hashinit(desiredvnodes, M_DQUOT, M_WAITOK, &dqhash); TAILQ_INIT(&dqfreelist); } |