diff options
| author | oster <oster@NetBSD.org> | 2006-02-14 01:13:33 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2006-02-14 01:13:33 +0000 |
| commit | 99bb7dc022246a5d53d01069aec1086fd86a2c93 (patch) | |
| tree | 47e0d911c5c6a3a76c4c88abc29095016b6fdf49 /sys/dev/raidframe | |
| parent | a4163a9fe4da25977d82d1569eca4d02aeeb77ee (diff) | |
RAIDframe was erroneously re-initializing the Parity Stripe Status
pool each time a new array was configured. This causes grief
with things like 'vmstat -m' by causing it to loop. Make RAIDframe
only initialize PSS bits once.
Pointed out by simonb@. Fix tested by simonb@. Thanks!
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_driver.c | 8 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_psstatus.c | 18 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_psstatus.h | 5 |
3 files changed, 20 insertions, 11 deletions
diff --git a/sys/dev/raidframe/rf_driver.c b/sys/dev/raidframe/rf_driver.c index 3fee97290b7..500eb56e566 100644 --- a/sys/dev/raidframe/rf_driver.c +++ b/sys/dev/raidframe/rf_driver.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_driver.c,v 1.109 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_driver.c,v 1.110 2006/02/14 01:13:33 oster Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -73,7 +73,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.109 2005/12/11 12:23:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.110 2006/02/14 01:13:33 oster Exp $"); #include "opt_raid_diagnostic.h" @@ -318,6 +318,7 @@ rf_Configure(RF_Raid_t *raidPtr, RF_Config_t *cfgPtr, RF_AutoConfig_t *ac) DO_INIT_CONFIGURE(rf_ConfigureReconstruction); DO_INIT_CONFIGURE(rf_ConfigureCopyback); DO_INIT_CONFIGURE(rf_ConfigureDiskQueueSystem); + DO_INIT_CONFIGURE(rf_ConfigurePSStatus); isconfigged = 1; } RF_UNLOCK_LKMGR_MUTEX(configureMutex); @@ -371,7 +372,8 @@ rf_Configure(RF_Raid_t *raidPtr, RF_Config_t *cfgPtr, RF_AutoConfig_t *ac) DO_RAID_INIT_CONFIGURE(rf_ConfigureLayout); - DO_RAID_INIT_CONFIGURE(rf_ConfigurePSStatus); + /* Initialize per-RAID PSS bits */ + rf_InitPSStatus(raidPtr); #if RF_INCLUDE_CHAINDECLUSTER > 0 for (col = 0; col < raidPtr->numCol; col++) { diff --git a/sys/dev/raidframe/rf_psstatus.c b/sys/dev/raidframe/rf_psstatus.c index cbb24fb57ea..137112c4803 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.30 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_psstatus.c,v 1.31 2006/02/14 01:13:33 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,7 +37,7 @@ *****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_psstatus.c,v 1.30 2005/12/11 12:23:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_psstatus.c,v 1.31 2006/02/14 01:13:33 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -74,17 +74,23 @@ rf_ShutdownPSStatus(void *arg) } int -rf_ConfigurePSStatus(RF_ShutdownList_t **listp, RF_Raid_t *raidPtr, - RF_Config_t *cfgPtr) +rf_ConfigurePSStatus(RF_ShutdownList_t **listp) { - raidPtr->pssTableSize = RF_PSS_DEFAULT_TABLESIZE; rf_pool_init(&rf_pools.pss, sizeof(RF_ReconParityStripeStatus_t), "raidpsspl", RF_MIN_FREE_PSS, RF_MAX_FREE_PSS); - rf_ShutdownCreate(listp, rf_ShutdownPSStatus, raidPtr); + rf_ShutdownCreate(listp, rf_ShutdownPSStatus, NULL); return (0); } + +void +rf_InitPSStatus(RF_Raid_t *raidPtr) +{ + raidPtr->pssTableSize = RF_PSS_DEFAULT_TABLESIZE; +} + + /***************************************************************************************** * sets up the pss table * We pre-allocate a bunch of entries to avoid as much as possible having to diff --git a/sys/dev/raidframe/rf_psstatus.h b/sys/dev/raidframe/rf_psstatus.h index cb62196e00e..66f435f43f9 100644 --- a/sys/dev/raidframe/rf_psstatus.h +++ b/sys/dev/raidframe/rf_psstatus.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_psstatus.h,v 1.12 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_psstatus.h,v 1.13 2006/02/14 01:13:33 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -122,7 +122,8 @@ struct RF_PSStatusHeader_s { #define RF_PSS_BUFFERWAIT 0x00000020 /* someone is waiting for a * buffer for this RU */ -int rf_ConfigurePSStatus(RF_ShutdownList_t **, RF_Raid_t *, RF_Config_t *); +int rf_ConfigurePSStatus(RF_ShutdownList_t **); +void rf_InitPSStatus(RF_Raid_t *); RF_PSStatusHeader_t *rf_MakeParityStripeStatusTable(RF_Raid_t *); void rf_FreeParityStripeStatusTable(RF_Raid_t *, RF_PSStatusHeader_t *); RF_ReconParityStripeStatus_t *rf_LookupRUStatus(RF_Raid_t *, RF_PSStatusHeader_t *, |
