summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2005-01-22 02:22:44 +0000
committeroster <oster@NetBSD.org>2005-01-22 02:22:44 +0000
commit3140947870cac68a78536da3e8e747d58320eb2f (patch)
tree9a7008d08baef235412b99a7377a0b80e574d3c7 /sys/dev/raidframe
parent50d1aadd13bf2e2607a83443ccd3d288c5adb2ce (diff)
Reconstruction Descriptors are only allocated once per reconstruction,
and don't need their own pool or freelist or anything fancier than a malloc/free.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_netbsd.h3
-rw-r--r--sys/dev/raidframe/rf_reconstruct.c12
2 files changed, 6 insertions, 9 deletions
diff --git a/sys/dev/raidframe/rf_netbsd.h b/sys/dev/raidframe/rf_netbsd.h
index ff5f2cb6080..02abed37612 100644
--- a/sys/dev/raidframe/rf_netbsd.h
+++ b/sys/dev/raidframe/rf_netbsd.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsd.h,v 1.20 2004/04/09 23:10:16 oster Exp $ */
+/* $NetBSD: rf_netbsd.h,v 1.21 2005/01/22 02:22:44 oster Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -81,7 +81,6 @@ struct RF_Pools_s {
struct pool pss; /* Parity Stripe Status */
struct pool pss_issued; /* Parity Stripe Status Issued */
struct pool rad; /* Raid Access Descriptors */
- struct pool recond; /* reconstruction descriptors */
struct pool reconbuffer; /* reconstruction buffer (header) pool */
struct pool revent; /* reconstruct events */
struct pool stripelock; /* StripeLock */
diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c
index 7e648e03035..07f6405b7be 100644
--- a/sys/dev/raidframe/rf_reconstruct.c
+++ b/sys/dev/raidframe/rf_reconstruct.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_reconstruct.c,v 1.79 2005/01/18 03:29:51 oster Exp $ */
+/* $NetBSD: rf_reconstruct.c,v 1.80 2005/01/22 02:22:44 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -33,7 +33,7 @@
************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.79 2005/01/18 03:29:51 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.80 2005/01/22 02:22:44 oster Exp $");
#include <sys/time.h>
#include <sys/buf.h>
@@ -143,7 +143,6 @@ struct RF_ReconDoneProc_s {
static void
rf_ShutdownReconstruction(void *ignored)
{
- pool_destroy(&rf_pools.recond);
pool_destroy(&rf_pools.reconbuffer);
}
@@ -151,8 +150,6 @@ int
rf_ConfigureReconstruction(RF_ShutdownList_t **listp)
{
- rf_pool_init(&rf_pools.recond, sizeof(RF_RaidReconDesc_t),
- "rf_recond_pl", RF_MIN_FREE_RECOND, RF_MAX_FREE_RECOND);
rf_pool_init(&rf_pools.reconbuffer, sizeof(RF_ReconBuffer_t),
"rf_reconbuffer_pl", RF_MIN_FREE_RECONBUFFER, RF_MAX_FREE_RECONBUFFER);
rf_ShutdownCreate(listp, rf_ShutdownReconstruction, NULL);
@@ -168,7 +165,8 @@ AllocRaidReconDesc(RF_Raid_t *raidPtr, RF_RowCol_t col,
RF_RaidReconDesc_t *reconDesc;
- reconDesc = pool_get(&rf_pools.recond, PR_WAITOK);
+ RF_Malloc(reconDesc, sizeof(RF_RaidReconDesc_t),
+ (RF_RaidReconDesc_t *));
reconDesc->raidPtr = raidPtr;
reconDesc->col = col;
reconDesc->spareDiskPtr = spareDiskPtr;
@@ -194,7 +192,7 @@ FreeReconDesc(RF_RaidReconDesc_t *reconDesc)
#if (RF_RECON_STATS > 0) || defined(KERNEL)
printf("\n");
#endif /* (RF_RECON_STATS > 0) || KERNEL */
- pool_put(&rf_pools.recond, reconDesc);
+ RF_Free(reconDesc, sizeof(RF_RaidReconDesc_t));
}