summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2014-03-23 09:30:59 +0000
committerchristos <christos@NetBSD.org>2014-03-23 09:30:59 +0000
commitba1be2a817f12d30bb3f2e313ea6fafc88922076 (patch)
tree248619bb0a366de67140a75ea1a809a70759a8e7 /sys/dev/raidframe
parent8b8399e8aaa9d3609562fb2603736aea361b7571 (diff)
fix unused
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_decluster.c12
-rw-r--r--sys/dev/raidframe/rf_declusterPQ.c17
-rw-r--r--sys/dev/raidframe/rf_evenodd.c9
-rw-r--r--sys/dev/raidframe/rf_evenodd_dagfuncs.c15
-rw-r--r--sys/dev/raidframe/rf_parityloggingdags.c15
5 files changed, 23 insertions, 45 deletions
diff --git a/sys/dev/raidframe/rf_decluster.c b/sys/dev/raidframe/rf_decluster.c
index ec9cc02c433..3f90534f566 100644
--- a/sys/dev/raidframe/rf_decluster.c
+++ b/sys/dev/raidframe/rf_decluster.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_decluster.c,v 1.23 2011/08/31 18:31:02 plunky Exp $ */
+/* $NetBSD: rf_decluster.c,v 1.24 2014/03/23 09:30:59 christos Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -48,7 +48,7 @@
*--------------------------------------------------------------------*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_decluster.c,v 1.23 2011/08/31 18:31:02 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_decluster.c,v 1.24 2014/03/23 09:30:59 christos Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -382,7 +382,7 @@ rf_MapParityDeclustered(RF_Raid_t *raidPtr, RF_RaidAddr_t raidSector,
RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo;
RF_StripeNum_t SUID = raidSector / layoutPtr->sectorsPerStripeUnit;
RF_StripeNum_t FullTableID, FullTableOffset, TableID, TableOffset;
- RF_StripeNum_t BlockID, BlockOffset, RepIndex;
+ RF_StripeNum_t BlockID, RepIndex;
RF_StripeCount_t sus_per_fulltable = info->SUsPerFullTable;
RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
RF_StripeNum_t base_suid = 0, outSU, SpareRegion = 0, SpareSpace = 0;
@@ -404,8 +404,6 @@ rf_MapParityDeclustered(RF_Raid_t *raidPtr, RF_RaidAddr_t raidSector,
/* BlockID = (TableOffset / info->PUsPerBlock) %
* info->BlocksPerTable; */
BlockID = TableOffset / info->PUsPerBlock;
- /* BlockOffset = TableOffset % info->PUsPerBlock; */
- BlockOffset = TableOffset - BlockID * info->PUsPerBlock;
BlockID %= info->BlocksPerTable;
/* the parity block is in the position indicated by RepIndex */
@@ -445,12 +443,10 @@ rf_IdentifyStripeDeclustered(RF_Raid_t *raidPtr, RF_RaidAddr_t addr,
RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
RF_StripeNum_t base_suid = 0;
RF_StripeNum_t SUID = rf_RaidAddressToStripeUnitID(layoutPtr, addr);
- RF_StripeNum_t stripeID, FullTableID;
+ RF_StripeNum_t stripeID;
int tableOffset;
rf_decluster_adjust_params(layoutPtr, &SUID, &sus_per_fulltable, &fulltable_depth, &base_suid);
- FullTableID = SUID / sus_per_fulltable; /* fulltable ID within array
- * (across rows) */
stripeID = rf_StripeUnitIDToStripeID(layoutPtr, SUID); /* find stripe offset
* into array */
tableOffset = (stripeID % info->BlocksPerTable); /* find offset into
diff --git a/sys/dev/raidframe/rf_declusterPQ.c b/sys/dev/raidframe/rf_declusterPQ.c
index 348936e6f26..316b805932b 100644
--- a/sys/dev/raidframe/rf_declusterPQ.c
+++ b/sys/dev/raidframe/rf_declusterPQ.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_declusterPQ.c,v 1.15 2006/11/16 01:33:23 christos Exp $ */
+/* $NetBSD: rf_declusterPQ.c,v 1.16 2014/03/23 09:30:59 christos Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -35,7 +35,7 @@
*--------------------------------------------------*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_declusterPQ.c,v 1.15 2006/11/16 01:33:23 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_declusterPQ.c,v 1.16 2014/03/23 09:30:59 christos Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -56,7 +56,7 @@ rf_ConfigureDeclusteredPQ(RF_ShutdownList_t **listp, RF_Raid_t *raidPtr,
RF_Config_t *cfgPtr)
{
RF_RaidLayout_t *layoutPtr = &(raidPtr->Layout);
- int b, v, k, r, lambda; /* block design params */
+ int b, v, k, r; /* block design params */
int i, j, l;
int *first_avail_slot;
int complete_FT_count, SUID;
@@ -78,7 +78,6 @@ rf_ConfigureDeclusteredPQ(RF_ShutdownList_t **listp, RF_Raid_t *raidPtr,
cfgBuf += sizeof(int);
r = *((int *) cfgBuf);
cfgBuf += sizeof(int);
- lambda = *((int *) cfgBuf);
cfgBuf += sizeof(int);
raidPtr->noRotate = *((int *) cfgBuf);
cfgBuf += sizeof(int);
@@ -350,7 +349,7 @@ rf_MapParityDeclusteredPQ(RF_Raid_t *raidPtr, RF_RaidAddr_t raidSector,
RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo;
RF_StripeNum_t SUID = raidSector / layoutPtr->sectorsPerStripeUnit;
RF_StripeNum_t FullTableID, FullTableOffset, TableID, TableOffset;
- RF_StripeNum_t BlockID, BlockOffset, RepIndex;
+ RF_StripeNum_t BlockID, RepIndex;
RF_StripeCount_t sus_per_fulltable = info->SUsPerFullTable;
RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
RF_StripeNum_t base_suid = 0, outSU, SpareRegion, SpareSpace = 0;
@@ -370,7 +369,6 @@ rf_MapParityDeclusteredPQ(RF_Raid_t *raidPtr, RF_RaidAddr_t raidSector,
TableID = FullTableOffset / info->SUsPerTable;
TableOffset = FullTableOffset - TableID * info->SUsPerTable;
BlockID = TableOffset / info->PUsPerBlock;
- BlockOffset = TableOffset - BlockID * info->PUsPerBlock;
BlockID %= info->BlocksPerTable;
/* the parity block is in the position indicated by RepIndex */
@@ -401,7 +399,7 @@ rf_MapQDeclusteredPQ(RF_Raid_t *raidPtr, RF_RaidAddr_t raidSector,
RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo;
RF_StripeNum_t SUID = raidSector / layoutPtr->sectorsPerStripeUnit;
RF_StripeNum_t FullTableID, FullTableOffset, TableID, TableOffset;
- RF_StripeNum_t BlockID, BlockOffset, RepIndex, RepIndexQ;
+ RF_StripeNum_t BlockID, RepIndex, RepIndexQ;
RF_StripeCount_t sus_per_fulltable = info->SUsPerFullTable;
RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
RF_StripeNum_t base_suid = 0, outSU, SpareRegion, SpareSpace = 0;
@@ -421,7 +419,6 @@ rf_MapQDeclusteredPQ(RF_Raid_t *raidPtr, RF_RaidAddr_t raidSector,
TableID = FullTableOffset / info->SUsPerTable;
TableOffset = FullTableOffset - TableID * info->SUsPerTable;
BlockID = TableOffset / info->PUsPerBlock;
- BlockOffset = TableOffset - BlockID * info->PUsPerBlock;
BlockID %= info->BlocksPerTable;
/* the q block is in the position indicated by RepIndex */
@@ -456,12 +453,10 @@ rf_IdentifyStripeDeclusteredPQ(RF_Raid_t *raidPtr, RF_RaidAddr_t addr,
RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
RF_StripeNum_t base_suid = 0;
RF_StripeNum_t SUID = rf_RaidAddressToStripeUnitID(layoutPtr, addr);
- RF_StripeNum_t stripeID, FullTableID;
+ RF_StripeNum_t stripeID;
int tableOffset;
rf_decluster_adjust_params(layoutPtr, &SUID, &sus_per_fulltable, &fulltable_depth, &base_suid);
- FullTableID = SUID / sus_per_fulltable; /* fulltable ID within array
- * (across rows) */
stripeID = rf_StripeUnitIDToStripeID(layoutPtr, SUID); /* find stripe offset
* into array */
tableOffset = (stripeID % info->BlocksPerTable); /* find offset into
diff --git a/sys/dev/raidframe/rf_evenodd.c b/sys/dev/raidframe/rf_evenodd.c
index 626a1bb9d6b..3780ecd4048 100644
--- a/sys/dev/raidframe/rf_evenodd.c
+++ b/sys/dev/raidframe/rf_evenodd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_evenodd.c,v 1.20 2011/05/05 04:20:51 mrg Exp $ */
+/* $NetBSD: rf_evenodd.c,v 1.21 2014/03/23 09:30:59 christos 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.20 2011/05/05 04:20:51 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_evenodd.c,v 1.21 2014/03/23 09:30:59 christos Exp $");
#include "rf_archs.h"
@@ -337,7 +337,7 @@ rf_VerifyParityEvenOdd(RF_Raid_t *raidPtr, RF_RaidAddr_t raidAddr,
int numbytes = rf_RaidAddressToByte(raidPtr, numsector);
int bytesPerStripe = numbytes * layoutPtr->numDataCol;
RF_DagHeader_t *rd_dag_h, *wr_dag_h; /* read, write dag */
- RF_DagNode_t *blockNode, *unblockNode, *wrBlock, *wrUnblock;
+ RF_DagNode_t *blockNode, *wrBlock;
RF_AccessStripeMapHeader_t *asm_h;
RF_AccessStripeMap_t *asmap;
RF_AllocListElem_t *alloclist;
@@ -366,7 +366,6 @@ rf_VerifyParityEvenOdd(RF_Raid_t *raidPtr, RF_RaidAddr_t raidAddr,
rd_dag_h = rf_MakeSimpleDAG(raidPtr, stripeWidth, numbytes, buf, rf_DiskReadFunc, rf_DiskReadUndoFunc,
"Rod", alloclist, flags, RF_IO_NORMAL_PRIORITY);
blockNode = rd_dag_h->succedents[0];
- unblockNode = blockNode->succedents[0]->succedents[0];
/* map the stripe and fill in the PDAs in the dag */
asm_h = rf_MapAccess(raidPtr, startAddr, layoutPtr->dataSectorsPerStripe, buf, RF_DONT_REMAP);
@@ -461,7 +460,6 @@ rf_VerifyParityEvenOdd(RF_Raid_t *raidPtr, RF_RaidAddr_t raidAddr,
wr_dag_h = rf_MakeSimpleDAG(raidPtr, 1, numbytes, pbuf, rf_DiskWriteFunc, rf_DiskWriteUndoFunc,
"Wnp", alloclist, flags, RF_IO_NORMAL_PRIORITY);
wrBlock = wr_dag_h->succedents[0];
- wrUnblock = wrBlock->succedents[0]->succedents[0];
wrBlock->succedents[0]->params[0].p = asmap->parityInfo;
wrBlock->succedents[0]->params[2].v = psID;
wrBlock->succedents[0]->params[3].v = RF_CREATE_PARAM3(RF_IO_NORMAL_PRIORITY, which_ru);
@@ -492,7 +490,6 @@ rf_VerifyParityEvenOdd(RF_Raid_t *raidPtr, RF_RaidAddr_t raidAddr,
wr_dag_h = rf_MakeSimpleDAG(raidPtr, 1, numbytes, redundantbuf2, rf_DiskWriteFunc, rf_DiskWriteUndoFunc,
"Wnred2", alloclist, flags, RF_IO_NORMAL_PRIORITY);
wrBlock = wr_dag_h->succedents[0];
- wrUnblock = wrBlock->succedents[0]->succedents[0];
wrBlock->succedents[0]->params[0].p = asmap->qInfo;
wrBlock->succedents[0]->params[2].v = psID;
wrBlock->succedents[0]->params[3].v = RF_CREATE_PARAM3(RF_IO_NORMAL_PRIORITY, which_ru);
diff --git a/sys/dev/raidframe/rf_evenodd_dagfuncs.c b/sys/dev/raidframe/rf_evenodd_dagfuncs.c
index c57422dd16a..1a041061a4d 100644
--- a/sys/dev/raidframe/rf_evenodd_dagfuncs.c
+++ b/sys/dev/raidframe/rf_evenodd_dagfuncs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_evenodd_dagfuncs.c,v 1.21 2013/11/22 18:55:42 riz Exp $ */
+/* $NetBSD: rf_evenodd_dagfuncs.c,v 1.22 2014/03/23 09:30:59 christos Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_evenodd_dagfuncs.c,v 1.21 2013/11/22 18:55:42 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_evenodd_dagfuncs.c,v 1.22 2014/03/23 09:30:59 christos Exp $");
#include "rf_archs.h"
@@ -103,7 +103,7 @@ rf_RegularONEFunc(RF_DagNode_t *node)
int EpdaIndex = (node->numParams - 1) / 2 - 1; /* the parameter of node
* where you can find
* e-pda */
- int i, k, retcode = 0;
+ int i, k;
int suoffset, length;
RF_RowCol_t scol;
char *srcbuf, *destbuf;
@@ -125,7 +125,7 @@ rf_RegularONEFunc(RF_DagNode_t *node)
* new data is stored in Rod buffer */
for (k = 0; k < EpdaIndex; k += 2) {
length = rf_RaidAddressToByte(raidPtr, ((RF_PhysDiskAddr_t *) node->params[k].p)->numSector);
- retcode = rf_bxor(node->params[k + EpdaIndex + 3].p, node->params[k + 1].p, length);
+ rf_bxor(node->params[k + EpdaIndex + 3].p, node->params[k + 1].p, length);
}
/* Start to encoding the buffer storing the difference of old data and
* new data into 'E' buffer */
@@ -143,7 +143,7 @@ rf_RegularONEFunc(RF_DagNode_t *node)
* function in XorNode */
for (k = 0; k < EpdaIndex; k += 2) {
length = rf_RaidAddressToByte(raidPtr, ((RF_PhysDiskAddr_t *) node->params[k].p)->numSector);
- retcode = rf_bxor(node->params[k + EpdaIndex + 3].p, node->params[k + 1].p, length);
+ rf_bxor(node->params[k + EpdaIndex + 3].p, node->params[k + 1].p, length);
}
RF_ETIMER_STOP(timer);
RF_ETIMER_EVAL(timer);
@@ -658,8 +658,8 @@ rf_EvenOddDoubleRecoveryFunc(RF_DagNode_t *node)
int i, prm, sector, nresults = node->numResults;
RF_SectorCount_t secPerSU = layoutPtr->sectorsPerStripeUnit;
unsigned sosAddr;
- int two = 0, mallc_one = 0, mallc_two = 0; /* flags to indicate if
- * memory is allocated */
+ int mallc_one = 0, mallc_two = 0; /* flags to indicate if
+ * memory is allocated */
int bytesPerSector = rf_RaidAddressToByte(raidPtr, 1);
RF_PhysDiskAddr_t *ppda, *ppda2, *epda, *epda2, *pda, *pda0, *pda1,
npda;
@@ -695,7 +695,6 @@ rf_EvenOddDoubleRecoveryFunc(RF_DagNode_t *node)
epda = node->params[np - 4].p;
epda2 = node->params[np - 3].p;
RF_ASSERT(epda2->type == RF_PDA_TYPE_Q);
- two = 1;
} else {
ppda = node->params[np - 4].p;
epda = node->params[np - 3].p;
diff --git a/sys/dev/raidframe/rf_parityloggingdags.c b/sys/dev/raidframe/rf_parityloggingdags.c
index c39983ed6ac..3e2c2dcfde6 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.20 2013/11/22 18:56:27 riz Exp $ */
+/* $NetBSD: rf_parityloggingdags.c,v 1.21 2014/03/23 09:30:59 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.20 2013/11/22 18:56:27 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_parityloggingdags.c,v 1.21 2014/03/23 09:30:59 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_raid_diagnostic.h"
@@ -339,8 +339,7 @@ rf_CommonCreateParityLoggingSmallWriteDAG(
int i, j, nNodes, totalNumNodes;
RF_ReconUnitNum_t which_ru;
int (*func) (RF_DagNode_t * node), (*undoFunc) (RF_DagNode_t * node);
- int (*qfunc) (RF_DagNode_t * node);
- const char *name, *qname;
+ const char *name;
RF_StripeNum_t parityStripeID = rf_RaidAddressToParityStripeID(&(raidPtr->Layout), asmap->raidAddress, &which_ru);
long nfaults __unused = qfuncs ? 2 : 1;
@@ -457,18 +456,10 @@ rf_CommonCreateParityLoggingSmallWriteDAG(
func = pfuncs->simple;
undoFunc = rf_NullNodeUndoFunc;
name = pfuncs->SimpleName;
- if (qfuncs) {
- qfunc = qfuncs->simple;
- qname = qfuncs->SimpleName;
- }
} else {
func = pfuncs->regular;
undoFunc = rf_NullNodeUndoFunc;
name = pfuncs->RegularName;
- if (qfuncs) {
- qfunc = qfuncs->regular;
- qname = qfuncs->RegularName;
- }
}
/* initialize the xor nodes: params are {pda,buf} from {Rod,Wnd,Rop}
* nodes, and raidPtr */