Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/raidframe When setting auto-config/rootable bits, on...
details: https://anonhg.NetBSD.org/src/rev/f1b8f4a89a1c
branches: trunk
changeset: 486736:f1b8f4a89a1c
user: oster <oster%NetBSD.org@localhost>
date: Sun May 28 01:03:22 2000 +0000
description:
When setting auto-config/rootable bits, only try to update the
component label if the component is actually alive.
diffstat:
sys/dev/raidframe/rf_netbsdkintf.c | 28 +++++++++++++++++-----------
1 files changed, 17 insertions(+), 11 deletions(-)
diffs (49 lines):
diff -r 753030b749c6 -r f1b8f4a89a1c sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c Sun May 28 00:49:35 2000 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c Sun May 28 01:03:22 2000 +0000
@@ -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 @@
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 @@
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);
Home |
Main Index |
Thread Index |
Old Index