Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe Correct some RF_ASSERTS() that were missed...



details:   https://anonhg.NetBSD.org/src/rev/8f9cf160b1cd
branches:  trunk
changeset: 569651:8f9cf160b1cd
user:      oster <oster%NetBSD.org@localhost>
date:      Fri Aug 27 15:55:50 2004 +0000

description:
Correct some RF_ASSERTS() that were missed when fixing memory issues
with this code.  Thanks to palle at lyckegaard.dk for pointing them
out.  Addresses PR#26776 (but doesn't use all the suggested fixes).

diffstat:

 sys/dev/raidframe/rf_dagdegrd.c |   6 +++---
 sys/dev/raidframe/rf_dagffwr.c  |  10 +++++-----
 sys/dev/raidframe/rf_raid0.c    |   5 ++---
 3 files changed, 10 insertions(+), 11 deletions(-)

diffs (96 lines):

diff -r 3d99c786fa73 -r 8f9cf160b1cd sys/dev/raidframe/rf_dagdegrd.c
--- a/sys/dev/raidframe/rf_dagdegrd.c   Fri Aug 27 14:35:11 2004 +0000
+++ b/sys/dev/raidframe/rf_dagdegrd.c   Fri Aug 27 15:55:50 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_dagdegrd.c,v 1.21 2004/03/19 15:16:18 oster Exp $   */
+/*     $NetBSD: rf_dagdegrd.c,v 1.22 2004/08/27 15:55:50 oster Exp $   */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_dagdegrd.c,v 1.21 2004/03/19 15:16:18 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_dagdegrd.c,v 1.22 2004/08/27 15:55:50 oster Exp $");
 
 #include <dev/raidframe/raidframevar.h>
 
@@ -525,7 +525,7 @@
        xorNode->antType[0] = rf_trueData;
        tmprrdNode = rrdNodes;
        for (i = 0; i < nRrdNodes; i++) {
-               RF_ASSERT(rrdNode->numSuccedents == 1);
+               RF_ASSERT(tmprrdNode->numSuccedents == 1);
                tmprrdNode->succedents[0] = xorNode;
                xorNode->antecedents[1 + i] = tmprrdNode;
                xorNode->antType[1 + i] = rf_trueData;
diff -r 3d99c786fa73 -r 8f9cf160b1cd sys/dev/raidframe/rf_dagffwr.c
--- a/sys/dev/raidframe/rf_dagffwr.c    Fri Aug 27 14:35:11 2004 +0000
+++ b/sys/dev/raidframe/rf_dagffwr.c    Fri Aug 27 15:55:50 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_dagffwr.c,v 1.27 2004/04/09 23:10:16 oster Exp $    */
+/*     $NetBSD: rf_dagffwr.c,v 1.28 2004/08/27 15:55:50 oster Exp $    */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_dagffwr.c,v 1.27 2004/04/09 23:10:16 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_dagffwr.c,v 1.28 2004/08/27 15:55:50 oster Exp $");
 
 #include <dev/raidframe/raidframevar.h>
 
@@ -409,13 +409,13 @@
                RF_ASSERT(xorNode->numAntecedents == nRodNodes);
                tmpNode = rodNodes;
                for (i = 0; i < nRodNodes; i++) {
-                       RF_ASSERT(tmpNode.numAntecedents == 1);
+                       RF_ASSERT(tmpNode->numAntecedents == 1);
                        blockNode->succedents[i] = tmpNode;
                        tmpNode->antecedents[0] = blockNode;
                        tmpNode->antType[0] = rf_control;
 
                        /* connect the Rod nodes to the Xor node */
-                       RF_ASSERT(tmpNode.numSuccedents == 1);
+                       RF_ASSERT(tmpNode->numSuccedents == 1);
                        tmpNode->succedents[0] = xorNode;
                        xorNode->antecedents[i] = tmpNode;
                        xorNode->antType[i] = rf_trueData;
@@ -1110,7 +1110,7 @@
        RF_ASSERT(commitNode->numSuccedents == (numDataNodes + (nfaults * numParityNodes)));
        tmpwriteDataNode = writeDataNodes;
        for (i = 0; i < numDataNodes; i++) {
-               RF_ASSERT(tmpwriteDataNodes->numAntecedents == 1);
+               RF_ASSERT(tmpwriteDataNode->numAntecedents == 1);
                commitNode->succedents[i] = tmpwriteDataNode;
                tmpwriteDataNode->antecedents[0] = commitNode;
                tmpwriteDataNode->antType[0] = rf_trueData;
diff -r 3d99c786fa73 -r 8f9cf160b1cd sys/dev/raidframe/rf_raid0.c
--- a/sys/dev/raidframe/rf_raid0.c      Fri Aug 27 14:35:11 2004 +0000
+++ b/sys/dev/raidframe/rf_raid0.c      Fri Aug 27 15:55:50 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_raid0.c,v 1.10 2004/01/02 21:41:08 oster Exp $      */
+/*     $NetBSD: rf_raid0.c,v 1.11 2004/08/27 15:55:51 oster Exp $      */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  ***************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_raid0.c,v 1.10 2004/01/02 21:41:08 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_raid0.c,v 1.11 2004/08/27 15:55:51 oster Exp $");
 
 #include <dev/raidframe/raidframevar.h>
 
@@ -71,7 +71,6 @@
        for (i = 0; i < raidPtr->numCol; i++)
                info->stripeIdentifier[i] = i;
 
-       RF_ASSERT(raidPtr->numRow == 1);
        raidPtr->totalSectors = layoutPtr->stripeUnitsPerDisk * raidPtr->numCol * layoutPtr->sectorsPerStripeUnit;
        layoutPtr->numStripe = layoutPtr->stripeUnitsPerDisk;
        layoutPtr->dataSectorsPerStripe = raidPtr->numCol * layoutPtr->sectorsPerStripeUnit;



Home | Main Index | Thread Index | Old Index