diff options
| author | christos <christos@NetBSD.org> | 2006-08-17 17:11:27 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2006-08-17 17:11:27 +0000 |
| commit | 35ca6c8b5ba6bc67275c6c979024156c105f5f22 (patch) | |
| tree | 72333ccf997ea1b983756f06cc7cc5f10c0a5acd /sys/dev/raidframe | |
| parent | a0cb2a839d4cc85ad0d493e4bcf44043808b5853 (diff) | |
Fix all the -D*DEBUG* code that it was rotting away and did not even compile.
Mostly from Arnaud Lacombe, many thanks!
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_parityloggingdags.c | 22 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_parityloggingdags.h | 31 |
2 files changed, 26 insertions, 27 deletions
diff --git a/sys/dev/raidframe/rf_parityloggingdags.c b/sys/dev/raidframe/rf_parityloggingdags.c index 8e917bbaa7e..b90a0db748c 100644 --- a/sys/dev/raidframe/rf_parityloggingdags.c +++ b/sys/dev/raidframe/rf_parityloggingdags.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_parityloggingdags.c,v 1.15 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_parityloggingdags.c,v 1.16 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_parityloggingdags.c,v 1.15 2005/12/11 12:23:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_parityloggingdags.c,v 1.16 2006/08/17 17:11:28 christos Exp $"); #include "rf_archs.h" #include "opt_raid_diagnostic.h" @@ -323,13 +323,13 @@ rf_CommonCreateParityLoggingSmallWriteDAG( void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, - RF_RedFuncs_t * pfuncs, - RF_RedFuncs_t * qfuncs) + const RF_RedFuncs_t * pfuncs, + const RF_RedFuncs_t * qfuncs) { RF_DagNode_t *xorNodes, *blockNode, *unblockNode, *nodes; RF_DagNode_t *readDataNodes, *readParityNodes; RF_DagNode_t *writeDataNodes, *lpuNodes; - RF_DagNode_t *unlockDataNodes = NULL, *termNode; + RF_DagNode_t *termNode; RF_PhysDiskAddr_t *pda = asmap->physInfo; int numDataNodes = asmap->numStripeUnitsAccessed; int numParityNodes = (asmap->parityInfo->next) ? 2 : 1; @@ -337,7 +337,7 @@ rf_CommonCreateParityLoggingSmallWriteDAG( RF_ReconUnitNum_t which_ru; int (*func) (RF_DagNode_t * node), (*undoFunc) (RF_DagNode_t * node); int (*qfunc) (RF_DagNode_t * node); - char *name, *qname; + const char *name, *qname; RF_StripeNum_t parityStripeID = rf_RaidAddressToParityStripeID(&(raidPtr->Layout), asmap->raidAddress, &which_ru); #ifdef RAID_DIAGNOSTIC long nfaults = qfuncs ? 2 : 1; @@ -406,8 +406,7 @@ rf_CommonCreateParityLoggingSmallWriteDAG( RF_ASSERT(pda != NULL); readDataNodes[i].params[0].p = pda; /* physical disk addr * desc */ - readDataNodes[i].params[1].p = rf_AllocBuffer(raidPtr, dag_h, pda, allocList); /* buffer to hold old - * data */ + readDataNodes[i].params[1].p = rf_AllocBuffer(raidPtr, dag_h, pda->numSector << raidPtr->logBytesPerSector); /* buffer to hold old data */ readDataNodes[i].params[2].v = parityStripeID; readDataNodes[i].params[3].v = RF_CREATE_PARAM3(RF_IO_NORMAL_PRIORITY, which_ru); pda = pda->next; @@ -422,8 +421,7 @@ rf_CommonCreateParityLoggingSmallWriteDAG( RF_ASSERT(pda != NULL); rf_InitNode(&readParityNodes[i], rf_wait, RF_FALSE, rf_DiskReadFunc, rf_DiskReadUndoFunc, rf_GenericWakeupFunc, nNodes, 1, 4, 0, dag_h, "Rop", allocList); readParityNodes[i].params[0].p = pda; - readParityNodes[i].params[1].p = rf_AllocBuffer(raidPtr, dag_h, pda, allocList); /* buffer to hold old - * parity */ + readParityNodes[i].params[1].p = rf_AllocBuffer(raidPtr, dag_h, pda->numSector << raidPtr->logBytesPerSector); /* buffer to hold old parity */ readParityNodes[i].params[2].v = parityStripeID; readParityNodes[i].params[3].v = RF_CREATE_PARAM3(RF_IO_NORMAL_PRIORITY, which_ru); readParityNodes[i].propList[0] = NULL; @@ -628,8 +626,8 @@ rf_CreateParityLoggingSmallWriteDAG( void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, - RF_RedFuncs_t * pfuncs, - RF_RedFuncs_t * qfuncs) + const RF_RedFuncs_t * pfuncs, + const RF_RedFuncs_t * qfuncs) { dag_h->creator = "ParityLoggingSmallWriteDAG"; rf_CommonCreateParityLoggingSmallWriteDAG(raidPtr, asmap, dag_h, bp, flags, allocList, &rf_xorFuncs, NULL); diff --git a/sys/dev/raidframe/rf_parityloggingdags.h b/sys/dev/raidframe/rf_parityloggingdags.h index 412465acb17..7e8bc485565 100644 --- a/sys/dev/raidframe/rf_parityloggingdags.h +++ b/sys/dev/raidframe/rf_parityloggingdags.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_parityloggingdags.h,v 1.5 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_parityloggingdags.h,v 1.6 2006/08/17 17:11:28 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -36,23 +36,24 @@ #define _RF__RF_PARITYLOGGINGDAGS_H_ /* routines that create DAGs */ -void -rf_CommonCreateParityLoggingLargeWriteDAG(RF_Raid_t * raidPtr, +void rf_CommonCreateParityLoggingLargeWriteDAG(RF_Raid_t * raidPtr, RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, int nfaults, int (*redFunc) (RF_DagNode_t *)); - void rf_CommonCreateParityLoggingSmallWriteDAG(RF_Raid_t * raidPtr, - RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, - void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, - RF_RedFuncs_t * pfuncs, RF_RedFuncs_t * qfuncs); - void rf_CreateParityLoggingLargeWriteDAG(RF_Raid_t * raidPtr, - RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, - void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, - int nfaults, int (*redFunc) (RF_DagNode_t *)); - void rf_CreateParityLoggingSmallWriteDAG(RF_Raid_t * raidPtr, - RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, - void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, - RF_RedFuncs_t * pfuncs, RF_RedFuncs_t * qfuncs); +void rf_CommonCreateParityLoggingSmallWriteDAG(RF_Raid_t * raidPtr, + RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, + void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, + const RF_RedFuncs_t * pfuncs, const RF_RedFuncs_t * qfuncs); + +void rf_CreateParityLoggingLargeWriteDAG(RF_Raid_t * raidPtr, + RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, + void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, + int nfaults, int (*redFunc) (RF_DagNode_t *)); + +void rf_CreateParityLoggingSmallWriteDAG(RF_Raid_t * raidPtr, + RF_AccessStripeMap_t * asmap, RF_DagHeader_t * dag_h, + void *bp, RF_RaidAccessFlags_t flags, RF_AllocListElem_t * allocList, + const RF_RedFuncs_t * pfuncs, const RF_RedFuncs_t * qfuncs); #endif /* !_RF__RF_PARITYLOGGINGDAGS_H_ */ |
