diff options
author | phk <phk@FreeBSD.org> | 2000-04-15 05:54:02 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-04-15 05:54:02 +0000 |
commit | aaaef0b54e307450b19dcd1fb6ec921cc62d1acf (patch) | |
tree | 175dac1aaf0d06b54deb889161091dbcf88c79c6 /sys/dev/ida/ida_disk.c | |
parent | f2310ef109eccf99c872f4f90eb70f4fc26e39f1 (diff) | |
download | FreeBSD-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/dev/ida/ida_disk.c')
-rw-r--r-- | sys/dev/ida/ida_disk.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c index 3694f62..6f81c0d 100644 --- a/sys/dev/ida/ida_disk.c +++ b/sys/dev/ida/ida_disk.c @@ -149,32 +149,32 @@ idclose(dev_t dev, int flags, int fmt, struct proc *p) * be a multiple of a sector in length. */ static void -idstrategy(struct buf *bp) +idstrategy(struct bio *bp) { struct id_softc *drv; int s; - drv = idgetsoftc(bp->b_dev); + drv = idgetsoftc(bp->bio_dev); if (drv == NULL) { - bp->b_error = EINVAL; + bp->bio_error = EINVAL; goto bad; } /* * software write protect check */ - if (drv->flags & DRV_WRITEPROT && (bp->b_iocmd == BIO_WRITE)) { - bp->b_error = EROFS; + if (drv->flags & DRV_WRITEPROT && (bp->bio_cmd == BIO_WRITE)) { + bp->bio_error = EROFS; goto bad; } /* * If it's a null transfer, return immediately */ - if (bp->b_bcount == 0) + if (bp->bio_bcount == 0) goto done; - bp->b_driver1 = drv; + bp->bio_driver1 = drv; s = splbio(); devstat_start_transaction(&drv->stats); ida_submit_buf(drv->controller, bp); @@ -182,28 +182,28 @@ idstrategy(struct buf *bp) return; bad: - bp->b_ioflags |= BIO_ERROR; + bp->bio_flags |= BIO_ERROR; done: /* * Correctly set the buf to indicate a completed transfer */ - bp->b_resid = bp->b_bcount; + bp->bio_resid = bp->bio_bcount; biodone(bp); return; } void -id_intr(struct buf *bp) +id_intr(struct bio *bp) { - struct id_softc *drv = (struct id_softc *)bp->b_driver1; + struct id_softc *drv = (struct id_softc *)bp->bio_driver1; - if (bp->b_ioflags & BIO_ERROR) - bp->b_error = EIO; + if (bp->bio_flags & BIO_ERROR) + bp->bio_error = EIO; else - bp->b_resid = 0; + bp->bio_resid = 0; - devstat_end_transaction_buf(&drv->stats, bp); + devstat_end_transaction_bio(&drv->stats, bp); biodone(bp); } |