summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-04-15 05:54:02 +0000
committerphk <phk@FreeBSD.org>2000-04-15 05:54:02 +0000
commitaaaef0b54e307450b19dcd1fb6ec921cc62d1acf (patch)
tree175dac1aaf0d06b54deb889161091dbcf88c79c6 /sys/kern/subr_disk.c
parentf2310ef109eccf99c872f4f90eb70f4fc26e39f1 (diff)
downloadFreeBSD-src-aaaef0b54e307450b19dcd1fb6ec921cc62d1acf.zip
FreeBSD-src-aaaef0b54e307450b19dcd1fb6ec921cc62d1acf.tar.gz
Complete the bio/buf divorce for all code below devfs::strategy
Exceptions: Vinum untouched. This means that it cannot be compiled. Greg Lehey is on the case. CCD not converted yet, casts to struct buf (still safe) atapi-cd casts to struct buf to examine B_PHYS
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 6d812e5..0838056 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -173,25 +173,25 @@ diskclose(dev_t dev, int fflag, int devtype, struct proc *p)
}
static void
-diskstrategy(struct buf *bp)
+diskstrategy(struct bio *bp)
{
dev_t pdev;
struct disk *dp;
- dp = bp->b_dev->si_disk;
+ dp = bp->bio_dev->si_disk;
if (!dp) {
- pdev = dkmodpart(dkmodslice(bp->b_dev, WHOLE_DISK_SLICE), RAW_PART);
- dp = bp->b_dev->si_disk = pdev->si_disk;
- bp->b_dev->si_drv1 = pdev->si_drv1;
- bp->b_dev->si_drv2 = pdev->si_drv2;
- bp->b_dev->si_iosize_max = pdev->si_iosize_max;
- bp->b_dev->si_bsize_phys = pdev->si_bsize_phys;
- bp->b_dev->si_bsize_best = pdev->si_bsize_best;
+ pdev = dkmodpart(dkmodslice(bp->bio_dev, WHOLE_DISK_SLICE), RAW_PART);
+ dp = bp->bio_dev->si_disk = pdev->si_disk;
+ bp->bio_dev->si_drv1 = pdev->si_drv1;
+ bp->bio_dev->si_drv2 = pdev->si_drv2;
+ bp->bio_dev->si_iosize_max = pdev->si_iosize_max;
+ bp->bio_dev->si_bsize_phys = pdev->si_bsize_phys;
+ bp->bio_dev->si_bsize_best = pdev->si_bsize_best;
}
if (!dp) {
- bp->b_error = ENXIO;
- bp->b_ioflags |= BIO_ERROR;
+ bp->bio_error = ENXIO;
+ bp->bio_flags |= BIO_ERROR;
biodone(bp);
return;
}
OpenPOWER on IntegriCloud