Discontinue bio_blkno usage.
This commit is contained in:
parent
c4f832d118
commit
91a50fa4a5
@ -618,7 +618,7 @@ wdstrategy(struct bio *bp)
|
|||||||
int s;
|
int s;
|
||||||
|
|
||||||
du = bp->bio_disk->d_drv1;
|
du = bp->bio_disk->d_drv1;
|
||||||
if (du == NULL || bp->bio_blkno < 0 ||
|
if (du == NULL || bp->bio_pblkno < 0 ||
|
||||||
bp->bio_bcount % DEV_BSIZE != 0) {
|
bp->bio_bcount % DEV_BSIZE != 0) {
|
||||||
|
|
||||||
bp->bio_error = EINVAL;
|
bp->bio_error = EINVAL;
|
||||||
|
@ -432,7 +432,6 @@ acdstrategy(struct bio *bp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bp->bio_pblkno = bp->bio_blkno;
|
|
||||||
bp->bio_resid = bp->bio_bcount;
|
bp->bio_resid = bp->bio_bcount;
|
||||||
|
|
||||||
x = splbio();
|
x = splbio();
|
||||||
@ -479,11 +478,7 @@ acd_start(struct acd *cdp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bp->bio_cmd == BIO_READ)
|
if (bp->bio_cmd == BIO_READ)
|
||||||
#ifdef NOTYET
|
|
||||||
lba = bp->bio_offset / cdp->block_size;
|
lba = bp->bio_offset / cdp->block_size;
|
||||||
#else
|
|
||||||
lba = bp->bio_blkno / (cdp->block_size / DEV_BSIZE);
|
|
||||||
#endif
|
|
||||||
else
|
else
|
||||||
lba = cdp->next_writeable_lba + (bp->bio_offset / cdp->block_size);
|
lba = cdp->next_writeable_lba + (bp->bio_offset / cdp->block_size);
|
||||||
blocks = (bp->bio_bcount + (cdp->block_size - 1)) / cdp->block_size;
|
blocks = (bp->bio_bcount + (cdp->block_size - 1)) / cdp->block_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user