diff options
| author | oster <oster@NetBSD.org> | 2004-03-05 03:22:05 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2004-03-05 03:22:05 +0000 |
| commit | 7bd09b0f2b2b45c52f043c17ee95a8939af2cfe8 (patch) | |
| tree | 14c112120b9edfe2874956e1d5c50a2e01aaa97f /sys/dev/raidframe/rf_dagutils.c | |
| parent | a0413593bce5fbff0a566fca524a2658054ad525 (diff) | |
Introduce RF_DEBUG_DAG and use it to #if-out rf_dagDebug sections.
(i386 GENERIC kernel shrinks by 1.6K)
Diffstat (limited to 'sys/dev/raidframe/rf_dagutils.c')
| -rw-r--r-- | sys/dev/raidframe/rf_dagutils.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/raidframe/rf_dagutils.c b/sys/dev/raidframe/rf_dagutils.c index 0935f55c74f..e6e822cee36 100644 --- a/sys/dev/raidframe/rf_dagutils.c +++ b/sys/dev/raidframe/rf_dagutils.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagutils.c,v 1.30 2004/03/05 02:53:55 oster Exp $ */ +/* $NetBSD: rf_dagutils.c,v 1.31 2004/03/05 03:22:05 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ *****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_dagutils.c,v 1.30 2004/03/05 02:53:55 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_dagutils.c,v 1.31 2004/03/05 03:22:05 oster Exp $"); #include <dev/raidframe/raidframevar.h> @@ -739,12 +739,14 @@ rf_redirect_asm(RF_Raid_t *raidPtr, RF_AccessStripeMap_t *asmap) RF_ASSERT(raidPtr->status == rf_rs_reconstructing); for (pda = asmap->physInfo; pda; pda = pda->next) { if (pda->col == fcol) { +#if RF_DEBUG_DAG if (rf_dagDebug) { if (!rf_CheckRUReconstructed(raidPtr->reconControl->reconMap, pda->startSector)) { RF_PANIC(); } } +#endif /* printf("Remapped data for large write\n"); */ if (ds) { raidPtr->Layout.map->MapSector(raidPtr, pda->raidAddress, @@ -756,11 +758,13 @@ rf_redirect_asm(RF_Raid_t *raidPtr, RF_AccessStripeMap_t *asmap) } for (pda = asmap->parityInfo; pda; pda = pda->next) { if (pda->col == fcol) { +#if RF_DEBUG_DAG if (rf_dagDebug) { if (!rf_CheckRUReconstructed(raidPtr->reconControl->reconMap, pda->startSector)) { RF_PANIC(); } } +#endif } if (ds) { (raidPtr->Layout.map->MapParity) (raidPtr, pda->raidAddress, &pda->col, &pda->startSector, RF_REMAP); @@ -946,9 +950,11 @@ rf_GenerateFailedAccessASMs(RF_Raid_t *raidPtr, RF_AccessStripeMap_t *asmap, * buf if not needed */ RF_MallocAndAdd(rdBuf, rf_RaidAddressToByte(raidPtr, numSect[0] + numSect[1] + numParitySect), (char *), allocList); bufP = rdBuf; +#if RF_DEBUG_DAG if (rf_degDagDebug) printf("Newly allocated buffer (%d bytes) is 0x%lx\n", (int) rf_RaidAddressToByte(raidPtr, numSect[0] + numSect[1] + numParitySect), (unsigned long) bufP); +#endif } /* now walk through the pdas one last time and assign buffer pointers * (ugh!). Again, ignore the parity. also, count nodes to find out @@ -993,6 +999,7 @@ rf_GenerateFailedAccessASMs(RF_Raid_t *raidPtr, RF_AccessStripeMap_t *asmap, RF_ERRORMSG("GenerateFailedAccessASMs: did not find failedPDA in asm list\n"); RF_ASSERT(0); } +#if RF_DEBUG_DAG if (rf_degDagDebug) { if (new_asm_h[0]) { printf("First asm:\n"); @@ -1003,6 +1010,7 @@ rf_GenerateFailedAccessASMs(RF_Raid_t *raidPtr, RF_AccessStripeMap_t *asmap, rf_PrintFullAccessStripeMap(new_asm_h[1], 1); } } +#endif } |
