summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_driver.c
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2002-10-18 02:46:36 +0000
committeroster <oster@NetBSD.org>2002-10-18 02:46:36 +0000
commit2eecfbf4790935d76c82c4a2d46b4e1205969587 (patch)
treea6b8a9b76f2cc1f43ffb7adc7efb066f2e069114 /sys/dev/raidframe/rf_driver.c
parentf525c02fbe9965d7f1cfa388645ed7aef314c48c (diff)
Improve and/or re-arrange a number of locks. While much of the locking is
still a mess, and there are a number of unresolved issues here, this gets us closer to being happier in LOCKDEBUG land.
Diffstat (limited to 'sys/dev/raidframe/rf_driver.c')
-rw-r--r--sys/dev/raidframe/rf_driver.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/raidframe/rf_driver.c b/sys/dev/raidframe/rf_driver.c
index a2fa06f8304..6e4e7165873 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.64 2002/10/04 20:05:14 oster Exp $ */
+/* $NetBSD: rf_driver.c,v 1.65 2002/10/18 02:46:36 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.64 2002/10/04 20:05:14 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.65 2002/10/18 02:46:36 oster Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -711,20 +711,23 @@ rf_FailDisk(
raidPtr->numFailures++;
raidPtr->Disks[frow][fcol].status = rf_ds_failed;
raidPtr->status[frow] = rf_rs_degraded;
- rf_update_component_labels(raidPtr, RF_NORMAL_COMPONENT_UPDATE);
RF_UNLOCK_MUTEX(raidPtr->mutex);
+ rf_update_component_labels(raidPtr, RF_NORMAL_COMPONENT_UPDATE);
/* Close the component, so that it's not "locked" if someone
else want's to use it! */
rf_close_component(raidPtr, raidPtr->raid_cinfo[frow][fcol].ci_vp,
raidPtr->Disks[frow][fcol].auto_configured);
+
+ RF_LOCK_MUTEX(raidPtr->mutex);
raidPtr->raid_cinfo[frow][fcol].ci_vp = NULL;
/* Need to mark the component as not being auto_configured
(in case it was previously). */
raidPtr->Disks[frow][fcol].auto_configured = 0;
+ RF_UNLOCK_MUTEX(raidPtr->mutex);
if (initRecon)
rf_ReconstructFailedDisk(raidPtr, frow, fcol);