diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2016-09-15 02:00:19 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2016-09-15 02:00:19 +0000 |
commit | 9d8236625502d9aebd87ee4b8aa759eb7dd062ae (patch) | |
tree | 608f67fdaff3caceaeb03f449b57d21037a3fe79 /sys/ufs/ffs | |
parent | 2470899b803a7fb5d135883edd5ddd82d6a592c7 (diff) |
all pools have their ipl set via pool_setipl, so fold it into pool_init.
the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.
most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.
the manpage and subr_pool.c bits i did myself.
ok tedu@ jmatthew@
@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 72 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 13 |
2 files changed, 34 insertions, 51 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index ba017b87717..6af3dbbe1c3 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.133 2016/06/19 10:21:56 dlg Exp $ */ +/* $OpenBSD: ffs_softdep.c,v 1.134 2016/09/15 02:00:18 dlg Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -1175,48 +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, PR_WAITOK, - "pagedep", NULL); - pool_setipl(&pagedep_pool, IPL_NONE); - pool_init(&inodedep_pool, sizeof(struct inodedep), 0, 0, PR_WAITOK, - "inodedep", NULL); - pool_setipl(&inodedep_pool, IPL_NONE); - pool_init(&newblk_pool, sizeof(struct newblk), 0, 0, PR_WAITOK, - "newblk", NULL); - pool_setipl(&newblk_pool, IPL_NONE); - pool_init(&bmsafemap_pool, sizeof(struct bmsafemap), 0, 0, PR_WAITOK, - "bmsafemap", NULL); - pool_setipl(&bmsafemap_pool, IPL_NONE); - pool_init(&allocdirect_pool, sizeof(struct allocdirect), 0, 0, PR_WAITOK, - "allocdir", NULL); - pool_setipl(&allocdirect_pool, IPL_NONE); - pool_init(&indirdep_pool, sizeof(struct indirdep), 0, 0, PR_WAITOK, - "indirdep", NULL); - pool_setipl(&indirdep_pool, IPL_NONE); - pool_init(&allocindir_pool, sizeof(struct allocindir), 0, 0, PR_WAITOK, - "allocindir", NULL); - pool_setipl(&allocindir_pool, IPL_NONE); - pool_init(&freefrag_pool, sizeof(struct freefrag), 0, 0, PR_WAITOK, - "freefrag", NULL); - pool_setipl(&freefrag_pool, IPL_NONE); - pool_init(&freeblks_pool, sizeof(struct freeblks), 0, 0, PR_WAITOK, - "freeblks", NULL); - pool_setipl(&freeblks_pool, IPL_NONE); - pool_init(&freefile_pool, sizeof(struct freefile), 0, 0, PR_WAITOK, - "freefile", NULL); - pool_setipl(&freefile_pool, IPL_NONE); - pool_init(&diradd_pool, sizeof(struct diradd), 0, 0, PR_WAITOK, - "diradd", NULL); - pool_setipl(&diradd_pool, IPL_NONE); - pool_init(&mkdir_pool, sizeof(struct mkdir), 0, 0, PR_WAITOK, - "mkdir", NULL); - pool_setipl(&mkdir_pool, IPL_NONE); - pool_init(&dirrem_pool, sizeof(struct dirrem), 0, 0, PR_WAITOK, - "dirrem", NULL); - pool_setipl(&dirrem_pool, IPL_NONE); - pool_init(&newdirblk_pool, sizeof(struct newdirblk), 0, 0, PR_WAITOK, - "newdirblk", NULL); - pool_setipl(&newdirblk_pool, IPL_NONE); + pool_init(&pagedep_pool, sizeof(struct pagedep), 0, IPL_NONE, + PR_WAITOK, "pagedep", NULL); + pool_init(&inodedep_pool, sizeof(struct inodedep), 0, IPL_NONE, + PR_WAITOK, "inodedep", NULL); + pool_init(&newblk_pool, sizeof(struct newblk), 0, IPL_NONE, + PR_WAITOK, "newblk", NULL); + pool_init(&bmsafemap_pool, sizeof(struct bmsafemap), 0, IPL_NONE, + PR_WAITOK, "bmsafemap", NULL); + pool_init(&allocdirect_pool, sizeof(struct allocdirect), 0, IPL_NONE, + PR_WAITOK, "allocdir", NULL); + pool_init(&indirdep_pool, sizeof(struct indirdep), 0, IPL_NONE, + PR_WAITOK, "indirdep", NULL); + pool_init(&allocindir_pool, sizeof(struct allocindir), 0, IPL_NONE, + PR_WAITOK, "allocindir", NULL); + pool_init(&freefrag_pool, sizeof(struct freefrag), 0, IPL_NONE, + PR_WAITOK, "freefrag", NULL); + pool_init(&freeblks_pool, sizeof(struct freeblks), 0, IPL_NONE, + PR_WAITOK, "freeblks", NULL); + pool_init(&freefile_pool, sizeof(struct freefile), 0, IPL_NONE, + PR_WAITOK, "freefile", NULL); + pool_init(&diradd_pool, sizeof(struct diradd), 0, IPL_NONE, + PR_WAITOK, "diradd", NULL); + pool_init(&mkdir_pool, sizeof(struct mkdir), 0, IPL_NONE, + PR_WAITOK, "mkdir", NULL); + pool_init(&dirrem_pool, sizeof(struct dirrem), 0, IPL_NONE, + PR_WAITOK, "dirrem", NULL); + pool_init(&newdirblk_pool, sizeof(struct newdirblk), 0, IPL_NONE, + PR_WAITOK, "newdirblk", NULL); } /* diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 79f9803cd52..99eaf527aac 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.163 2016/09/07 17:30:13 natano Exp $ */ +/* $OpenBSD: ffs_vfsops.c,v 1.164 2016/09/15 02:00:18 dlg Exp $ */ /* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */ /* @@ -1490,16 +1490,13 @@ ffs_init(struct vfsconf *vfsp) done = 1; - pool_init(&ffs_ino_pool, sizeof(struct inode), 0, 0, PR_WAITOK, - "ffsino", NULL); - pool_setipl(&ffs_ino_pool, IPL_NONE); - pool_init(&ffs_dinode1_pool, sizeof(struct ufs1_dinode), 0, 0, + pool_init(&ffs_ino_pool, sizeof(struct inode), 0, IPL_NONE, + PR_WAITOK, "ffsino", NULL); + pool_init(&ffs_dinode1_pool, sizeof(struct ufs1_dinode), 0, IPL_NONE, PR_WAITOK, "dino1pl", NULL); - pool_setipl(&ffs_dinode1_pool, IPL_NONE); #ifdef FFS2 - pool_init(&ffs_dinode2_pool, sizeof(struct ufs2_dinode), 0, 0, + pool_init(&ffs_dinode2_pool, sizeof(struct ufs2_dinode), 0, IPL_NONE, PR_WAITOK, "dino2pl", NULL); - pool_setipl(&ffs_dinode2_pool, IPL_NONE); #endif softdep_initialize(); |