diff options
| author | oster <oster@NetBSD.org> | 2002-09-17 03:30:33 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2002-09-17 03:30:33 +0000 |
| commit | aad979b7ebc0cda3c01ba26ebd1434c73eeb4825 (patch) | |
| tree | 6bf956dde55913dd2409179b8d43050dfc2838b0 /sys/dev/raidframe | |
| parent | 1b1653573f7229dcab539cd2c73f3f2b3cde2334 (diff) | |
Cast the RF_DEBUG_RECON net a little wider.
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_copyback.c | 15 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_reconmap.c | 7 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_reconstruct.c | 14 |
3 files changed, 26 insertions, 10 deletions
diff --git a/sys/dev/raidframe/rf_copyback.c b/sys/dev/raidframe/rf_copyback.c index 4d9909e3367..9bd91e67f29 100644 --- a/sys/dev/raidframe/rf_copyback.c +++ b/sys/dev/raidframe/rf_copyback.c @@ -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_ContinueCopyback(desc) 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 @@ rf_ContinueCopyback(desc) 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 --git a/sys/dev/raidframe/rf_reconmap.c b/sys/dev/raidframe/rf_reconmap.c index 1b14d25f022..bf07ae63a44 100644 --- a/sys/dev/raidframe/rf_reconmap.c +++ b/sys/dev/raidframe/rf_reconmap.c @@ -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 @@ rf_PrintReconMap(raidPtr, mapPtr, frow, fcol) } #endif +#if RF_DEBUG_RECON void rf_PrintReconSchedule(mapPtr, starttime) RF_ReconMap_t *mapPtr; @@ -398,3 +399,5 @@ rf_PrintReconSchedule(mapPtr, starttime) old_pctg = new_pctg; } } +#endif + diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c index 74321310694..08d19fdc3c1 100644 --- a/sys/dev/raidframe/rf_reconstruct.c +++ b/sys/dev/raidframe/rf_reconstruct.c @@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.40 2002/09/17 03:21:41 oster Ex /* 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 @@ __KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.40 2002/09/17 03:21:41 oster Ex #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 @@ __KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.40 2002/09/17 03:21:41 oster Ex #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 @@ rf_ContinueReconstructFailedDisk(reconDesc) 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 @@ rf_ContinueReconstructFailedDisk(reconDesc) (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; |
