Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe Cast the RF_DEBUG_RECON net a little wider.



details:   https://anonhg.NetBSD.org/src/rev/4221342dde7c
branches:  trunk
changeset: 536493:4221342dde7c
user:      oster <oster%NetBSD.org@localhost>
date:      Tue Sep 17 03:30:33 2002 +0000

description:
Cast the RF_DEBUG_RECON net a little wider.

diffstat:

 sys/dev/raidframe/rf_copyback.c    |  15 ++++++++++++---
 sys/dev/raidframe/rf_reconmap.c    |   7 +++++--
 sys/dev/raidframe/rf_reconstruct.c |  14 +++++++++-----
 3 files changed, 26 insertions(+), 10 deletions(-)

diffs (155 lines):

diff -r 0be02d256924 -r 4221342dde7c sys/dev/raidframe/rf_copyback.c
--- a/sys/dev/raidframe/rf_copyback.c   Tue Sep 17 03:21:40 2002 +0000
+++ b/sys/dev/raidframe/rf_copyback.c   Tue Sep 17 03:30:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_copyback.c,v 1.19 2001/11/15 09:48:13 lukem Exp $   */
+/*     $NetBSD: rf_copyback.c,v 1.20 2002/09/17 03:30:33 oster Exp $   */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -38,7 +38,7 @@
  ****************************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.19 2001/11/15 09:48:13 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.20 2002/09/17 03:30:33 oster Exp $");
 
 #include <dev/raidframe/raidframevar.h>
 
@@ -251,18 +251,26 @@
        RF_Raid_t *raidPtr = desc->raidPtr;
        RF_RaidAddr_t addr;
        RF_RowCol_t testRow, testCol;
-       int     old_pctg, new_pctg, done;
+#if RF_DEBUG_RECON
+       int     old_pctg, new_pctg;
        struct timeval t, diff;
+#endif
+       int done;
 
+#if RF_DEBUG_RECON
        old_pctg = (-1);
+#endif
        while (1) {
                stripeAddr = desc->stripeAddr;
                desc->raidPtr->copyback_stripes_done = stripeAddr
                        / desc->sectPerStripe;
+#if RF_DEBUG_RECON
                if (rf_prReconSched) {
                        old_pctg = 100 * desc->stripeAddr / raidPtr->totalSectors;
                }
+#endif
                desc->stripeAddr += desc->sectPerStripe;
+#if RF_DEBUG_RECON
                if (rf_prReconSched) {
                        new_pctg = 100 * desc->stripeAddr / raidPtr->totalSectors;
                        if (new_pctg != old_pctg) {
@@ -271,6 +279,7 @@
                                printf("%d %d.%06d\n", new_pctg, (int) diff.tv_sec, (int) diff.tv_usec);
                        }
                }
+#endif
                if (stripeAddr >= raidPtr->totalSectors) {
                        rf_CopybackComplete(desc, 0);
                        return;
diff -r 0be02d256924 -r 4221342dde7c sys/dev/raidframe/rf_reconmap.c
--- a/sys/dev/raidframe/rf_reconmap.c   Tue Sep 17 03:21:40 2002 +0000
+++ b/sys/dev/raidframe/rf_reconmap.c   Tue Sep 17 03:30:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_reconmap.c,v 1.10 2002/09/17 03:11:41 oster Exp $   */
+/*     $NetBSD: rf_reconmap.c,v 1.11 2002/09/17 03:30:33 oster Exp $   */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -34,7 +34,7 @@
  *************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_reconmap.c,v 1.10 2002/09/17 03:11:41 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconmap.c,v 1.11 2002/09/17 03:30:33 oster Exp $");
 
 #include "rf_raid.h"
 #include <sys/time.h>
@@ -381,6 +381,7 @@
 }
 #endif
 
+#if RF_DEBUG_RECON
 void 
 rf_PrintReconSchedule(mapPtr, starttime)
        RF_ReconMap_t *mapPtr;
@@ -398,3 +399,5 @@
                old_pctg = new_pctg;
        }
 }
+#endif
+
diff -r 0be02d256924 -r 4221342dde7c sys/dev/raidframe/rf_reconstruct.c
--- a/sys/dev/raidframe/rf_reconstruct.c        Tue Sep 17 03:21:40 2002 +0000
+++ b/sys/dev/raidframe/rf_reconstruct.c        Tue Sep 17 03:30:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_reconstruct.c,v 1.40 2002/09/17 03:21:41 oster Exp $        */
+/*     $NetBSD: rf_reconstruct.c,v 1.41 2002/09/17 03:30:33 oster Exp $        */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  ************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.40 2002/09/17 03:21:41 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.41 2002/09/17 03:30:33 oster Exp $");
 
 #include <sys/time.h>
 #include <sys/buf.h>
@@ -66,7 +66,7 @@
 
 /* setting these to -1 causes them to be set to their default values if not set by debug options */
 
-#ifdef DEBUG
+#if RF_DEBUG_RECON
 #define Dprintf(s)         if (rf_reconDebug) rf_debug_printf(s,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)
 #define Dprintf1(s,a)         if (rf_reconDebug) rf_debug_printf(s,(void *)((unsigned long)a),NULL,NULL,NULL,NULL,NULL,NULL,NULL)
 #define Dprintf2(s,a,b)       if (rf_reconDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),NULL,NULL,NULL,NULL,NULL,NULL)
@@ -79,7 +79,7 @@
 #define DDprintf1(s,a)         if (rf_reconDebug) rf_debug_printf(s,(void *)((unsigned long)a),NULL,NULL,NULL,NULL,NULL,NULL,NULL)
 #define DDprintf2(s,a,b)       if (rf_reconDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),NULL,NULL,NULL,NULL,NULL,NULL)
 
-#else /* DEBUG */
+#else /* RF_DEBUG_RECON */
 
 #define Dprintf(s) {}
 #define Dprintf1(s,a) {}
@@ -93,7 +93,7 @@
 #define DDprintf1(s,a) {}
 #define DDprintf2(s,a,b) {}
 
-#endif /* DEBUG */
+#endif /* RF_DEBUG_RECON */
 
 
 static RF_FreeList_t *rf_recond_freelist;
@@ -745,9 +745,11 @@
 
                        raidPtr->reconControl[row]->percentComplete = 
                                (raidPtr->reconControl[row]->numRUsComplete * 100 / raidPtr->reconControl[row]->numRUsTotal);
+#if RF_DEBUG_RECON
                        if (rf_prReconSched) {
                                rf_PrintReconSchedule(raidPtr->reconControl[row]->reconMap, &(raidPtr->reconControl[row]->starttime));
                        }
+#endif
                }
 
 
@@ -770,9 +772,11 @@
 
                        (void) ProcessReconEvent(raidPtr, row, event);  /* ignore return code */
                        raidPtr->reconControl[row]->percentComplete = 100 - (rf_UnitsLeftToReconstruct(mapPtr) * 100 / mapPtr->totalRUs);
+#if RF_DEBUG_RECON
                        if (rf_prReconSched) {
                                rf_PrintReconSchedule(raidPtr->reconControl[row]->reconMap, &(raidPtr->reconControl[row]->starttime));
                        }
+#endif
                }
                reconDesc->state = 5;
 



Home | Main Index | Thread Index | Old Index