_rf_create_managed_cond() is now left doing nothing. Convert callers.
Mash DO_RAID_COND in rf_driver.c out of existance. - Nuke (already #if 0'ed) _rf_create_managed_lkmgr_mutex() while we're busy here. simplify DO_INIT in rf_engine.c
This commit is contained in:
parent
2f4066f82e
commit
fc5966383f
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: rf_diskqueue.c,v 1.25 2003/12/29 05:22:16 oster Exp $ */
|
/* $NetBSD: rf_diskqueue.c,v 1.26 2003/12/29 05:48:13 oster Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1995 Carnegie-Mellon University.
|
* Copyright (c) 1995 Carnegie-Mellon University.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -66,7 +66,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.25 2003/12/29 05:22:16 oster Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.26 2003/12/29 05:48:13 oster Exp $");
|
||||||
|
|
||||||
#include <dev/raidframe/raidframevar.h>
|
#include <dev/raidframe/raidframevar.h>
|
||||||
|
|
||||||
@ -191,8 +191,6 @@ rf_ConfigureDiskQueue(
|
|||||||
RF_ShutdownList_t ** listp,
|
RF_ShutdownList_t ** listp,
|
||||||
RF_AllocListElem_t * clList)
|
RF_AllocListElem_t * clList)
|
||||||
{
|
{
|
||||||
int rc;
|
|
||||||
|
|
||||||
diskqueue->col = c;
|
diskqueue->col = c;
|
||||||
diskqueue->qPtr = p;
|
diskqueue->qPtr = p;
|
||||||
diskqueue->qHdr = (p->Create) (sectPerDisk, clList, listp);
|
diskqueue->qHdr = (p->Create) (sectPerDisk, clList, listp);
|
||||||
@ -207,11 +205,7 @@ rf_ConfigureDiskQueue(
|
|||||||
diskqueue->raidPtr = raidPtr;
|
diskqueue->raidPtr = raidPtr;
|
||||||
diskqueue->rf_cinfo = &raidPtr->raid_cinfo[c];
|
diskqueue->rf_cinfo = &raidPtr->raid_cinfo[c];
|
||||||
rf_mutex_init(&diskqueue->mutex);
|
rf_mutex_init(&diskqueue->mutex);
|
||||||
rc = rf_create_managed_cond(listp, &diskqueue->cond);
|
diskqueue->cond = 0;
|
||||||
if (rc) {
|
|
||||||
rf_print_unable_to_init_cond(__FILE__, __LINE__, rc);
|
|
||||||
return (rc);
|
|
||||||
}
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: rf_driver.c,v 1.75 2003/12/29 05:22:16 oster Exp $ */
|
/* $NetBSD: rf_driver.c,v 1.76 2003/12/29 05:48:13 oster Exp $ */
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.75 2003/12/29 05:22:16 oster Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.76 2003/12/29 05:48:13 oster Exp $");
|
||||||
|
|
||||||
#include "opt_raid_diagnostic.h"
|
#include "opt_raid_diagnostic.h"
|
||||||
|
|
||||||
@ -298,15 +298,6 @@ rf_Shutdown(raidPtr)
|
|||||||
rf_mutex_init((_m_)); \
|
rf_mutex_init((_m_)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DO_RAID_COND(_c_) { \
|
|
||||||
rc = rf_create_managed_cond(&raidPtr->shutdownList, (_c_)); \
|
|
||||||
if (rc) { \
|
|
||||||
rf_print_unable_to_init_cond(__FILE__, __LINE__, rc); \
|
|
||||||
DO_RAID_FAIL(); \
|
|
||||||
return(rc); \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
rf_Configure(raidPtr, cfgPtr, ac)
|
rf_Configure(raidPtr, cfgPtr, ac)
|
||||||
RF_Raid_t *raidPtr;
|
RF_Raid_t *raidPtr;
|
||||||
@ -377,15 +368,15 @@ rf_Configure(raidPtr, cfgPtr, ac)
|
|||||||
DO_RAID_INIT_CONFIGURE(rf_ConfigureEngine);
|
DO_RAID_INIT_CONFIGURE(rf_ConfigureEngine);
|
||||||
DO_RAID_INIT_CONFIGURE(rf_ConfigureStripeLocks);
|
DO_RAID_INIT_CONFIGURE(rf_ConfigureStripeLocks);
|
||||||
|
|
||||||
DO_RAID_COND(&raidPtr->outstandingCond);
|
raidPtr->outstandingCond = 0;
|
||||||
|
|
||||||
raidPtr->nAccOutstanding = 0;
|
raidPtr->nAccOutstanding = 0;
|
||||||
raidPtr->waitShutdown = 0;
|
raidPtr->waitShutdown = 0;
|
||||||
|
|
||||||
DO_RAID_MUTEX(&raidPtr->access_suspend_mutex);
|
DO_RAID_MUTEX(&raidPtr->access_suspend_mutex);
|
||||||
DO_RAID_COND(&raidPtr->quiescent_cond);
|
raidPtr->quiescent_cond = 0;
|
||||||
|
|
||||||
DO_RAID_COND(&raidPtr->waitForReconCond);
|
raidPtr->waitForReconCond = 0;
|
||||||
|
|
||||||
DO_RAID_MUTEX(&raidPtr->recon_done_proc_mutex);
|
DO_RAID_MUTEX(&raidPtr->recon_done_proc_mutex);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: rf_engine.c,v 1.26 2003/12/29 05:22:16 oster Exp $ */
|
/* $NetBSD: rf_engine.c,v 1.27 2003/12/29 05:48:13 oster Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1995 Carnegie-Mellon University.
|
* Copyright (c) 1995 Carnegie-Mellon University.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -55,7 +55,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.26 2003/12/29 05:22:16 oster Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.27 2003/12/29 05:48:13 oster Exp $");
|
||||||
|
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
|
|
||||||
@ -72,15 +72,6 @@ static void rf_ShutdownEngine(void *);
|
|||||||
static void DAGExecutionThread(RF_ThreadArg_t arg);
|
static void DAGExecutionThread(RF_ThreadArg_t arg);
|
||||||
static void rf_RaidIOThread(RF_ThreadArg_t arg);
|
static void rf_RaidIOThread(RF_ThreadArg_t arg);
|
||||||
|
|
||||||
#define DO_INIT(_l_,_r_) { \
|
|
||||||
int _rc; \
|
|
||||||
rf_mutex_init(&(_r_)->node_queue_mutex); \
|
|
||||||
_rc = rf_create_managed_cond(_l_,&(_r_)->node_queue_cond); \
|
|
||||||
if (_rc) { \
|
|
||||||
return(_rc); \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
/* synchronization primitives for this file. DO_WAIT should be enclosed in a while loop. */
|
/* synchronization primitives for this file. DO_WAIT should be enclosed in a while loop. */
|
||||||
|
|
||||||
#define DO_LOCK(_r_) \
|
#define DO_LOCK(_r_) \
|
||||||
@ -139,8 +130,8 @@ rf_ConfigureEngine(
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
DO_INIT(listp, raidPtr);
|
rf_mutex_init(&raidPtr->node_queue_mutex);
|
||||||
|
raidPtr->node_queue_cond = 0;
|
||||||
raidPtr->node_queue = NULL;
|
raidPtr->node_queue = NULL;
|
||||||
raidPtr->dags_in_flight = 0;
|
raidPtr->dags_in_flight = 0;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: rf_paritylogging.c,v 1.20 2003/12/29 05:36:19 oster Exp $ */
|
/* $NetBSD: rf_paritylogging.c,v 1.21 2003/12/29 05:48:13 oster Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1995 Carnegie-Mellon University.
|
* Copyright (c) 1995 Carnegie-Mellon University.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -32,7 +32,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: rf_paritylogging.c,v 1.20 2003/12/29 05:36:19 oster Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: rf_paritylogging.c,v 1.21 2003/12/29 05:48:13 oster Exp $");
|
||||||
|
|
||||||
#include "rf_archs.h"
|
#include "rf_archs.h"
|
||||||
|
|
||||||
@ -424,11 +424,7 @@ rf_ConfigureParityLogging(
|
|||||||
}
|
}
|
||||||
/* initialize parityLogDiskQueue */
|
/* initialize parityLogDiskQueue */
|
||||||
rf_mutex_init(&raidPtr->parityLogDiskQueue.mutex);
|
rf_mutex_init(&raidPtr->parityLogDiskQueue.mutex);
|
||||||
rc = rf_create_managed_cond(listp, &raidPtr->parityLogDiskQueue.cond);
|
raidPtr->parityLogDiskQueue.cond = 0;
|
||||||
if (rc) {
|
|
||||||
rf_print_unable_to_init_cond(__FILE__, __LINE__, rc);
|
|
||||||
return (rc);
|
|
||||||
}
|
|
||||||
raidPtr->parityLogDiskQueue.flushQueue = NULL;
|
raidPtr->parityLogDiskQueue.flushQueue = NULL;
|
||||||
raidPtr->parityLogDiskQueue.reintQueue = NULL;
|
raidPtr->parityLogDiskQueue.reintQueue = NULL;
|
||||||
raidPtr->parityLogDiskQueue.bufHead = NULL;
|
raidPtr->parityLogDiskQueue.bufHead = NULL;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: rf_threadstuff.c,v 1.17 2003/12/29 05:36:19 oster Exp $ */
|
/* $NetBSD: rf_threadstuff.c,v 1.18 2003/12/29 05:48:13 oster Exp $ */
|
||||||
/*
|
/*
|
||||||
* rf_threadstuff.c
|
* rf_threadstuff.c
|
||||||
*/
|
*/
|
||||||
@ -30,7 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: rf_threadstuff.c,v 1.17 2003/12/29 05:36:19 oster Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: rf_threadstuff.c,v 1.18 2003/12/29 05:48:13 oster Exp $");
|
||||||
|
|
||||||
#include <dev/raidframe/raidframevar.h>
|
#include <dev/raidframe/raidframevar.h>
|
||||||
|
|
||||||
@ -42,42 +42,6 @@ __KERNEL_RCSID(0, "$NetBSD: rf_threadstuff.c,v 1.17 2003/12/29 05:36:19 oster Ex
|
|||||||
* Shared stuff
|
* Shared stuff
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0
|
|
||||||
int
|
|
||||||
_rf_create_managed_lkmgr_mutex(listp, m, file, line)
|
|
||||||
RF_ShutdownList_t **listp;
|
|
||||||
RF_DECLARE_LKMGR_MUTEX(*m)
|
|
||||||
char *file;
|
|
||||||
int line;
|
|
||||||
{
|
|
||||||
int rc, rc1;
|
|
||||||
|
|
||||||
rc = rf_lkmgr_mutex_init(m);
|
|
||||||
if (rc)
|
|
||||||
return (rc);
|
|
||||||
rc = _rf_ShutdownCreate(listp, mutex_destroyer, (void *) m, file, line);
|
|
||||||
if (rc) {
|
|
||||||
RF_ERRORMSG1("RAIDFRAME: Error %d adding shutdown entry\n", rc);
|
|
||||||
rc1 = rf_lkmgr_mutex_destroy(m);
|
|
||||||
if (rc1) {
|
|
||||||
RF_ERRORMSG1("RAIDFRAME: Error %d destroying mutex\n", rc1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (rc);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
int
|
|
||||||
_rf_create_managed_cond(listp, c, file, line)
|
|
||||||
RF_ShutdownList_t **listp;
|
|
||||||
RF_DECLARE_COND(*c)
|
|
||||||
char *file;
|
|
||||||
int line;
|
|
||||||
{
|
|
||||||
|
|
||||||
c = 0;
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
_rf_init_managed_threadgroup(listp, g, file, line)
|
_rf_init_managed_threadgroup(listp, g, file, line)
|
||||||
RF_ShutdownList_t **listp;
|
RF_ShutdownList_t **listp;
|
||||||
@ -85,12 +49,9 @@ _rf_init_managed_threadgroup(listp, g, file, line)
|
|||||||
char *file;
|
char *file;
|
||||||
int line;
|
int line;
|
||||||
{
|
{
|
||||||
int rc;
|
|
||||||
|
|
||||||
rf_mutex_init(&g->mutex);
|
rf_mutex_init(&g->mutex);
|
||||||
rc = _rf_create_managed_cond(listp, &g->cond, file, line);
|
g->cond = 0;
|
||||||
if (rc)
|
|
||||||
return (rc);
|
|
||||||
g->created = g->running = g->shutdown = 0;
|
g->created = g->running = g->shutdown = 0;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: rf_threadstuff.h,v 1.17 2003/12/29 05:36:19 oster Exp $ */
|
/* $NetBSD: rf_threadstuff.h,v 1.18 2003/12/29 05:48:13 oster Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1995 Carnegie-Mellon University.
|
* Copyright (c) 1995 Carnegie-Mellon University.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -51,7 +51,6 @@
|
|||||||
|
|
||||||
#include <dev/raidframe/raidframevar.h>
|
#include <dev/raidframe/raidframevar.h>
|
||||||
|
|
||||||
#define rf_create_managed_cond(a,b) _rf_create_managed_cond(a,b,__FILE__,__LINE__)
|
|
||||||
#define rf_init_managed_threadgroup(a,b) _rf_init_managed_threadgroup(a,b,__FILE__,__LINE__)
|
#define rf_init_managed_threadgroup(a,b) _rf_init_managed_threadgroup(a,b,__FILE__,__LINE__)
|
||||||
#define rf_init_threadgroup(a) _rf_init_threadgroup(a,__FILE__,__LINE__)
|
#define rf_init_threadgroup(a) _rf_init_threadgroup(a,__FILE__,__LINE__)
|
||||||
#define rf_destroy_threadgroup(a) _rf_destroy_threadgroup(a,__FILE__,__LINE__)
|
#define rf_destroy_threadgroup(a) _rf_destroy_threadgroup(a,__FILE__,__LINE__)
|
||||||
@ -188,9 +187,4 @@ int
|
|||||||
_rf_create_managed_lkmgr_mutex(RF_ShutdownList_t **, struct lock *,
|
_rf_create_managed_lkmgr_mutex(RF_ShutdownList_t **, struct lock *,
|
||||||
char *, int);
|
char *, int);
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
_rf_create_managed_cond(RF_ShutdownList_t ** listp, int *,
|
|
||||||
char *file, int line);
|
|
||||||
|
|
||||||
#endif /* !_RF__RF_THREADSTUFF_H_ */
|
#endif /* !_RF__RF_THREADSTUFF_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user