From ad00b9c9b0703d70223ea91e7cae8da00a83dcf2 Mon Sep 17 00:00:00 2001 From: oster Date: Sun, 21 Dec 2003 15:56:20 +0000 Subject: Since the 5th arg of pool_init() wasn't actually the number of items with which to prime the pool, we now prime each pool using pool_prime(). --- sys/dev/raidframe/rf_callback.c | 6 ++++-- sys/dev/raidframe/rf_psstatus.c | 7 ++++--- sys/dev/raidframe/rf_reconmap.c | 5 +++-- 3 files changed, 11 insertions(+), 7 deletions(-) (limited to 'sys/dev/raidframe') diff --git a/sys/dev/raidframe/rf_callback.c b/sys/dev/raidframe/rf_callback.c index 51a5fb95870..c2f74a64d66 100644 --- a/sys/dev/raidframe/rf_callback.c +++ b/sys/dev/raidframe/rf_callback.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_callback.c,v 1.9 2003/12/21 07:53:59 simonb Exp $ */ +/* $NetBSD: rf_callback.c,v 1.10 2003/12/21 15:56:20 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,7 +34,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: rf_callback.c,v 1.9 2003/12/21 07:53:59 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_callback.c,v 1.10 2003/12/21 15:56:20 oster Exp $"); #include #include @@ -69,6 +69,8 @@ rf_ConfigureCallback(listp) pool_init(&rf_callback_pool, sizeof(RF_CallbackDesc_t), 0, 0, 0, "rf_callbackpl", NULL); pool_sethiwat(&rf_callback_pool, RF_MAX_FREE_CALLBACK); + pool_prime(&rf_callback_pool, RF_CALLBACK_INITIAL); + rc = rf_ShutdownCreate(listp, rf_ShutdownCallback, NULL); if (rc) { rf_print_unable_to_add_shutdown(__FILE__,__LINE__, rc); diff --git a/sys/dev/raidframe/rf_psstatus.c b/sys/dev/raidframe/rf_psstatus.c index 026b93d7bd0..627e7a67a05 100644 --- a/sys/dev/raidframe/rf_psstatus.c +++ b/sys/dev/raidframe/rf_psstatus.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_psstatus.c,v 1.13 2003/12/21 07:53:59 simonb Exp $ */ +/* $NetBSD: rf_psstatus.c,v 1.14 2003/12/21 15:56:20 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,7 +37,7 @@ *****************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_psstatus.c,v 1.13 2003/12/21 07:53:59 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_psstatus.c,v 1.14 2003/12/21 15:56:20 oster Exp $"); #include @@ -100,7 +100,8 @@ rf_ConfigurePSStatus( } pool_sethiwat(&raidPtr->pss_pool, RF_MAX_FREE_PSS); pool_sethiwat(&raidPtr->pss_issued_pool, RF_MAX_FREE_PSS); - + pool_prime(&raidPtr->pss_pool, RF_PSS_INITIAL); + pool_prime(&raidPtr->pss_issued_pool, RF_PSS_INITIAL); return (0); } /***************************************************************************************** diff --git a/sys/dev/raidframe/rf_reconmap.c b/sys/dev/raidframe/rf_reconmap.c index e3cbddbbde8..e0d71bd32b1 100644 --- a/sys/dev/raidframe/rf_reconmap.c +++ b/sys/dev/raidframe/rf_reconmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconmap.c,v 1.16 2003/12/21 07:53:59 simonb Exp $ */ +/* $NetBSD: rf_reconmap.c,v 1.17 2003/12/21 15:56:20 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,7 +34,7 @@ *************************************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_reconmap.c,v 1.16 2003/12/21 07:53:59 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconmap.c,v 1.17 2003/12/21 15:56:20 oster Exp $"); #include "rf_raid.h" #include @@ -111,6 +111,7 @@ rf_MakeReconMap(raidPtr, ru_sectors, disk_sectors, spareUnitsPerDisk) pool_init(&p->elem_pool, sizeof(RF_ReconMapListElem_t), 0, 0, 0, "raidreconpl", NULL); + pool_prime(&p->elem_pool, RF_NUM_RECON_POOL_ELEM); rc = rf_mutex_init(&p->mutex); if (rc) { -- cgit