Initalize buffer headers correctly for current version of bio subsystem.

Not mentioned by: phk
Approved by:	  re (scottl)

This makes Vinum work again, at least in my testing.
This commit is contained in:
grog 2003-11-24 04:06:56 +00:00
parent 20fd0c6e74
commit 3b68a7271a
3 changed files with 6 additions and 1 deletions

View File

@ -396,9 +396,10 @@ complete_raid5_write(struct rqelement *rqe)
rqe->b.b_data = &ubp->b_data[rqe->useroffset << DEV_BSHIFT]; /* point to the user data */
rqe->b.b_bcount = rqe->datalen << DEV_BSHIFT; /* length to write */
rqe->b.b_bufsize = rqe->b.b_bcount; /* don't claim more */
rqe->b.b_offset = rqe->b.b_blkno << DEV_BSHIFT;
rqe->b.b_resid = rqe->b.b_bcount; /* nothing transferred */
rqe->b.b_blkno += rqe->dataoffset; /* point to the correct block */
rqe->b.b_offset = rqe->b.b_blkno << DEV_BSHIFT;
rqe->b.b_iooffset = rqe->b.b_offset;
rqg->active++; /* another active request */
drive = &DRIVE[rqe->driveno]; /* drive to access */
@ -436,6 +437,7 @@ complete_raid5_write(struct rqelement *rqe)
rqg->flags &= ~XFR_PARITYOP; /* reset flags that brought us here */
rqe->b.b_bcount = rqe->buflen << DEV_BSHIFT; /* length to write */
rqe->b.b_offset = rqe->b.b_blkno << DEV_BSHIFT;
rqe->b.b_iooffset = rqe->b.b_offset;
rqe->b.b_bufsize = rqe->b.b_bcount; /* don't claim we have more */
rqe->b.b_resid = rqe->b.b_bcount; /* nothing transferred */
rqg->active++; /* another active request */

View File

@ -256,6 +256,7 @@ driveio(struct drive *drive, char *buf, size_t length, off_t offset, int flag)
bp->b_dev = drive->dev; /* device */
bp->b_blkno = offset / drive->sectorsize; /* block number */
bp->b_offset = offset;
bp->b_iooffset = offset;
bp->b_saveaddr = bp->b_data;
bp->b_data = buf;
bp->b_bcount = len;

View File

@ -448,6 +448,7 @@ launch_requests(struct request *rq, int reviveok)
#endif
/* fire off the request */
rqe->b.b_offset = rqe->b.b_blkno << DEV_BSHIFT;
rqe->b.b_iooffset = rqe->b.b_offset;
DEV_STRATEGY(&rqe->b);
}
}
@ -993,6 +994,7 @@ sdio(struct buf *bp)
logrq(loginfo_sdiol, (union rqinfou) &sbp->b, &sbp->b);
#endif
sbp->b.b_offset = sbp->b.b_blkno << DEV_BSHIFT;
sbp->b.b_iooffset = sbp->b.b_offset;
DEV_STRATEGY(&sbp->b);
splx(s);
}