Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe Protect rf_PrintDAGList() in a few more pl...



details:   https://anonhg.NetBSD.org/src/rev/aa4cba98fe71
branches:  trunk
changeset: 536114:aa4cba98fe71
user:      oster <oster%NetBSD.org@localhost>
date:      Sat Sep 07 23:11:46 2002 +0000

description:
Protect rf_PrintDAGList() in a few more places.  Thanks to Monroe Williams
on current-users for the patch.

diffstat:

 sys/dev/raidframe/rf_evenodd.c          |  10 ++++++++--
 sys/dev/raidframe/rf_paritylogDiskMgr.c |   6 ++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diffs (86 lines):

diff -r fabfd37da65c -r aa4cba98fe71 sys/dev/raidframe/rf_evenodd.c
--- a/sys/dev/raidframe/rf_evenodd.c    Sat Sep 07 22:58:04 2002 +0000
+++ b/sys/dev/raidframe/rf_evenodd.c    Sat Sep 07 23:11:46 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_evenodd.c,v 1.7 2001/11/13 07:11:14 lukem Exp $     */
+/*     $NetBSD: rf_evenodd.c,v 1.8 2002/09/07 23:11:46 oster Exp $     */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  ****************************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_evenodd.c,v 1.7 2001/11/13 07:11:14 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_evenodd.c,v 1.8 2002/09/07 23:11:46 oster Exp $");
 
 #include "rf_archs.h"
 
@@ -433,10 +433,12 @@
        memset((char *) &tracerec, 0, sizeof(tracerec));
        rd_dag_h->tracerec = &tracerec;
 
+#if RF_DEBUG_VALIDATE_DAG
        if (rf_verifyParityDebug) {
                printf("Parity verify read dag:\n");
                rf_PrintDAGList(rd_dag_h);
        }
+#endif
        RF_LOCK_MUTEX(mcpair->mutex);
        mcpair->flag = 0;
        rf_DispatchDAG(rd_dag_h, (void (*) (void *)) rf_MCPairWakeupFunc,
@@ -493,10 +495,12 @@
                wrBlock->succedents[0]->params[3].v = RF_CREATE_PARAM3(RF_IO_NORMAL_PRIORITY, 0, 0, which_ru);
                memset((char *) &tracerec, 0, sizeof(tracerec));
                wr_dag_h->tracerec = &tracerec;
+#if RF_DEBUG_VALIDATE_DAG
                if (rf_verifyParityDebug) {
                        printf("Parity verify write dag:\n");
                        rf_PrintDAGList(wr_dag_h);
                }
+#endif
                RF_LOCK_MUTEX(mcpair->mutex);
                mcpair->flag = 0;
                rf_DispatchDAG(wr_dag_h, (void (*) (void *)) rf_MCPairWakeupFunc,
@@ -522,10 +526,12 @@
                wrBlock->succedents[0]->params[3].v = RF_CREATE_PARAM3(RF_IO_NORMAL_PRIORITY, 0, 0, which_ru);
                memset((char *) &tracerec, 0, sizeof(tracerec));
                wr_dag_h->tracerec = &tracerec;
+#if RF_DEBUG_VALIDATE_DAG
                if (rf_verifyParityDebug) {
                        printf("Dag of write new second redundant information in parity verify :\n");
                        rf_PrintDAGList(wr_dag_h);
                }
+#endif
                RF_LOCK_MUTEX(mcpair->mutex);
                mcpair->flag = 0;
                rf_DispatchDAG(wr_dag_h, (void (*) (void *)) rf_MCPairWakeupFunc,
diff -r fabfd37da65c -r aa4cba98fe71 sys/dev/raidframe/rf_paritylogDiskMgr.c
--- a/sys/dev/raidframe/rf_paritylogDiskMgr.c   Sat Sep 07 22:58:04 2002 +0000
+++ b/sys/dev/raidframe/rf_paritylogDiskMgr.c   Sat Sep 07 23:11:46 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_paritylogDiskMgr.c,v 1.13 2001/11/13 07:11:15 lukem Exp $   */
+/*     $NetBSD: rf_paritylogDiskMgr.c,v 1.14 2002/09/07 23:11:46 oster Exp $   */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_paritylogDiskMgr.c,v 1.13 2001/11/13 07:11:15 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_paritylogDiskMgr.c,v 1.14 2002/09/07 23:11:46 oster Exp $");
 
 #include "rf_archs.h"
 
@@ -262,8 +262,10 @@
        prd_rdNode->params[2].v = 0;
        prd_rdNode->params[3].v = RF_CREATE_PARAM3(RF_IO_NORMAL_PRIORITY, 
                                                   0, 0, 0);
+#if RF_DEBUG_VALIDATE_DAG
        if (rf_validateDAGDebug)
                rf_ValidateDAG(*prd_dag_h);
+#endif
        /* launch region parity read dag */
        rf_DispatchDAG(*prd_dag_h, (void (*) (void *)) rf_MCPairWakeupFunc,
            (void *) prd_mcpair);



Home | Main Index | Thread Index | Old Index