diff options
| author | oster <oster@NetBSD.org> | 1999-04-07 14:17:10 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 1999-04-07 14:17:10 +0000 |
| commit | 9f560505d438c20eec58f3b1d4b9636030123e7f (patch) | |
| tree | c98ab2313ddc4dfc41c3ce98304167a12d7fcc4b /sys/dev/raidframe | |
| parent | 1c15941926442b5c785abc7034a04b0df6f117c2 (diff) | |
Allow re-writing parity on a RAID 0 to trivially succeed, and to set the
clean bit. This is somewhat bogus as RAID 0 does not have any parity,
but is a slightly cleaner than other solutions, and makes the handling
of clean bits for RAID 0 consistent with the handling of clean bits at
other RAID levels.
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index f9ac4a81c69..e19e8ec5392 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.16 1999/03/27 01:26:37 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.17 1999/04/07 14:17:10 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -966,8 +966,12 @@ raidioctl(dev, cmd, data, flag, p) /* initialize all parity */ case RAIDFRAME_REWRITEPARITY: - if (raidPtrs[unit]->Layout.map->faultsTolerated == 0) - return (EINVAL); + if (raidPtrs[unit]->Layout.map->faultsTolerated == 0) { + /* Parity for RAID 0 is trivially correct */ + raidPtrs[unit]->parity_good = RF_RAID_CLEAN; + return(0); + } + /* borrow the thread of the requesting process */ raidPtrs[unit]->proc = p; /* Blah... :-p GO */ retcode = rf_RewriteParity(raidPtrs[unit]); |
