summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2000-05-28 01:03:22 +0000
committeroster <oster@NetBSD.org>2000-05-28 01:03:22 +0000
commit228570e110774df4d0b5467f880444e1a41a91b4 (patch)
tree6a088e77d1b581d947f90347fba80696b9538bf9 /sys/dev/raidframe
parent64ad6c882c7ee32c8bb53c7df556778cfd7e65b1 (diff)
When setting auto-config/rootable bits, only try to update the
component label if the component is actually alive.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index 3f90f36c09c..3b19cd6f08c 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.83 2000/05/28 00:48:31 oster Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.84 2000/05/28 01:03:22 oster Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -3126,11 +3126,14 @@ rf_set_autoconfig(raidPtr, new_value)
raidPtr->autoconfigure = new_value;
for(row=0; row<raidPtr->numRow; row++) {
for(column=0; column<raidPtr->numCol; column++) {
- dev = raidPtr->Disks[row][column].dev;
- vp = raidPtr->raid_cinfo[row][column].ci_vp;
- raidread_component_label(dev, vp, &clabel);
- clabel.autoconfigure = new_value;
- raidwrite_component_label(dev, vp, &clabel);
+ if (raidPtr->Disks[row][column].status ==
+ rf_ds_optimal) {
+ dev = raidPtr->Disks[row][column].dev;
+ vp = raidPtr->raid_cinfo[row][column].ci_vp;
+ raidread_component_label(dev, vp, &clabel);
+ clabel.autoconfigure = new_value;
+ raidwrite_component_label(dev, vp, &clabel);
+ }
}
}
return(new_value);
@@ -3149,11 +3152,14 @@ rf_set_rootpartition(raidPtr, new_value)
raidPtr->root_partition = new_value;
for(row=0; row<raidPtr->numRow; row++) {
for(column=0; column<raidPtr->numCol; column++) {
- dev = raidPtr->Disks[row][column].dev;
- vp = raidPtr->raid_cinfo[row][column].ci_vp;
- raidread_component_label(dev, vp, &clabel);
- clabel.root_partition = new_value;
- raidwrite_component_label(dev, vp, &clabel);
+ if (raidPtr->Disks[row][column].status ==
+ rf_ds_optimal) {
+ dev = raidPtr->Disks[row][column].dev;
+ vp = raidPtr->raid_cinfo[row][column].ci_vp;
+ raidread_component_label(dev, vp, &clabel);
+ clabel.root_partition = new_value;
+ raidwrite_component_label(dev, vp, &clabel);
+ }
}
}
return(new_value);