Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/raidframe Remember to close the component if we deci...
details: https://anonhg.NetBSD.org/src/rev/ff0b93a052cc
branches: trunk
changeset: 545659:ff0b93a052cc
user: oster <oster%NetBSD.org@localhost>
date: Sun Apr 13 22:07:11 2003 +0000
description:
Remember to close the component if we decide it's not suitable for use
as a hot spare. Closes PR#20989 by David Brownlee.
diffstat:
sys/dev/raidframe/rf_disks.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r 28f0a5d97b0c -r ff0b93a052cc sys/dev/raidframe/rf_disks.c
--- a/sys/dev/raidframe/rf_disks.c Sun Apr 13 20:54:31 2003 +0000
+++ b/sys/dev/raidframe/rf_disks.c Sun Apr 13 22:07:11 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_disks.c,v 1.41 2003/03/21 23:11:22 dsl Exp $ */
+/* $NetBSD: rf_disks.c,v 1.42 2003/04/13 22:07:11 oster Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -67,7 +67,7 @@
***************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.41 2003/03/21 23:11:22 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.42 2003/04/13 22:07:11 oster Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -1050,6 +1050,7 @@
if (disks[spare_number].status != rf_ds_optimal) {
RF_ERRORMSG1("Warning: spare disk %s failed TUR\n",
sparePtr->component_name);
+ rf_close_component(raidPtr, raidPtr->raid_cinfo[0][raidPtr->numCol+spare_number].ci_vp, 0);
ret=EINVAL;
goto fail;
} else {
@@ -1067,6 +1068,7 @@
bs = 1 << raidPtr->logBytesPerSector;
if (disks[spare_number].blockSize != bs) {
RF_ERRORMSG3("Block size of %d on spare disk %s is not the same as on other disks (%d)\n", disks[spare_number].blockSize, disks[spare_number].devname, bs);
+ rf_close_component(raidPtr, raidPtr->raid_cinfo[0][raidPtr->numCol+spare_number].ci_vp, 0);
ret = EINVAL;
goto fail;
}
@@ -1075,6 +1077,7 @@
disks[spare_number].devname,
disks[spare_number].blockSize,
(long int) raidPtr->sectorsPerDisk);
+ rf_close_component(raidPtr, raidPtr->raid_cinfo[0][raidPtr->numCol+spare_number].ci_vp, 0);
ret = EINVAL;
goto fail;
} else {
Home |
Main Index |
Thread Index |
Old Index