summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>1999-03-18 03:02:38 +0000
committeroster <oster@NetBSD.org>1999-03-18 03:02:38 +0000
commitefe288e520f9d947c0a631c3f7fe3df2b18ff6d6 (patch)
treef89a48a383b7c0954a9680709693007ff25d9e5a /sys/dev/raidframe
parentff4754d6e50b886f9d40a1b5d0072058c52d189c (diff)
Correct a component label problem where a RAID 1 set with a
failed component would not configure properly in certain situations.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_disks.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/dev/raidframe/rf_disks.c b/sys/dev/raidframe/rf_disks.c
index af717290dbd..b0ec7121ee3 100644
--- a/sys/dev/raidframe/rf_disks.c
+++ b/sys/dev/raidframe/rf_disks.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_disks.c,v 1.7 1999/03/02 03:18:49 oster Exp $ */
+/* $NetBSD: rf_disks.c,v 1.8 1999/03/18 03:02:38 oster Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -652,7 +652,20 @@ rf_CheckLabels( raidPtr, cfgPtr )
/* Locate the maverick component */
if (mod_count[1] > mod_count[0]) {
mod_number = mod_values[1];
- }
+ } else if (mod_count[1] < mod_count[0]) {
+ mod_number = mod_values[0];
+ } else {
+ /* counts of different modification values
+ are the same. Assume greater value is
+ the correct one, all other things
+ considered */
+ if (mod_values[0] > mod_values[1]) {
+ mod_number = mod_values[0];
+ } else {
+ mod_number = mod_values[1];
+ }
+
+ }
for (r = 0; r < raidPtr->numRow && !too_fatal ; r++) {
for (c = 0; c < raidPtr->numCol; c++) {
ci_label = &raidPtr->raid_cinfo[r][c].ci_label;