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.
This commit is contained in:
parent
1c15941926
commit
9f560505d4
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user