Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/raidframe Allow re-writing parity on a RAID 0 to tri...



details:   https://anonhg.NetBSD.org/src/rev/7ff069b50196
branches:  trunk
changeset: 471676:7ff069b50196
user:      oster <oster%NetBSD.org@localhost>
date:      Wed Apr 07 14:17:10 1999 +0000

description:
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:

 sys/dev/raidframe/rf_netbsdkintf.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r f79f68b96b52 -r 7ff069b50196 sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c        Wed Apr 07 13:09:55 1999 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c        Wed Apr 07 14:17:10 1999 +0000
@@ -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 @@
                /* 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]);



Home | Main Index | Thread Index | Old Index