diff options
| author | oster <oster@NetBSD.org> | 2000-02-24 01:22:32 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2000-02-24 01:22:32 +0000 |
| commit | fb13ce76fc7019a6e1c34451f5b54b0427c8b1fc (patch) | |
| tree | e81a4835008eb09bc44cb90001ebb27a1d9ade71 /sys/dev/raidframe | |
| parent | 405ae2b76fca91ddbe07c9ac8a7d38a48d283b7e (diff) | |
- make sure we note the parity status in the autoconfig case.
- also, make sure we grab the serial number from the component labels
when we autoconfig.
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_disks.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/dev/raidframe/rf_disks.c b/sys/dev/raidframe/rf_disks.c index 8077121827a..76731cfbf37 100644 --- a/sys/dev/raidframe/rf_disks.c +++ b/sys/dev/raidframe/rf_disks.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_disks.c,v 1.16 2000/02/23 02:01:55 oster Exp $ */ +/* $NetBSD: rf_disks.c,v 1.17 2000/02/24 01:22:32 oster Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -414,6 +414,7 @@ rf_AutoConfigureDisks(raidPtr, cfgPtr, auto_config) int numFailuresThisRow; int force; RF_AutoConfig_t *ac; + int parity_good; #if DEBUG printf("Starting autoconfiguration of RAID set...\n"); @@ -426,6 +427,9 @@ rf_AutoConfigureDisks(raidPtr, cfgPtr, auto_config) disks = raidPtr->Disks; + /* assume the parity will be fine.. */ + parity_good = RF_RAID_CLEAN; + for (r = 0; r < raidPtr->numRow; r++) { numFailuresThisRow = 0; for (c = 0; c < raidPtr->numCol; c++) { @@ -490,6 +494,17 @@ rf_AutoConfigureDisks(raidPtr, cfgPtr, auto_config) bs = diskPtr->blockSize; min_numblks = diskPtr->numBlocks; + + /* this gets done multiple times, but that's + fine -- the serial number will be the same + for all components, guaranteed */ + raidPtr->serial_number = + ac->clabel->serial_number; + + if (ac->clabel->clean != RF_RAID_CLEAN) { + parity_good = RF_RAID_DIRTY; + } + } else { /* Didn't find it!! Component must be dead */ disks[r][c].status = rf_ds_failed; @@ -503,6 +518,8 @@ rf_AutoConfigureDisks(raidPtr, cfgPtr, auto_config) raidPtr->status[r] = rf_rs_degraded; } + /* note the state of the parity, if any */ + raidPtr->parity_good = parity_good; raidPtr->sectorsPerDisk = min_numblks; raidPtr->logBytesPerSector = ffs(bs) - 1; raidPtr->bytesPerSector = bs; |
