summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2002-08-03 00:55:54 +0000
committeroster <oster@NetBSD.org>2002-08-03 00:55:54 +0000
commit35940367a4c342632748963d5876a77f6a0f3eb5 (patch)
treef824859aac4585f346e52444acb6b54bc42f3106 /sys/dev/raidframe
parent846dbf2b234da1090fa8ddb530a8e2f5a1514220 (diff)
Cleanup configuration and auto-configuration information printing.
Thanks to mrg for the suggestions.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_driver.c22
-rw-r--r--sys/dev/raidframe/rf_layout.c17
2 files changed, 22 insertions, 17 deletions
diff --git a/sys/dev/raidframe/rf_driver.c b/sys/dev/raidframe/rf_driver.c
index 5b276d8f403..a6193206f6b 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.51 2002/08/03 00:38:42 oster Exp $ */
+/* $NetBSD: rf_driver.c,v 1.52 2002/08/03 00:55:54 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.51 2002/08/03 00:38:42 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.52 2002/08/03 00:55:54 oster Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -491,6 +491,24 @@ rf_Configure(raidPtr, cfgPtr, ac)
raidPtr->valid = 1;
+ printf("raid%d: %s\n", raidPtr->raidid,
+ raidPtr->Layout.map->configName);
+ printf("raid%d: Components:", raidPtr->raidid);
+ for (row = 0; row < raidPtr->numRow; row++) {
+ for (col = 0; col < raidPtr->numCol; col++) {
+ printf(" %s", raidPtr->Disks[row][col].devname);
+ if (RF_DEAD_DISK(raidPtr->Disks[row][col].status)) {
+ printf("[**FAILED**]");
+ }
+ }
+ }
+ printf("\n");
+ printf("raid%d: Total Sectors: %lu (%lu MB)\n",
+ raidPtr->raidid,
+ (unsigned long) raidPtr->totalSectors,
+ (unsigned long) (raidPtr->totalSectors / 1024 *
+ (1 << raidPtr->logBytesPerSector) / 1024));
+
return (0);
}
diff --git a/sys/dev/raidframe/rf_layout.c b/sys/dev/raidframe/rf_layout.c
index 10596cb123b..cc8f30a54f5 100644
--- a/sys/dev/raidframe/rf_layout.c
+++ b/sys/dev/raidframe/rf_layout.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_layout.c,v 1.11 2001/11/13 07:11:14 lukem Exp $ */
+/* $NetBSD: rf_layout.c,v 1.12 2002/08/03 00:58:09 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_layout.c,v 1.11 2001/11/13 07:11:14 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_layout.c,v 1.12 2002/08/03 00:58:09 oster Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -451,19 +451,6 @@ rf_ConfigureLayout(
} else {
raidPtr->headSepLimit = rf_GetDefaultHeadSepLimit(raidPtr);
}
-
- printf("RAIDFRAME: Configure (%s): total number of sectors is %lu (%lu MB)\n",
- layoutPtr->map->configName,
- (unsigned long) raidPtr->totalSectors,
- (unsigned long) (raidPtr->totalSectors / 1024 * (1 << raidPtr->logBytesPerSector) / 1024));
- if (raidPtr->headSepLimit >= 0) {
- printf("RAIDFRAME(%s): Using %ld floating recon bufs with head sep limit %ld\n",
- layoutPtr->map->configName, (long) raidPtr->numFloatingReconBufs, (long) raidPtr->headSepLimit);
- } else {
- printf("RAIDFRAME(%s): Using %ld floating recon bufs with no head sep limit\n",
- layoutPtr->map->configName, (long) raidPtr->numFloatingReconBufs);
- }
-
return (0);
}
/* typically there is a 1-1 mapping between stripes and parity stripes.