Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/raidframe - mod_counter needs to get incremented mor...
details: https://anonhg.NetBSD.org/src/rev/58e2797048fe
branches: trunk
changeset: 482861:58e2797048fe
user: oster <oster%NetBSD.org@localhost>
date: Thu Feb 24 01:23:05 2000 +0000
description:
- mod_counter needs to get incremented more often.
- use raid_init_component_labels instead of hand-rolling a component_label.
(missed doing this for the rf_used_spare case when updating component labels).
- fix serial number initialization in raid_init_component_labels
diffstat:
sys/dev/raidframe/rf_netbsdkintf.c | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diffs (60 lines):
diff -r 9170ee225e3f -r 58e2797048fe sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c Thu Feb 24 01:22:32 2000 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c Thu Feb 24 01:23:05 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.56 2000/02/23 03:44:03 oster Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.57 2000/02/24 01:23:05 oster Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -2305,6 +2305,15 @@
&clabel);
/* make sure status is noted */
clabel.status = rf_ds_optimal;
+ /* bump the counter */
+ clabel.mod_counter++;
+#if DEBUG
+ if (raidPtr->mod_counter !=
+ clabel.mod_counter) {
+ printf("raid%d: mod_counter for row: %d col: %d not in sync\n", raidPtr->raidid, r, c);
+ }
+#endif
+
raidwrite_component_label(
raidPtr->Disks[r][c].dev,
raidPtr->raid_cinfo[r][c].ci_vp,
@@ -2367,20 +2376,20 @@
}
}
+ /* XXX shouldn't *really* need this... */
raidread_component_label(
raidPtr->Disks[0][sparecol].dev,
raidPtr->raid_cinfo[0][sparecol].ci_vp,
&clabel);
/* make sure status is noted */
- clabel.version = RF_COMPONENT_LABEL_VERSION;
+
+ raid_init_component_label(raidPtr, &clabel);
+
clabel.mod_counter = raidPtr->mod_counter;
- clabel.serial_number = raidPtr->serial_number;
clabel.row = srow;
clabel.column = scol;
- clabel.num_rows = raidPtr->numRow;
- clabel.num_columns = raidPtr->numCol;
- clabel.clean = RF_RAID_DIRTY; /* changed in a bit*/
clabel.status = rf_ds_optimal;
+
raidwrite_component_label(
raidPtr->Disks[0][sparecol].dev,
raidPtr->raid_cinfo[0][sparecol].ci_vp,
@@ -2996,7 +3005,7 @@
{
/* current version number */
clabel->version = RF_COMPONENT_LABEL_VERSION;
- clabel->serial_number = clabel->serial_number;
+ clabel->serial_number = raidPtr->serial_number;
clabel->mod_counter = raidPtr->mod_counter;
clabel->num_rows = raidPtr->numRow;
clabel->num_columns = raidPtr->numCol;
Home |
Main Index |
Thread Index |
Old Index