Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/sys/dev/raidframe Pull up following revision(s) (requeste...



details:   https://anonhg.NetBSD.org/src/rev/616f0824defa
branches:  netbsd-3
changeset: 577839:616f0824defa
user:      riz <riz%NetBSD.org@localhost>
date:      Wed Feb 15 19:38:52 2006 +0000

description:
Pull up following revision(s) (requested by oster in ticket #1170):
        sys/dev/raidframe/rf_driver.c: revision 1.110
        sys/dev/raidframe/rf_psstatus.c: revision 1.31
        sys/dev/raidframe/rf_psstatus.h: revision 1.13
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:

 sys/dev/raidframe/rf_driver.c   |   8 +++++---
 sys/dev/raidframe/rf_psstatus.c |  18 ++++++++++++------
 sys/dev/raidframe/rf_psstatus.h |   5 +++--
 3 files changed, 20 insertions(+), 11 deletions(-)

diffs (101 lines):

diff -r bf3a268b0247 -r 616f0824defa sys/dev/raidframe/rf_driver.c
--- a/sys/dev/raidframe/rf_driver.c     Wed Feb 15 19:27:53 2006 +0000
+++ b/sys/dev/raidframe/rf_driver.c     Wed Feb 15 19:38:52 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_driver.c,v 1.107.2.1 2005/06/17 13:35:11 tron Exp $ */
+/*     $NetBSD: rf_driver.c,v 1.107.2.2 2006/02/15 19:38:52 riz 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.107.2.1 2005/06/17 13:35:11 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.107.2.2 2006/02/15 19:38:52 riz Exp $");
 
 #include "opt_raid_diagnostic.h"
 
@@ -318,6 +318,7 @@
                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 @@
 
        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 -r bf3a268b0247 -r 616f0824defa sys/dev/raidframe/rf_psstatus.c
--- a/sys/dev/raidframe/rf_psstatus.c   Wed Feb 15 19:27:53 2006 +0000
+++ b/sys/dev/raidframe/rf_psstatus.c   Wed Feb 15 19:38:52 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_psstatus.c,v 1.29 2005/02/27 00:27:45 perry Exp $   */
+/*     $NetBSD: rf_psstatus.c,v 1.29.2.1 2006/02/15 19:38:53 riz 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.29 2005/02/27 00:27:45 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_psstatus.c,v 1.29.2.1 2006/02/15 19:38:53 riz Exp $");
 
 #include <dev/raidframe/raidframevar.h>
 
@@ -74,17 +74,23 @@
 }
 
 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 -r bf3a268b0247 -r 616f0824defa sys/dev/raidframe/rf_psstatus.h
--- a/sys/dev/raidframe/rf_psstatus.h   Wed Feb 15 19:27:53 2006 +0000
+++ b/sys/dev/raidframe/rf_psstatus.h   Wed Feb 15 19:38:52 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_psstatus.h,v 1.11 2005/02/27 00:27:45 perry Exp $   */
+/*     $NetBSD: rf_psstatus.h,v 1.11.2.1 2006/02/15 19:38:53 riz Exp $ */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -122,7 +122,8 @@
 #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 *,



Home | Main Index | Thread Index | Old Index