Subject: raidframe buf initialization
To: None <oster@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 01/08/2006 18:15:53
--NextPart-20060108181151-1065200
Content-Type: Text/Plain; charset=us-ascii
hi,
the attached diff moves initialization of buffers from rf_CreateDiskQueueData
to rf_DispatchKernelIO, as it used to be in the original raidframe.
is it ok?
YAMAMOTO Takashi
--NextPart-20060108181151-1065200
Content-Type: Text/Plain; charset=us-ascii
Content-Disposition: attachment; filename="a.diff"
Index: rf_netbsdkintf.c
===================================================================
--- rf_netbsdkintf.c (revision 1519)
+++ rf_netbsdkintf.c (working copy)
@@ -1812,20 +1812,7 @@ rf_DispatchKernelIO(RF_DiskQueue_t *queu
#endif
bp = req->bp;
-#if 1
- /* XXX when there is a physical disk failure, someone is passing us a
- * buffer that contains old stuff!! Attempt to deal with this problem
- * without taking a performance hit... (not sure where the real bug
- * is. It's buried in RAIDframe somewhere) :-( GO ) */
- if (bp->b_flags & B_ERROR) {
- bp->b_flags &= ~B_ERROR;
- }
- if (bp->b_error != 0) {
- bp->b_error = 0;
- }
-#endif
-
/*
* context for raidiodone
*/
@@ -1840,8 +1827,7 @@ rf_DispatchKernelIO(RF_DiskQueue_t *queu
printf(("WAKEUP CALLED\n"));
queue->numOutstanding++;
- /* XXX need to glue the original buffer into this?? */
-
+ bp->b_flags = 0;
KernelWakeupFunc(bp);
break;
@@ -1853,7 +1839,7 @@ rf_DispatchKernelIO(RF_DiskQueue_t *queu
}
#endif
InitBP(bp, queue->rf_cinfo->ci_vp,
- op | bp->b_flags, queue->rf_cinfo->ci_dev,
+ op, queue->rf_cinfo->ci_dev,
req->sectorOffset, req->numSector,
req->buf, KernelWakeupFunc, (void *) req,
queue->raidPtr->logBytesPerSector, req->b_proc);
Index: rf_diskqueue.c
===================================================================
--- rf_diskqueue.c (revision 1515)
+++ rf_diskqueue.c (working copy)
@@ -465,8 +465,6 @@ rf_CreateDiskQueueData(RF_IoType_t typ,
pool_put(&rf_pools.dqd, p);
return (NULL);
}
- p->bp->b_flags = 0;
- p->bp->b_vp = NULL; /* XXX unnecessary? */
p->sectorOffset = ssect + rf_protectedSectors;
p->numSector = nsect;
--NextPart-20060108181151-1065200--