diff options
author | grog <grog@FreeBSD.org> | 2003-11-24 04:06:56 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 2003-11-24 04:06:56 +0000 |
commit | bc113c9ce7461e1c12fe00fe2a39790ad5f78379 (patch) | |
tree | 497a86dff71ee5881ee28864e42d2a2bd5b650c0 /sys/dev | |
parent | fa98e6052ae92dd7ca5a7b8e8cf46fc79623a29f (diff) | |
download | FreeBSD-src-bc113c9ce7461e1c12fe00fe2a39790ad5f78379.zip FreeBSD-src-bc113c9ce7461e1c12fe00fe2a39790ad5f78379.tar.gz |
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.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/vinum/vinuminterrupt.c | 4 | ||||
-rw-r--r-- | sys/dev/vinum/vinumio.c | 1 | ||||
-rw-r--r-- | sys/dev/vinum/vinumrequest.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/vinum/vinuminterrupt.c b/sys/dev/vinum/vinuminterrupt.c index a09d003..7344280 100644 --- a/sys/dev/vinum/vinuminterrupt.c +++ b/sys/dev/vinum/vinuminterrupt.c @@ -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 */ diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c index 42785da..ed9dbfb 100644 --- a/sys/dev/vinum/vinumio.c +++ b/sys/dev/vinum/vinumio.c @@ -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; diff --git a/sys/dev/vinum/vinumrequest.c b/sys/dev/vinum/vinumrequest.c index 9a03206..007411a 100644 --- a/sys/dev/vinum/vinumrequest.c +++ b/sys/dev/vinum/vinumrequest.c @@ -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); } |