Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/dev/raidframe pull up rev 1.5 from trunk (requested...
details: https://anonhg.NetBSD.org/src/rev/9fe51c945d76
branches: netbsd-1-4
changeset: 469508:9fe51c945d76
user: cgd <cgd%NetBSD.org@localhost>
date: Mon Sep 27 05:04:41 1999 +0000
description:
pull up rev 1.5 from trunk (requested by oster):
Do not allow rebuilding parity on a degraded RAID set. Also, don't
allow parity rewriting on a RAID 0 set, as that makes no sense.
diffstat:
sys/dev/raidframe/rf_parityscan.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 3ddf46c485b3 -r 9fe51c945d76 sys/dev/raidframe/rf_parityscan.c
--- a/sys/dev/raidframe/rf_parityscan.c Mon Sep 27 05:04:10 1999 +0000
+++ b/sys/dev/raidframe/rf_parityscan.c Mon Sep 27 05:04:41 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_parityscan.c,v 1.4 1999/03/14 22:10:46 oster Exp $ */
+/* $NetBSD: rf_parityscan.c,v 1.4.2.1 1999/09/27 05:04:41 cgd Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -67,6 +67,19 @@
RF_PhysDiskAddr_t pda;
RF_SectorNum_t i;
+ if (raidPtr->Layout.map->faultsTolerated == 0) {
+ /* There isn't any parity. Call it "okay." */
+ return (RF_PARITY_OKAY);
+ }
+ if (raidPtr->status[0] != rf_rs_optimal) {
+ /*
+ * We're in degraded mode. Don't try to verify parity now!
+ * XXX: this should be a "we don't want to", not a
+ * "we can't" error.
+ */
+ return (RF_PARITY_COULD_NOT_VERIFY);
+ }
+
pda.startSector = 0;
pda.numSector = raidPtr->Layout.sectorsPerStripeUnit;
Home |
Main Index |
Thread Index |
Old Index