From: tedu Date: Tue, 23 Dec 2014 01:53:33 +0000 (+0000) Subject: change pool_init allocator to NULL and pass PR_WAITOK in flags as a sign X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=cc677d1d13c45d45d1d4d4902913543ccf1fa8f9;p=openbsd change pool_init allocator to NULL and pass PR_WAITOK in flags as a sign that these don't need to support interrupts --- diff --git a/sys/ufs/ext2fs/ext2fs_vfsops.c b/sys/ufs/ext2fs/ext2fs_vfsops.c index 9056d8b0e11..5ae5aaff413 100644 --- a/sys/ufs/ext2fs/ext2fs_vfsops.c +++ b/sys/ufs/ext2fs/ext2fs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vfsops.c,v 1.83 2014/07/31 19:11:38 pelikan Exp $ */ +/* $OpenBSD: ext2fs_vfsops.c,v 1.84 2014/12/23 01:53:33 tedu Exp $ */ /* $NetBSD: ext2fs_vfsops.c,v 1.1 1997/06/11 09:34:07 bouyer Exp $ */ /* @@ -94,10 +94,10 @@ extern u_long ext2gennumber; int ext2fs_init(struct vfsconf *vfsp) { - pool_init(&ext2fs_inode_pool, sizeof(struct inode), 0, 0, 0, - "ext2inopl", &pool_allocator_nointr); - pool_init(&ext2fs_dinode_pool, sizeof(struct ext2fs_dinode), 0, 0, 0, - "ext2dinopl", &pool_allocator_nointr); + pool_init(&ext2fs_inode_pool, sizeof(struct inode), 0, 0, PR_WAITOK, + "ext2inopl", NULL); + pool_init(&ext2fs_dinode_pool, sizeof(struct ext2fs_dinode), 0, 0, + PR_WAITOK, "ext2dinopl", NULL); return (ufs_init(vfsp)); } diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 747a41082aa..c526868cc34 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_softdep.c,v 1.129 2014/11/18 10:42:15 dlg Exp $ */ +/* $OpenBSD: ffs_softdep.c,v 1.130 2014/12/23 01:53:34 tedu Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -1175,34 +1175,34 @@ softdep_initialize(void) newblk_hashtbl = hashinit(64, M_NEWBLK, M_WAITOK, &newblk_hash); sema_init(&newblk_in_progress, "newblk", PRIBIO, 0); timeout_set(&proc_waiting_timeout, pause_timer, NULL); - pool_init(&pagedep_pool, sizeof(struct pagedep), 0, 0, 0, - "pagedep", &pool_allocator_nointr); - pool_init(&inodedep_pool, sizeof(struct inodedep), 0, 0, 0, - "inodedep", &pool_allocator_nointr); - pool_init(&newblk_pool, sizeof(struct newblk), 0, 0, 0, - "newblk", &pool_allocator_nointr); - pool_init(&bmsafemap_pool, sizeof(struct bmsafemap), 0, 0, 0, - "bmsafemap", &pool_allocator_nointr); - pool_init(&allocdirect_pool, sizeof(struct allocdirect), 0, 0, 0, - "allocdir", &pool_allocator_nointr); - pool_init(&indirdep_pool, sizeof(struct indirdep), 0, 0, 0, - "indirdep", &pool_allocator_nointr); - pool_init(&allocindir_pool, sizeof(struct allocindir), 0, 0, 0, - "allocindir", &pool_allocator_nointr); - pool_init(&freefrag_pool, sizeof(struct freefrag), 0, 0, 0, - "freefrag", &pool_allocator_nointr); - pool_init(&freeblks_pool, sizeof(struct freeblks), 0, 0, 0, - "freeblks", &pool_allocator_nointr); - pool_init(&freefile_pool, sizeof(struct freefile), 0, 0, 0, - "freefile", &pool_allocator_nointr); - pool_init(&diradd_pool, sizeof(struct diradd), 0, 0, 0, - "diradd", &pool_allocator_nointr); - pool_init(&mkdir_pool, sizeof(struct mkdir), 0, 0, 0, - "mkdir", &pool_allocator_nointr); - pool_init(&dirrem_pool, sizeof(struct dirrem), 0, 0, 0, - "dirrem", &pool_allocator_nointr); - pool_init(&newdirblk_pool, sizeof(struct newdirblk), 0, 0, 0, - "newdirblk", &pool_allocator_nointr); + pool_init(&pagedep_pool, sizeof(struct pagedep), 0, 0, PR_WAITOK, + "pagedep", NULL); + pool_init(&inodedep_pool, sizeof(struct inodedep), 0, 0, PR_WAITOK, + "inodedep", NULL); + pool_init(&newblk_pool, sizeof(struct newblk), 0, 0, PR_WAITOK, + "newblk", NULL); + pool_init(&bmsafemap_pool, sizeof(struct bmsafemap), 0, 0, PR_WAITOK, + "bmsafemap", NULL); + pool_init(&allocdirect_pool, sizeof(struct allocdirect), 0, 0, PR_WAITOK, + "allocdir", NULL); + pool_init(&indirdep_pool, sizeof(struct indirdep), 0, 0, PR_WAITOK, + "indirdep", NULL); + pool_init(&allocindir_pool, sizeof(struct allocindir), 0, 0, PR_WAITOK, + "allocindir", NULL); + pool_init(&freefrag_pool, sizeof(struct freefrag), 0, 0, PR_WAITOK, + "freefrag", NULL); + pool_init(&freeblks_pool, sizeof(struct freeblks), 0, 0, PR_WAITOK, + "freeblks", NULL); + pool_init(&freefile_pool, sizeof(struct freefile), 0, 0, PR_WAITOK, + "freefile", NULL); + pool_init(&diradd_pool, sizeof(struct diradd), 0, 0, PR_WAITOK, + "diradd", NULL); + pool_init(&mkdir_pool, sizeof(struct mkdir), 0, 0, PR_WAITOK, + "mkdir", NULL); + pool_init(&dirrem_pool, sizeof(struct dirrem), 0, 0, PR_WAITOK, + "dirrem", NULL); + pool_init(&newdirblk_pool, sizeof(struct newdirblk), 0, 0, PR_WAITOK, + "newdirblk", NULL); } /* diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index d5401a586ad..7674ea2cbb6 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_vfsops.c,v 1.146 2014/12/12 22:58:48 tedu Exp $ */ +/* $OpenBSD: ffs_vfsops.c,v 1.147 2014/12/23 01:53:34 tedu Exp $ */ /* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */ /* @@ -1474,13 +1474,13 @@ ffs_init(struct vfsconf *vfsp) done = 1; - pool_init(&ffs_ino_pool, sizeof(struct inode), 0, 0, 0, "ffsino", - &pool_allocator_nointr); - pool_init(&ffs_dinode1_pool, sizeof(struct ufs1_dinode), 0, 0, 0, - "dino1pl", &pool_allocator_nointr); + pool_init(&ffs_ino_pool, sizeof(struct inode), 0, 0, PR_WAITOK, + "ffsino", NULL); + pool_init(&ffs_dinode1_pool, sizeof(struct ufs1_dinode), 0, 0, + PR_WAITOK, "dino1pl", NULL); #ifdef FFS2 - pool_init(&ffs_dinode2_pool, sizeof(struct ufs2_dinode), 0, 0, 0, - "dino2pl", &pool_allocator_nointr); + pool_init(&ffs_dinode2_pool, sizeof(struct ufs2_dinode), 0, 0, + PR_WAITOK, "dino2pl", NULL); #endif softdep_initialize(); diff --git a/sys/ufs/ufs/ufs_dirhash.c b/sys/ufs/ufs/ufs_dirhash.c index 318b4171f6f..c45a6ab0af0 100644 --- a/sys/ufs/ufs/ufs_dirhash.c +++ b/sys/ufs/ufs/ufs_dirhash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_dirhash.c,v 1.31 2014/12/04 00:01:08 tedu Exp $ */ +/* $OpenBSD: ufs_dirhash.c,v 1.32 2014/12/23 01:53:34 tedu Exp $ */ /* * Copyright (c) 2001, 2002 Ian Dowse. All rights reserved. * @@ -1048,8 +1048,8 @@ ufsdirhash_recycle(int wanted) void ufsdirhash_init(void) { - pool_init(&ufsdirhash_pool, DH_NBLKOFF * sizeof(doff_t), 0, 0, 0, - "dirhash", &pool_allocator_nointr); + pool_init(&ufsdirhash_pool, DH_NBLKOFF * sizeof(doff_t), 0, 0, + PR_WAITOK, "dirhash", NULL); mtx_init(&ufsdirhash_mtx, IPL_NONE); arc4random_buf(&ufsdirhash_key, sizeof(ufsdirhash_key)); TAILQ_INIT(&ufsdirhash_list);