diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-10-18 17:26:13 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-10-18 17:26:13 +0000 |
| commit | 24730dd78ab369fda9f4aea24a4cd2818ff026c9 (patch) | |
| tree | 593463a87e834847b2c86cf517621bdcbc0fdc20 /sys/dev/raidframe | |
| parent | 3a71ca7daa04bf8c75f9f8443964f9007a680d70 (diff) | |
Notes
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_freebsdkintf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/raidframe/rf_freebsdkintf.c b/sys/dev/raidframe/rf_freebsdkintf.c index 6f8802f0c3f3..e417352152ca 100644 --- a/sys/dev/raidframe/rf_freebsdkintf.c +++ b/sys/dev/raidframe/rf_freebsdkintf.c @@ -1372,15 +1372,16 @@ raidstart(raidPtr) * partition.. Need to make it absolute to the underlying * device.. */ - blocknum = bp->bio_blkno; + blocknum = bp->bio_pblkno = + bp->bio_offset >> raidPtr->logBytesPerSector; - rf_printf(3, "Blocks: %ld, %ld\n", (long)bp->bio_blkno, (long)blocknum); + rf_printf(3, "Blocks: %ld, %ld\n", (long)bp->bio_pblkno, (long)blocknum); rf_printf(3, "bp->bio_bcount = %d\n", (int) bp->bio_bcount); rf_printf(3, "bp->bio_resid = %d\n", (int) bp->bio_resid); /* *THIS* is where we adjust what block we're going to... - * but DO NOT TOUCH bp->bio_blkno!!! */ + * but DO NOT TOUCH bp->bio_pblkno!!! */ raid_addr = blocknum; num_blocks = bp->bio_bcount >> raidPtr->logBytesPerSector; @@ -1522,8 +1523,8 @@ rf_DispatchKernelIO(queue, req) queue->raidPtr->logBytesPerSector, req->b_proc); if (rf_debugKernelAccess) { - rf_printf(0, "dispatch: bp->bio_blkno = %ld\n", - (long) bp->bio_blkno); + rf_printf(0, "dispatch: bp->bio_pblkno = %ld\n", + (long) bp->bio_pblkno); } queue->numOutstanding++; queue->last_deq_sector = req->sectorOffset; @@ -1544,7 +1545,6 @@ rf_DispatchKernelIO(queue, req) raidbp->rf_buf.b_vp->v_numoutput++; } #endif - raidbp->rf_buf.b_iooffset = dbtob(raidbp->rf_buf.b_blkno); (*devsw(raidbp->rf_buf.bio_dev)->d_strategy)(&raidbp->rf_buf); break; @@ -1658,8 +1658,8 @@ InitBP(bp, b_vp, rw_flag, dev, startSect, numSect, buf, cbFunc, cbArg, bp->bio_error = 0; bp->bio_dev = dev; bp->bio_data = buf; - bp->bio_blkno = startSect; bp->bio_resid = bp->bio_bcount; /* XXX is this right!?!?!! */ + bp->bio_offset = startSect << logBytesPerSector; if (bp->bio_bcount == 0) { panic("bp->bio_bcount is zero in InitBP!!\n"); } |
