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.6 from trunk (requested...
details: https://anonhg.NetBSD.org/src/rev/0036c7922634
branches: netbsd-1-4
changeset: 469518:0036c7922634
user: cgd <cgd%NetBSD.org@localhost>
date: Tue Sep 28 04:46:58 1999 +0000
description:
pull up rev 1.6 from trunk (requested by oster):
Don't panic the system just because there is a problem verifying
the parity.
diffstat:
sys/dev/raidframe/rf_parityscan.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diffs (62 lines):
diff -r 6b7e79c8c4d8 -r 0036c7922634 sys/dev/raidframe/rf_parityscan.c
--- a/sys/dev/raidframe/rf_parityscan.c Tue Sep 28 04:46:28 1999 +0000
+++ b/sys/dev/raidframe/rf_parityscan.c Tue Sep 28 04:46:58 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_parityscan.c,v 1.4.2.1 1999/09/27 05:04:41 cgd Exp $ */
+/* $NetBSD: rf_parityscan.c,v 1.4.2.2 1999/09/28 04:46:58 cgd Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -63,6 +63,7 @@
{
RF_RaidLayout_t *layoutPtr = &raidPtr->Layout;
RF_AccessStripeMapHeader_t *asm_h;
+ int ret_val;
int rc;
RF_PhysDiskAddr_t pda;
RF_SectorNum_t i;
@@ -80,10 +81,14 @@
return (RF_PARITY_COULD_NOT_VERIFY);
}
+ ret_val = 0;
+
pda.startSector = 0;
pda.numSector = raidPtr->Layout.sectorsPerStripeUnit;
+ rc = RF_PARITY_OKAY;
- for (i = 0; i < raidPtr->totalSectors;
+ for (i = 0; i < raidPtr->totalSectors &&
+ rc <= RF_PARITY_CORRECTED;
i += layoutPtr->dataSectorsPerStripe) {
asm_h = rf_MapAccess(raidPtr, i,
layoutPtr->dataSectorsPerStripe,
@@ -97,23 +102,23 @@
break;
case RF_PARITY_BAD:
printf("Parity bad during correction\n");
- RF_PANIC();
+ ret_val = 1;
break;
case RF_PARITY_COULD_NOT_CORRECT:
printf("Could not correct bad parity\n");
- RF_PANIC();
+ ret_val = 1;
break;
case RF_PARITY_COULD_NOT_VERIFY:
printf("Could not verify parity\n");
- RF_PANIC();
+ ret_val = 1;
break;
default:
printf("Bad rc=%d from VerifyParity in RewriteParity\n", rc);
- RF_PANIC();
+ ret_val = 1;
}
rf_FreeAccessStripeMap(asm_h);
}
- return (0);
+ return (ret_val);
}
/*****************************************************************************************
*
Home |
Main Index |
Thread Index |
Old Index