diff options
author | scottl <scottl@FreeBSD.org> | 2003-11-23 17:10:58 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2003-11-23 17:10:58 +0000 |
commit | 2b8cb7516e9f6289144ad953edf24ff5728db3ec (patch) | |
tree | 80f9c29d4f205b4fbc234c38a1bc4231df279572 /sys/dev | |
parent | d6105943a4839202e0cf22f677b9163fef122116 (diff) | |
download | FreeBSD-src-2b8cb7516e9f6289144ad953edf24ff5728db3ec.zip FreeBSD-src-2b8cb7516e9f6289144ad953edf24ff5728db3ec.tar.gz |
Fix vinum by correctly setting the b_offset bio filed when doing I/O.
Submitted by: grog
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 | 4 |
3 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/vinum/vinuminterrupt.c b/sys/dev/vinum/vinuminterrupt.c index 3221e47..a09d003 100644 --- a/sys/dev/vinum/vinuminterrupt.c +++ b/sys/dev/vinum/vinuminterrupt.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); * otherwise) arising in any way out of the use of this software, even if * advised of the possibility of such damage. * - * $Id: vinuminterrupt.c,v 1.14 2001/05/23 23:03:37 grog Exp grog $ + * $Id: vinuminterrupt.c,v 1.41 2003/08/24 17:55:56 obrien Exp $ */ #include <dev/vinum/vinumhdr.h> @@ -396,6 +396,7 @@ 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 */ rqg->active++; /* another active request */ @@ -434,6 +435,7 @@ complete_raid5_write(struct rqelement *rqe) rqe->b.b_iodone = complete_rqe; /* call us here when done */ 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_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 0fdbf45..42785da 100644 --- a/sys/dev/vinum/vinumio.c +++ b/sys/dev/vinum/vinumio.c @@ -255,6 +255,7 @@ driveio(struct drive *drive, char *buf, size_t length, off_t offset, int flag) bp->b_iocmd = flag; bp->b_dev = drive->dev; /* device */ bp->b_blkno = offset / drive->sectorsize; /* block number */ + bp->b_offset = 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 ceb725d..9a03206 100644 --- a/sys/dev/vinum/vinumrequest.c +++ b/sys/dev/vinum/vinumrequest.c @@ -37,7 +37,7 @@ * otherwise) arising in any way out of the use of this software, even if * advised of the possibility of such damage. * - * $Id: vinumrequest.c,v 1.36 2003/05/08 04:34:55 grog Exp grog $ + * $Id: vinumrequest.c,v 1.69 2003/10/18 17:57:48 phk Exp $ */ #include <sys/cdefs.h> @@ -447,6 +447,7 @@ launch_requests(struct request *rq, int reviveok) } #endif /* fire off the request */ + rqe->b.b_offset = rqe->b.b_blkno << DEV_BSHIFT; DEV_STRATEGY(&rqe->b); } } @@ -991,6 +992,7 @@ sdio(struct buf *bp) if (debug & DEBUG_LASTREQS) logrq(loginfo_sdiol, (union rqinfou) &sbp->b, &sbp->b); #endif + sbp->b.b_offset = sbp->b.b_blkno << DEV_BSHIFT; DEV_STRATEGY(&sbp->b); splx(s); } |