bzero -> memset

This commit is contained in:
thorpej 2001-07-18 06:45:33 +00:00
parent 0a9ceae750
commit cf56c44a86
22 changed files with 81 additions and 78 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_alloclist.c,v 1.4 1999/08/13 03:41:53 oster Exp $ */
/* $NetBSD: rf_alloclist.c,v 1.5 2001/07/18 06:45:33 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -182,6 +182,6 @@ rf_real_MakeAllocList(lockflag)
if (p == NULL) {
return (NULL);
}
bzero((char *) p, sizeof(RF_AllocListElem_t));
memset((char *) p, 0, sizeof(RF_AllocListElem_t));
return (p);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_cvscan.c,v 1.5 1999/08/13 03:41:53 oster Exp $ */
/* $NetBSD: rf_cvscan.c,v 1.6 2001/07/18 06:45:33 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -335,7 +335,7 @@ rf_CvscanCreate(RF_SectorCount_t sectPerDisk,
long penalty = sectPerDisk / 5;
RF_MallocAndAdd(hdr, sizeof(RF_CvscanHeader_t), (RF_CvscanHeader_t *), clList);
bzero((char *) hdr, sizeof(RF_CvscanHeader_t));
memset((char *) hdr, 0, sizeof(RF_CvscanHeader_t));
hdr->range_for_avg = RF_MAX(range, 1);
hdr->change_penalty = RF_MAX(penalty, 0);
hdr->direction = rf_cvscan_RIGHT;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_dagutils.c,v 1.6 1999/12/09 02:26:09 oster Exp $ */
/* $NetBSD: rf_dagutils.c,v 1.7 2001/07/18 06:45:33 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -248,7 +248,7 @@ rf_AllocDAGHeader()
RF_FREELIST_GET(rf_dagh_freelist, dh, next, (RF_DagHeader_t *));
if (dh) {
bzero((char *) dh, sizeof(RF_DagHeader_t));
memset((char *) dh, 0, sizeof(RF_DagHeader_t));
}
return (dh);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_debugMem.h,v 1.7 1999/09/05 01:58:11 oster Exp $ */
/* $NetBSD: rf_debugMem.h,v 1.8 2001/07/18 06:45:33 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -46,7 +46,7 @@
#define RF_Malloc(_p_, _size_, _cast_) \
{ \
_p_ = _cast_ malloc((u_long)_size_, M_RAIDFRAME, M_WAITOK); \
bzero((char *)_p_, _size_); \
memset((char *)_p_, 0, _size_); \
if (rf_memDebug) rf_record_malloc(_p_, _size_, __LINE__, __FILE__); \
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_driver.c,v 1.39 2000/12/15 02:12:58 oster Exp $ */
/* $NetBSD: rf_driver.c,v 1.40 2001/07/18 06:45:33 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@ -607,7 +607,7 @@ rf_AllocRaidAccDesc(
desc->state = 0;
desc->status = 0;
bzero((char *) &desc->tracerec, sizeof(RF_AccTraceEntry_t));
memset((char *) &desc->tracerec, 0, sizeof(RF_AccTraceEntry_t));
desc->callbackFunc = (void (*) (RF_CBParam_t)) cbF; /* XXX */
desc->callbackArg = cbA;
desc->next = NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_etimer.h,v 1.4 1999/08/13 03:26:55 oster Exp $ */
/* $NetBSD: rf_etimer.h,v 1.5 2001/07/18 06:45:33 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -46,7 +46,7 @@ struct RF_Etimer_s {
#define RF_ETIMER_START(_t_) \
{ \
int s; \
bzero(&(_t_), sizeof (_t_)); \
memset(&(_t_), 0, sizeof (_t_)); \
s = splclock(); \
(_t_).st = mono_time; \
splx(s); \

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_evenodd.c,v 1.4 2000/01/07 03:40:59 oster Exp $ */
/* $NetBSD: rf_evenodd.c,v 1.5 2001/07/18 06:45:33 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -427,7 +427,7 @@ rf_VerifyParityEvenOdd(raidPtr, raidAddr, parityPDA, correct_it, flags)
blockNode->succedents[layoutPtr->numDataCol + 1]->params[0].p = asmap->qInfo;
/* fire off the DAG */
bzero((char *) &tracerec, sizeof(tracerec));
memset((char *) &tracerec, 0, sizeof(tracerec));
rd_dag_h->tracerec = &tracerec;
if (rf_verifyParityDebug) {
@ -488,7 +488,7 @@ rf_VerifyParityEvenOdd(raidPtr, raidAddr, parityPDA, correct_it, flags)
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, 0, 0, which_ru);
bzero((char *) &tracerec, sizeof(tracerec));
memset((char *) &tracerec, 0, sizeof(tracerec));
wr_dag_h->tracerec = &tracerec;
if (rf_verifyParityDebug) {
printf("Parity verify write dag:\n");
@ -517,7 +517,7 @@ rf_VerifyParityEvenOdd(raidPtr, raidAddr, parityPDA, correct_it, flags)
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, 0, 0, which_ru);
bzero((char *) &tracerec, sizeof(tracerec));
memset((char *) &tracerec, 0, sizeof(tracerec));
wr_dag_h->tracerec = &tracerec;
if (rf_verifyParityDebug) {
printf("Dag of write new second redundant information in parity verify :\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_evenodd_dagfuncs.c,v 1.7 2001/01/26 03:50:53 oster Exp $ */
/* $NetBSD: rf_evenodd_dagfuncs.c,v 1.8 2001/07/18 06:45:33 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -410,7 +410,8 @@ rf_RecoveryEFunc(node)
RF_AccTraceEntry_t *tracerec = node->dagHdr->tracerec;
RF_Etimer_t timer;
bzero((char *) node->results[0], rf_RaidAddressToByte(raidPtr, failedPDA->numSector));
memset((char *) node->results[0], 0,
rf_RaidAddressToByte(raidPtr, failedPDA->numSector));
if (node->dagHdr->status == rf_enable) {
RF_ETIMER_START(timer);
for (i = 0; i < node->numParams - 2; i += 2)
@ -495,8 +496,8 @@ rf_doubleEOdecode(
#endif
RF_ASSERT(*((long *) dest[0]) == 0);
RF_ASSERT(*((long *) dest[1]) == 0);
bzero((char *) P, bytesPerEU);
bzero((char *) temp, bytesPerEU);
memset((char *) P, 0, bytesPerEU);
memset((char *) temp, 0, bytesPerEU);
RF_ASSERT(*P == 0);
/* calculate the 'P' parameter, which, not parity, is the Xor of all
* elements in the last two column, ie. 'E' and 'parity' colume, see
@ -710,7 +711,7 @@ rf_EvenOddDoubleRecoveryFunc(node)
if (nresults == 1) {
/* find the startSector to begin decoding */
pda = node->results[0];
bzero(pda->bufPtr, bytesPerSector * pda->numSector);
memset(pda->bufPtr, 0, bytesPerSector * pda->numSector);
fsuoff[0] = rf_StripeUnitOffset(layoutPtr, pda->startSector);
fsuend[0] = fsuoff[0] + pda->numSector;
startSector = fsuoff[0];
@ -734,9 +735,9 @@ rf_EvenOddDoubleRecoveryFunc(node)
} else {
RF_ASSERT(nresults == 2);
pda0 = node->results[0];
bzero(pda0->bufPtr, bytesPerSector * pda0->numSector);
memset(pda0->bufPtr, 0, bytesPerSector * pda0->numSector);
pda1 = node->results[1];
bzero(pda1->bufPtr, bytesPerSector * pda1->numSector);
memset(pda1->bufPtr, 0, bytesPerSector * pda1->numSector);
/* determine the failed colume numbers of the two failed
* disks. */
fcol[0] = rf_EUCol(layoutPtr, pda0->raidAddress);
@ -786,21 +787,21 @@ rf_EvenOddDoubleRecoveryFunc(node)
dest[0] = ((RF_PhysDiskAddr_t *) node->results[0])->bufPtr + rf_RaidAddressToByte(raidPtr, sector - fsuoff[0]);
/* Always malloc temp buffer to dest[1] */
RF_Malloc(dest[1], bytesPerSector, (char *));
bzero(dest[1], bytesPerSector);
memset(dest[1], 0, bytesPerSector);
mallc_two = 1;
} else {
if (fsuoff[0] <= sector && sector < fsuend[0])
dest[0] = ((RF_PhysDiskAddr_t *) node->results[0])->bufPtr + rf_RaidAddressToByte(raidPtr, sector - fsuoff[0]);
else {
RF_Malloc(dest[0], bytesPerSector, (char *));
bzero(dest[0], bytesPerSector);
memset(dest[0], 0, bytesPerSector);
mallc_one = 1;
}
if (fsuoff[1] <= sector && sector < fsuend[1])
dest[1] = ((RF_PhysDiskAddr_t *) node->results[1])->bufPtr + rf_RaidAddressToByte(raidPtr, sector - fsuoff[1]);
else {
RF_Malloc(dest[1], bytesPerSector, (char *));
bzero(dest[1], bytesPerSector);
memset(dest[1], 0, bytesPerSector);
mallc_two = 1;
}
RF_ASSERT(mallc_one == 0 || mallc_two == 0);
@ -917,8 +918,8 @@ rf_EOWriteDoubleRecoveryFunc(node)
RF_Malloc(olddata[1], numbytes, (char *));
dest[0] = olddata[0];
dest[1] = olddata[1];
bzero(olddata[0], numbytes);
bzero(olddata[1], numbytes);
memset(olddata[0], 0, numbytes);
memset(olddata[1], 0, numbytes);
/* Begin the recovery decoding, initially buf[j], ebuf, pbuf, dest[j]
* have already pointed at the beginning of each source buffers and
* destination buffers */

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_freelist.h,v 1.3 1999/02/05 00:06:11 oster Exp $ */
/* $NetBSD: rf_freelist.h,v 1.4 2001/07/18 06:45:33 thorpej Exp $ */
/*
* rf_freelist.h
*/
@ -60,7 +60,7 @@ typedef struct RF_FreeListStats_s {
int max_outstanding;
} RF_FreeListStats_t;
#define RF_FREELIST_STAT_INIT(_fl_) { \
bzero((char *)&((_fl_)->stats), sizeof(RF_FreeListStats_t)); \
memset((char *)&((_fl_)->stats), 0, sizeof(RF_FreeListStats_t)); \
(_fl_)->stats.file = __FILE__; \
(_fl_)->stats.line = __LINE__; \
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_general.h,v 1.6 2000/12/15 02:12:58 oster Exp $ */
/* $NetBSD: rf_general.h,v 1.7 2001/07/18 06:45:33 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -81,11 +81,11 @@ extern char rf_panicbuf[];
#define RF_GETTIME(_t) microtime(&(_t))
/*
* zero memory- not all bzero calls go through here, only
* zero memory- not all memset calls go through here, only
* those which in the kernel may have a user address
*/
#define RF_BZERO(_bp,_b,_l) bzero(_b,_l) /* XXX This is likely
#define RF_BZERO(_bp,_b,_l) memset(_b,0,_l) /* XXX This is likely
* incorrect. GO */

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_map.c,v 1.5 2000/06/29 00:22:27 oster Exp $ */
/* $NetBSD: rf_map.c,v 1.6 2001/07/18 06:45:33 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -124,7 +124,7 @@ rf_MapAccess(raidPtr, raidAddress, numBlocks, buffer, remap)
RF_ASSERT(asmList);
t_asm = asmList;
asmList = asmList->next;
bzero((char *) t_asm, sizeof(RF_AccessStripeMap_t));
memset((char *) t_asm, 0, sizeof(RF_AccessStripeMap_t));
if (!asm_p)
asm_list = asm_p = t_asm;
else {
@ -151,7 +151,7 @@ rf_MapAccess(raidPtr, raidAddress, numBlocks, buffer, remap)
RF_ASSERT(pdaList);
t_pda = pdaList;
pdaList = pdaList->next;
bzero((char *) t_pda, sizeof(RF_PhysDiskAddr_t));
memset((char *) t_pda, 0, sizeof(RF_PhysDiskAddr_t));
if (!pda_p)
asm_p->physInfo = pda_p = t_pda;
else {
@ -193,7 +193,7 @@ rf_MapAccess(raidPtr, raidAddress, numBlocks, buffer, remap)
RF_ASSERT(pdaList);
t_pda = pdaList;
pdaList = pdaList->next;
bzero((char *) t_pda, sizeof(RF_PhysDiskAddr_t));
memset((char *) t_pda, 0, sizeof(RF_PhysDiskAddr_t));
pda_p = asm_p->parityInfo = t_pda;
pda_p->type = RF_PDA_TYPE_PARITY;
(layoutPtr->map->MapParity) (raidPtr, rf_RaidAddressOfPrevStripeUnitBoundary(layoutPtr, startAddrWithinStripe),
@ -209,12 +209,12 @@ rf_MapAccess(raidPtr, raidAddress, numBlocks, buffer, remap)
RF_ASSERT(pdaList && pdaList->next);
t_pda = pdaList;
pdaList = pdaList->next;
bzero((char *) t_pda, sizeof(RF_PhysDiskAddr_t));
memset((char *) t_pda, 0, sizeof(RF_PhysDiskAddr_t));
pda_p = asm_p->parityInfo = t_pda;
pda_p->type = RF_PDA_TYPE_PARITY;
t_pda = pdaList;
pdaList = pdaList->next;
bzero((char *) t_pda, sizeof(RF_PhysDiskAddr_t));
memset((char *) t_pda, 0, sizeof(RF_PhysDiskAddr_t));
pda_q = asm_p->qInfo = t_pda;
pda_q->type = RF_PDA_TYPE_Q;
(layoutPtr->map->MapParity) (raidPtr, rf_RaidAddressOfPrevStripeUnitBoundary(layoutPtr, startAddrWithinStripe),
@ -264,7 +264,7 @@ rf_MarkFailuresInASMList(raidPtr, asm_h)
for (asmap = asm_h->stripeMap; asmap; asmap = asmap->next) {
asmap->numDataFailed = asmap->numParityFailed = asmap->numQFailed = 0;
asmap->numFailedPDAs = 0;
bzero((char *) asmap->failedPDAs,
memset((char *) asmap->failedPDAs, 0,
RF_MAX_FAILED_PDA * sizeof(RF_PhysDiskAddr_t *));
for (pda = asmap->physInfo; pda; pda = pda->next) {
if (RF_DEAD_DISK(disks[pda->row][pda->col].status)) {
@ -438,7 +438,7 @@ rf_AllocAccessStripeMapHeader()
RF_AccessStripeMapHeader_t *p;
RF_FREELIST_GET(rf_asmhdr_freelist, p, next, (RF_AccessStripeMapHeader_t *));
bzero((char *) p, sizeof(RF_AccessStripeMapHeader_t));
memset((char *) p, 0, sizeof(RF_AccessStripeMapHeader_t));
return (p);
}
@ -457,7 +457,7 @@ rf_AllocPhysDiskAddr()
RF_PhysDiskAddr_t *p;
RF_FREELIST_GET(rf_pda_freelist, p, next, (RF_PhysDiskAddr_t *));
bzero((char *) p, sizeof(RF_PhysDiskAddr_t));
memset((char *) p, 0, sizeof(RF_PhysDiskAddr_t));
return (p);
}
@ -498,7 +498,7 @@ rf_AllocAccessStripeMapComponent()
RF_AccessStripeMap_t *p;
RF_FREELIST_GET(rf_asm_freelist, p, next, (RF_AccessStripeMap_t *));
bzero((char *) p, sizeof(RF_AccessStripeMap_t));
memset((char *) p, 0, sizeof(RF_AccessStripeMap_t));
return (p);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_memchunk.c,v 1.4 1999/08/13 03:41:56 oster Exp $ */
/* $NetBSD: rf_memchunk.c,v 1.5 2001/07/18 06:45:33 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -178,7 +178,7 @@ rf_GetMemChunk(size)
p = NewMemChunk(size, buf);
}
RF_UNLOCK_MUTEX(chunkmutex);
(void) bzero(p->buf, size);
(void) memset(p->buf, 0, size);
return (p);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_netbsdkintf.c,v 1.107 2001/07/16 15:50:27 oster Exp $ */
/* $NetBSD: rf_netbsdkintf.c,v 1.108 2001/07/18 06:45:34 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@ -352,7 +352,7 @@ raidattach(num)
return;
}
bzero(raid_softc, num * sizeof(struct raid_softc));
memset(raid_softc, 0, num * sizeof(struct raid_softc));
raidrootdev = (struct device *)malloc(num * sizeof(struct device),
M_RAIDFRAME, M_NOWAIT);
@ -930,7 +930,7 @@ raidioctl(dev, cmd, data, flag, p)
* there is no stale data left in the case of a
* reconfiguration
*/
bzero((char *) raidPtr, sizeof(RF_Raid_t));
memset((char *) raidPtr, 0, sizeof(RF_Raid_t));
raidPtr->raidid = unit;
retcode = rf_Configure(raidPtr, k_cfg, NULL);
@ -997,7 +997,7 @@ raidioctl(dev, cmd, data, flag, p)
if (clabel == NULL)
return (ENOMEM);
bzero((char *) clabel, sizeof(RF_ComponentLabel_t));
memset((char *) clabel, 0, sizeof(RF_ComponentLabel_t));
retcode = copyin( *clabel_ptr, clabel,
sizeof(RF_ComponentLabel_t));
@ -1196,7 +1196,7 @@ raidioctl(dev, cmd, data, flag, p)
(RF_DeviceConfig_t *));
if (d_cfg == NULL)
return (ENOMEM);
bzero((char *) d_cfg, sizeof(RF_DeviceConfig_t));
memset((char *) d_cfg, 0, sizeof(RF_DeviceConfig_t));
d_cfg->rows = raidPtr->numRow;
d_cfg->cols = raidPtr->numCol;
d_cfg->ndevs = raidPtr->numRow * raidPtr->numCol;
@ -1231,7 +1231,7 @@ raidioctl(dev, cmd, data, flag, p)
return (0);
case RAIDFRAME_RESET_ACCTOTALS:
bzero(&raidPtr->acc_totals, sizeof(raidPtr->acc_totals));
memset(&raidPtr->acc_totals, 0, sizeof(raidPtr->acc_totals));
return (0);
case RAIDFRAME_GET_ACCTOTALS:
@ -1992,7 +1992,7 @@ raidgetdefaultlabel(raidPtr, rs, lp)
struct disklabel *lp;
{
db1_printf(("Building a default label...\n"));
bzero(lp, sizeof(*lp));
memset(lp, 0, sizeof(*lp));
/* fabricate a label... */
lp->d_secperunit = raidPtr->totalSectors;
@ -2037,7 +2037,7 @@ raidgetdisklabel(dev)
db1_printf(("Getting the disklabel...\n"));
bzero(clp, sizeof(*clp));
memset(clp, 0, sizeof(*clp));
raidPtr = raidPtrs[unit];

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_paritylogDiskMgr.c,v 1.10 2000/01/15 01:57:57 oster Exp $ */
/* $NetBSD: rf_paritylogDiskMgr.c,v 1.11 2001/07/18 06:45:34 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -141,7 +141,7 @@ ReadRegionLog(
}
/* initialize DAG parameters */
RF_Malloc(tracerec,sizeof(RF_AccTraceEntry_t), (RF_AccTraceEntry_t *));
bzero((char *) tracerec, sizeof(RF_AccTraceEntry_t));
memset((char *) tracerec, 0, sizeof(RF_AccTraceEntry_t));
(*rrd_dag_h)->tracerec = tracerec;
rrd_rdNode = (*rrd_dag_h)->succedents[0]->succedents[0];
rrd_rdNode->params[0].p = *rrd_pda;
@ -194,7 +194,7 @@ WriteCoreLog(
/* initialize DAG parameters */
RF_Malloc(tracerec,sizeof(RF_AccTraceEntry_t), (RF_AccTraceEntry_t *));
bzero((char *) tracerec, sizeof(RF_AccTraceEntry_t));
memset((char *) tracerec, 0, sizeof(RF_AccTraceEntry_t));
(*fwr_dag_h)->tracerec = tracerec;
fwr_wrNode = (*fwr_dag_h)->succedents[0]->succedents[0];
fwr_wrNode->params[0].p = *fwr_pda;
@ -250,7 +250,7 @@ ReadRegionParity(
}
/* initialize DAG parameters */
RF_Malloc(tracerec,sizeof(RF_AccTraceEntry_t), (RF_AccTraceEntry_t *));
bzero((char *) tracerec, sizeof(RF_AccTraceEntry_t));
memset((char *) tracerec, 0, sizeof(RF_AccTraceEntry_t));
(*prd_dag_h)->tracerec = tracerec;
prd_rdNode = (*prd_dag_h)->succedents[0]->succedents[0];
prd_rdNode->params[0].p = *prd_pda;
@ -301,7 +301,7 @@ WriteRegionParity(
/* initialize DAG parameters */
RF_Malloc(tracerec,sizeof(RF_AccTraceEntry_t), (RF_AccTraceEntry_t *));
bzero((char *) tracerec, sizeof(RF_AccTraceEntry_t));
memset((char *) tracerec, 0, sizeof(RF_AccTraceEntry_t));
(*pwr_dag_h)->tracerec = tracerec;
pwr_wrNode = (*pwr_dag_h)->succedents[0]->succedents[0];
pwr_wrNode->params[0].p = *pwr_pda;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_parityscan.c,v 1.9 2000/05/28 03:00:31 oster Exp $ */
/* $NetBSD: rf_parityscan.c,v 1.10 2001/07/18 06:45:34 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -243,7 +243,7 @@ rf_VerifyParityBasic(raidPtr, raidAddr, parityPDA, correct_it, flags)
blockNode->succedents[layoutPtr->numDataCol]->params[0].p = asmap->parityInfo;
/* fire off the DAG */
bzero((char *) &tracerec, sizeof(tracerec));
memset((char *) &tracerec, 0, sizeof(tracerec));
rd_dag_h->tracerec = &tracerec;
if (rf_verifyParityDebug) {
@ -288,7 +288,7 @@ rf_VerifyParityBasic(raidPtr, raidAddr, parityPDA, correct_it, flags)
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, 0, 0, which_ru);
bzero((char *) &tracerec, sizeof(tracerec));
memset((char *) &tracerec, 0, sizeof(tracerec));
wr_dag_h->tracerec = &tracerec;
if (rf_verifyParityDebug) {
printf("Parity verify write dag:\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_pq.c,v 1.8 2001/06/19 03:25:16 oster Exp $ */
/* $NetBSD: rf_pq.c,v 1.9 2001/07/18 06:45:34 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -756,7 +756,7 @@ QDelta(
#ifdef _KERNEL
/* PQ in kernel currently not supported because the encoding/decoding
* table is not present */
bzero(dest, length);
memset(dest, 0, length);
#else /* KERNEL */
/* this code probably doesn't work and should be rewritten -wvcii */
/* 13 5 bit quants in a 64 bit word */

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_pqdegdags.c,v 1.5 1999/08/15 02:36:40 oster Exp $ */
/* $NetBSD: rf_pqdegdags.c,v 1.6 2001/07/18 06:45:34 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -345,7 +345,7 @@ rf_PQWriteDoubleRecoveryFunc(node)
rf_PQ_recover((unsigned long *) ppda->bufPtr, (unsigned long *) qpda->bufPtr, (unsigned long *) qpda->bufPtr, (unsigned long *) ppda->bufPtr, rf_RaidAddressToByte(raidPtr, pda->numSector), i, coeff);
/* OK. The valid data is in P. Zero fill Q, then inc it into it. */
bzero(qpda->bufPtr, rf_RaidAddressToByte(raidPtr, qpda->numSector));
memset(qpda->bufPtr, 0, rf_RaidAddressToByte(raidPtr, qpda->numSector));
rf_IncQ((unsigned long *) qpda->bufPtr, (unsigned long *) ppda->bufPtr, rf_RaidAddressToByte(raidPtr, qpda->numSector), i);
/* now apply all the write data to the buffer */

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_psstatus.c,v 1.5 2000/01/08 22:57:31 oster Exp $ */
/* $NetBSD: rf_psstatus.c,v 1.6 2001/07/18 06:45:34 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -303,7 +303,7 @@ rf_AllocPSStatus(raidPtr)
RF_FREELIST_GET_INIT_ARG(raidPtr->pss_freelist, p, next, (RF_ReconParityStripeStatus_t *), init_pss, raidPtr);
if (p) {
bzero(p->issued, raidPtr->numCol);
memset(p->issued, 0, raidPtr->numCol);
}
p->next = NULL;
/* no need to initialize here b/c the only place we're called from is

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_raid1.c,v 1.5 2000/01/08 22:57:30 oster Exp $ */
/* $NetBSD: rf_raid1.c,v 1.6 2001/07/18 06:45:34 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -388,7 +388,7 @@ rf_VerifyParityRAID1(
}
RF_ASSERT(pda == NULL);
bzero((char *) &tracerec, sizeof(tracerec));
memset((char *) &tracerec, 0, sizeof(tracerec));
rd_dag_h->tracerec = &tracerec;
if (rf_verifyParityDebug > 1) {
@ -495,7 +495,7 @@ rf_VerifyParityRAID1(
wrBlock->succedents[i]->params[2].v = psID;
wrBlock->succedents[0]->params[3].v = RF_CREATE_PARAM3(RF_IO_NORMAL_PRIORITY, 0, 0, which_ru);
}
bzero((char *) &tracerec, sizeof(tracerec));
memset((char *) &tracerec, 0, sizeof(tracerec));
wr_dag_h->tracerec = &tracerec;
if (rf_verifyParityDebug > 1) {
printf("Parity verify write dag:\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_reconmap.c,v 1.6 1999/08/14 21:44:24 oster Exp $ */
/* $NetBSD: rf_reconmap.c,v 1.7 2001/07/18 06:45:34 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -42,7 +42,7 @@
* has been either totally reconstructed or not at all. Both
* are illegal pointer values, so you have to be careful not to
* dereference through them. RU_NOTHING must be zero, since
* MakeReconMap uses bzero to initialize the structure. These are used
* MakeReconMap uses memset to initialize the structure. These are used
* only at the head of the list.
*/
#define RU_ALL ((RF_ReconMapListElem_t *) -1)
@ -96,7 +96,8 @@ rf_MakeReconMap(raidPtr, ru_sectors, disk_sectors, spareUnitsPerDisk)
RF_Malloc(p->status, num_rus * sizeof(RF_ReconMapListElem_t *), (RF_ReconMapListElem_t **));
RF_ASSERT(p->status != (RF_ReconMapListElem_t **) NULL);
(void) bzero((char *) p->status, num_rus * sizeof(RF_ReconMapListElem_t *));
(void) memset((char *) p->status, 0,
num_rus * sizeof(RF_ReconMapListElem_t *));
p->size = sizeof(RF_ReconMap_t) + num_rus * sizeof(RF_ReconMapListElem_t *);
p->maxSize = p->size;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_reconstruct.c,v 1.28 2001/06/14 02:35:56 oster Exp $ */
/* $NetBSD: rf_reconstruct.c,v 1.29 2001/07/18 06:45:34 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -1014,7 +1014,8 @@ IssueNextReadRequest(raidPtr, row, col)
* only to see if we can actually do it now */
rbuf->parityStripeID = ctrl->curPSID;
rbuf->which_ru = ctrl->ru_count;
bzero((char *) &raidPtr->recon_tracerecs[col], sizeof(raidPtr->recon_tracerecs[col]));
memset((char *) &raidPtr->recon_tracerecs[col], 0,
sizeof(raidPtr->recon_tracerecs[col]));
raidPtr->recon_tracerecs[col].reconacc = 1;
RF_ETIMER_START(raidPtr->recon_tracerecs[col].recon_timer);
retcode = TryToRead(raidPtr, row, col);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_utils.c,v 1.5 2000/01/07 03:41:03 oster Exp $ */
/* $NetBSD: rf_utils.c,v 1.6 2001/07/18 06:45:34 thorpej Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -54,7 +54,7 @@ rf_make_2d_array(b, k, allocList)
RF_MallocAndAdd(retval, b * sizeof(RF_RowCol_t *), (RF_RowCol_t **), allocList);
for (i = 0; i < b; i++) {
RF_MallocAndAdd(retval[i], k * sizeof(RF_RowCol_t), (RF_RowCol_t *), allocList);
(void) bzero((char *) retval[i], k * sizeof(RF_RowCol_t));
(void) memset((char *) retval[i], 0, k * sizeof(RF_RowCol_t));
}
return (retval);
}
@ -82,7 +82,7 @@ rf_make_1d_array(c, allocList)
RF_RowCol_t *retval;
RF_MallocAndAdd(retval, c * sizeof(RF_RowCol_t), (RF_RowCol_t *), allocList);
(void) bzero((char *) retval, c * sizeof(RF_RowCol_t));
(void) memset((char *) retval, 0, c * sizeof(RF_RowCol_t));
return (retval);
}