Module Name:    src
Committed By:   sborrill
Date:           Sat Mar  6 20:56:16 UTC 2010

Modified Files:
        src/sys/dev/raidframe [netbsd-5]: rf_netbsdkintf.c

Log Message:
Pull up the following revisions(s) (requested by oster in ticket #1324):
        sys/dev/raidframe/rf_netbsdkintf.c:     revision 1.272

Don't merge a good parity map with random stuff in the event that the
first component is missing.  (Since the merging just OR's the maps,
this isn't that big a deal, as it will just over-estimate the
amount of checking that needs to be done.)


To generate a diff of this commit:
cvs rdiff -u -r1.250.4.5 -r1.250.4.6 src/sys/dev/raidframe/rf_netbsdkintf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.250.4.5 src/sys/dev/raidframe/rf_netbsdkintf.c:1.250.4.6
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.250.4.5	Thu Dec 10 22:59:17 2009
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Sat Mar  6 20:56:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.250.4.5 2009/12/10 22:59:17 snj Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.250.4.6 2010/03/06 20:56:15 sborrill Exp $	*/
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -139,7 +139,7 @@
  ***********************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.250.4.5 2009/12/10 22:59:17 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.250.4.6 2010/03/06 20:56:15 sborrill Exp $");
 
 #include <sys/param.h>
 #include <sys/errno.h>
@@ -2587,8 +2587,9 @@
 rf_paritymap_kern_read(RF_Raid_t *raidPtr, struct rf_paritymap_ondisk *map)
 {
 	struct rf_paritymap_ondisk tmp;
-	int c;
+	int c,first;
 
+	first=1;
 	for (c = 0; c < raidPtr->numCol; c++) {
 		/* Skip dead disks. */
 		if (RF_DEAD_DISK(raidPtr->Disks[c].status))
@@ -2597,8 +2598,9 @@
 		    raidPtr->raid_cinfo[c].ci_vp, &tmp,
 		    RF_PARITYMAP_NBYTE,
 		    RF_PARITY_MAP_OFFSET, RF_PARITY_MAP_SIZE);
-		if (c == 0) {
+		if (first) {
 			memcpy(map, &tmp, sizeof(*map));
+			first = 0;
 		} else {
 			rf_paritymap_merge(map, &tmp);
 		}

Reply via email to