summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-04-01 15:06:26 +0000
committerphk <phk@FreeBSD.org>2003-04-01 15:06:26 +0000
commitc235e25328c6cf4b9091f38d9c18db15764df594 (patch)
treef08dda1f60d395e9bc94bf2fd1921768bf958c6d
parent98acc8a3d79206dbf51e83ae8573fa89e54645b6 (diff)
downloadFreeBSD-src-c235e25328c6cf4b9091f38d9c18db15764df594.zip
FreeBSD-src-c235e25328c6cf4b9091f38d9c18db15764df594.tar.gz
Use bioq_flush() to drain a bio queue with a specific error code.
Retain the mistake of not updating the devstat API for now. Spell bioq_disksort() consistently with the remaining bioq_*(). #include <geom/geom_disk.h> where this is more appropriate.
-rw-r--r--sys/cam/scsi/scsi_cd.c16
-rw-r--r--sys/cam/scsi/scsi_da.c20
-rw-r--r--sys/cam/scsi/scsi_pt.c16
-rw-r--r--sys/cam/scsi/scsi_sa.c14
-rw-r--r--sys/contrib/dev/fla/fla.c4
-rw-r--r--sys/dev/aac/aac.c2
-rw-r--r--sys/dev/aac/aac_debug.c3
-rw-r--r--sys/dev/aac/aacvar.h2
-rw-r--r--sys/dev/amr/amr.c1
-rw-r--r--sys/dev/amr/amr_cam.c1
-rw-r--r--sys/dev/amr/amr_disk.c1
-rw-r--r--sys/dev/amr/amr_pci.c1
-rw-r--r--sys/dev/amr/amrvar.h1
-rw-r--r--sys/dev/ata/ata-all.c2
-rw-r--r--sys/dev/ata/ata-disk.c9
-rw-r--r--sys/dev/ata/ata-raid.c1
-rw-r--r--sys/dev/ata/atapi-cd.c11
-rw-r--r--sys/dev/ata/atapi-fd.c10
-rw-r--r--sys/dev/ata/atapi-tape.c6
-rw-r--r--sys/dev/ccd/ccd.c1
-rw-r--r--sys/dev/fdc/fdc.c2
-rw-r--r--sys/dev/ida/ida.c3
-rw-r--r--sys/dev/ida/ida_disk.c3
-rw-r--r--sys/dev/ida/ida_eisa.c3
-rw-r--r--sys/dev/ida/ida_pci.c3
-rw-r--r--sys/dev/mcd/mcd.c2
-rw-r--r--sys/dev/md/md.c2
-rw-r--r--sys/dev/mlx/mlx.c3
-rw-r--r--sys/dev/mlx/mlx_disk.c3
-rw-r--r--sys/dev/mlx/mlx_pci.c3
-rw-r--r--sys/dev/pst/pst-raid.c4
-rw-r--r--sys/dev/raidframe/rf_freebsdkintf.c1
-rw-r--r--sys/dev/scd/scd.c2
-rw-r--r--sys/dev/twe/twe_freebsd.c1
-rw-r--r--sys/geom/geom_ccd.c1
-rw-r--r--sys/ia64/ia64/sscdisk.c2
-rw-r--r--sys/isa/fd.c2
-rw-r--r--sys/pc98/cbus/fdc.c2
-rw-r--r--sys/pc98/pc98/fd.c2
-rw-r--r--sys/pc98/pc98/wd.c2
-rw-r--r--sys/pc98/pc98/wd_cd.c2
41 files changed, 61 insertions, 109 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index 66b18f0..2fe1e16 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -394,7 +394,6 @@ cdoninvalidate(struct cam_periph *periph)
{
int s;
struct cd_softc *softc;
- struct bio *q_bp;
struct ccb_setasync csa;
softc = (struct cd_softc *)periph->softc;
@@ -424,11 +423,7 @@ cdoninvalidate(struct cam_periph *periph)
* XXX Handle any transactions queued to the card
* with XPT_ABORT_CCB.
*/
- while ((q_bp = bioq_first(&softc->bio_queue)) != NULL){
- bioq_remove(&softc->bio_queue, q_bp);
- q_bp->bio_resid = q_bp->bio_bcount;
- biofinish(q_bp, NULL, ENXIO);
- }
+ bioq_flush(&softc->bio_queue, NULL, ENXIO);
splx(s);
/*
@@ -1464,7 +1459,7 @@ cdstrategy(struct bio *bp)
/*
* Place it in the queue of disk activities for this disk
*/
- bioqdisksort(&softc->bio_queue, bp);
+ bioq_disksort(&softc->bio_queue, bp);
splx(s);
@@ -1630,16 +1625,11 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
if (error != 0) {
int s;
- struct bio *q_bp;
xpt_print_path(periph->path);
printf("cddone: got error %#x back\n", error);
s = splbio();
- while ((q_bp = bioq_first(&softc->bio_queue)) != NULL) {
- bioq_remove(&softc->bio_queue, q_bp);
- q_bp->bio_resid = q_bp->bio_bcount;
- biofinish(q_bp, NULL, EIO);
- }
+ bioq_flush(&softc->bio_queue, NULL, EIO);
splx(s);
bp->bio_resid = bp->bio_bcount;
bp->bio_error = error;
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index bdb8276..05402b3 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -43,7 +43,6 @@
#include <sys/devicestat.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <sys/eventhandler.h>
#include <sys/malloc.h>
#include <sys/cons.h>
@@ -53,6 +52,8 @@
#include <vm/vm.h>
#include <vm/pmap.h>
+#include <geom/geom_disk.h>
+
#ifndef _KERNEL
#include <stdio.h>
#include <string.h>
@@ -750,7 +751,7 @@ dastrategy(struct bio *bp)
/*
* Place it in the queue of disk activities for this disk
*/
- bioqdisksort(&softc->bio_queue, bp);
+ bioq_disksort(&softc->bio_queue, bp);
splx(s);
@@ -935,7 +936,6 @@ daoninvalidate(struct cam_periph *periph)
{
int s;
struct da_softc *softc;
- struct bio *q_bp;
struct ccb_setasync csa;
softc = (struct da_softc *)periph->softc;
@@ -965,11 +965,7 @@ daoninvalidate(struct cam_periph *periph)
* XXX Handle any transactions queued to the card
* with XPT_ABORT_CCB.
*/
- while ((q_bp = bioq_first(&softc->bio_queue)) != NULL){
- bioq_remove(&softc->bio_queue, q_bp);
- q_bp->bio_resid = q_bp->bio_bcount;
- biofinish(q_bp, NULL, ENXIO);
- }
+ bioq_flush(&softc->bio_queue, NULL, ENXIO);
splx(s);
SLIST_REMOVE(&softc_list, softc, da_softc, links);
@@ -1438,7 +1434,6 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
return;
}
if (error != 0) {
- struct bio *q_bp;
s = splbio();
@@ -1460,12 +1455,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
* the client can retry these I/Os in the
* proper order should it attempt to recover.
*/
- while ((q_bp = bioq_first(&softc->bio_queue))
- != NULL) {
- bioq_remove(&softc->bio_queue, q_bp);
- q_bp->bio_resid = q_bp->bio_bcount;
- biofinish(q_bp, NULL, EIO);
- }
+ bioq_flush(&softc->bio_queue, NULL, EIO);
splx(s);
bp->bio_error = error;
bp->bio_resid = bp->bio_bcount;
diff --git a/sys/cam/scsi/scsi_pt.c b/sys/cam/scsi/scsi_pt.c
index 280093a..63bb15a 100644
--- a/sys/cam/scsi/scsi_pt.c
+++ b/sys/cam/scsi/scsi_pt.c
@@ -353,7 +353,6 @@ ptoninvalidate(struct cam_periph *periph)
{
int s;
struct pt_softc *softc;
- struct bio *q_bp;
struct ccb_setasync csa;
softc = (struct pt_softc *)periph->softc;
@@ -383,11 +382,7 @@ ptoninvalidate(struct cam_periph *periph)
* XXX Handle any transactions queued to the card
* with XPT_ABORT_CCB.
*/
- while ((q_bp = bioq_first(&softc->bio_queue)) != NULL){
- bioq_remove(&softc->bio_queue, q_bp);
- q_bp->bio_resid = q_bp->bio_bcount;
- biofinish(q_bp, NULL, ENXIO);
- }
+ bioq_flush(&softc->bio_queue, NULL, ENXIO);
splx(s);
@@ -574,8 +569,6 @@ ptdone(struct cam_periph *periph, union ccb *done_ccb)
return;
}
if (error != 0) {
- struct bio *q_bp;
-
s = splbio();
if (error == ENXIO) {
@@ -593,12 +586,7 @@ ptdone(struct cam_periph *periph, union ccb *done_ccb)
* the client can retry these I/Os in the
* proper order should it attempt to recover.
*/
- while ((q_bp = bioq_first(&softc->bio_queue))
- != NULL) {
- bioq_remove(&softc->bio_queue, q_bp);
- q_bp->bio_resid = q_bp->bio_bcount;
- biofinish(q_bp, NULL, EIO);
- }
+ bioq_flush(&softc->bio_queue, NULL, EIO);
splx(s);
bp->bio_error = error;
bp->bio_resid = bp->bio_bcount;
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index acf5acf..e81b110 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -1281,7 +1281,6 @@ static void
saoninvalidate(struct cam_periph *periph)
{
struct sa_softc *softc;
- struct bio *q_bp;
struct ccb_setasync csa;
int s;
@@ -1312,11 +1311,7 @@ saoninvalidate(struct cam_periph *periph)
* XXX Handle any transactions queued to the card
* with XPT_ABORT_CCB.
*/
- while ((q_bp = bioq_first(&softc->bio_queue)) != NULL){
- bioq_remove(&softc->bio_queue, q_bp);
- q_bp->bio_resid = q_bp->bio_bcount;
- biofinish(q_bp, NULL, ENXIO);
- }
+ bioq_flush(&softc->bio_queue, NULL, ENXIO);
softc->queue_count = 0;
splx(s);
@@ -1698,7 +1693,6 @@ sadone(struct cam_periph *periph, union ccb *done_ccb)
if (error == EIO) {
int s;
- struct bio *q_bp;
/*
* Catastrophic error. Mark the tape as frozen
@@ -1713,11 +1707,7 @@ sadone(struct cam_periph *periph, union ccb *done_ccb)
s = splbio();
softc->flags |= SA_FLAG_TAPE_FROZEN;
- while ((q_bp = bioq_first(&softc->bio_queue)) != NULL) {
- bioq_remove(&softc->bio_queue, q_bp);
- q_bp->bio_resid = q_bp->bio_bcount;
- biofinish(q_bp, NULL, EIO);
- }
+ bioq_flush(&softc->bio_queue, NULL, EIO);
splx(s);
}
if (error != 0) {
diff --git a/sys/contrib/dev/fla/fla.c b/sys/contrib/dev/fla/fla.c
index 8a01341..789db78 100644
--- a/sys/contrib/dev/fla/fla.c
+++ b/sys/contrib/dev/fla/fla.c
@@ -17,9 +17,9 @@
#include <sys/bio.h>
#include <sys/malloc.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <sys/module.h>
#include <machine/resource.h>
+#include <geom/geom_disk.h>
#include <vm/vm.h>
#include <vm/pmap.h>
@@ -133,7 +133,7 @@ flastrategy(struct bio *bp)
sc = bp->bio_disk->d_drv1;
- bioqdisksort(&sc->bio_queue, bp);
+ bioq_disksort(&sc->bio_queue, bp);
if (sc->busy) {
return;
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 43fdc91..5f5f427 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -43,10 +43,10 @@
#include <sys/kthread.h>
#include <sys/sysctl.h>
#include <sys/poll.h>
+#include <sys/ioccom.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <sys/signalvar.h>
#include <sys/time.h>
#include <sys/eventhandler.h>
diff --git a/sys/dev/aac/aac_debug.c b/sys/dev/aac/aac_debug.c
index 5f02391..78ae942 100644
--- a/sys/dev/aac/aac_debug.c
+++ b/sys/dev/aac/aac_debug.c
@@ -39,13 +39,12 @@
#include <sys/kernel.h>
#include <sys/conf.h>
-#include <dev/aac/aac_compat.h>
#include <sys/bus.h>
-#include <sys/disk.h>
#include <machine/resource.h>
#include <machine/bus.h>
+#include <dev/aac/aac_compat.h>
#include <dev/aac/aacreg.h>
#include <dev/aac/aac_ioctl.h>
#include <dev/aac/aacvar.h>
diff --git a/sys/dev/aac/aacvar.h b/sys/dev/aac/aacvar.h
index 1d6ab15..1ff54112 100644
--- a/sys/dev/aac/aacvar.h
+++ b/sys/dev/aac/aacvar.h
@@ -34,6 +34,8 @@
#include <sys/mutex.h>
#include <sys/taskqueue.h>
#include <sys/selinfo.h>
+#include <geom/geom_disk.h>
+
/*
* Driver Parameter Definitions
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index 170ff98..29e0a30 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -68,7 +68,6 @@
#include <dev/amr/amr_compat.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <sys/stat.h>
#include <machine/bus_memio.h>
diff --git a/sys/dev/amr/amr_cam.c b/sys/dev/amr/amr_cam.c
index 1c8f6b6..d30c964 100644
--- a/sys/dev/amr/amr_cam.c
+++ b/sys/dev/amr/amr_cam.c
@@ -64,7 +64,6 @@
#include <dev/amr/amr_compat.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <sys/stat.h>
#include <cam/cam.h>
diff --git a/sys/dev/amr/amr_disk.c b/sys/dev/amr/amr_disk.c
index 4266f15..e7a9bbe 100644
--- a/sys/dev/amr/amr_disk.c
+++ b/sys/dev/amr/amr_disk.c
@@ -68,7 +68,6 @@
#include <dev/amr/amr_compat.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <machine/bus.h>
#include <sys/rman.h>
diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c
index caffc5d..eacb1bd 100644
--- a/sys/dev/amr/amr_pci.c
+++ b/sys/dev/amr/amr_pci.c
@@ -63,7 +63,6 @@
#include <dev/amr/amr_compat.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <machine/bus_memio.h>
#include <machine/bus_pio.h>
diff --git a/sys/dev/amr/amrvar.h b/sys/dev/amr/amrvar.h
index a9bca40..a28fa47 100644
--- a/sys/dev/amr/amrvar.h
+++ b/sys/dev/amr/amrvar.h
@@ -58,6 +58,7 @@
#if __FreeBSD_version >= 500005
# include <sys/taskqueue.h>
+# include <geom/geom_disk.h>
#endif
#ifdef AMR_DEBUG
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index 8674a93..867670a 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -34,7 +34,6 @@
#include <sys/ata.h>
#include <sys/kernel.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/bio.h>
@@ -47,6 +46,7 @@
#ifdef __alpha__
#include <machine/md_var.h>
#endif
+#include <geom/geom_disk.h>
#include <dev/ata/ata-all.h>
#include <dev/ata/ata-disk.h>
#include <dev/ata/ata-raid.h>
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index c7d80cb..9801c25 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -45,6 +45,7 @@
#include <machine/md_var.h>
#include <machine/bus.h>
#include <sys/rman.h>
+#include <geom/geom_disk.h>
#include <dev/ata/ata-all.h>
#include <dev/ata/ata-pci.h>
#include <dev/ata/ata-disk.h>
@@ -217,7 +218,6 @@ ad_detach(struct ata_device *atadev, int flush) /* get rid of flush XXX SOS */
{
struct ad_softc *adp = atadev->driver;
struct ad_request *request;
- struct bio *bp;
atadev->flags |= ATA_D_DETACHING;
ata_prtdev(atadev, "removed from configuration\n");
@@ -229,10 +229,7 @@ ad_detach(struct ata_device *atadev, int flush) /* get rid of flush XXX SOS */
biofinish(request->bp, NULL, ENXIO);
ad_free(request);
}
- while ((bp = bioq_first(&adp->queue))) {
- bioq_remove(&adp->queue, bp);
- biofinish(bp, NULL, ENXIO);
- }
+ bioq_flush(&adp->queue, NULL, ENXIO);
disk_destroy(&adp->disk);
if (adp->flags & AD_F_RAID_SUBDISK)
@@ -288,7 +285,7 @@ adstrategy(struct bio *bp)
return;
}
s = splbio();
- bioqdisksort(&adp->queue, bp);
+ bioq_disksort(&adp->queue, bp);
splx(s);
ata_start(adp->device->channel);
}
diff --git a/sys/dev/ata/ata-raid.c b/sys/dev/ata/ata-raid.c
index 9c90281..e895494 100644
--- a/sys/dev/ata/ata-raid.c
+++ b/sys/dev/ata/ata-raid.c
@@ -44,6 +44,7 @@
#include <sys/kthread.h>
#include <machine/bus.h>
#include <sys/rman.h>
+#include <geom/geom_disk.h>
#include <dev/ata/ata-all.h>
#include <dev/ata/ata-pci.h>
#include <dev/ata/ata-disk.h>
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c
index 8e0d5bc..751a2c4 100644
--- a/sys/dev/ata/atapi-cd.c
+++ b/sys/dev/ata/atapi-cd.c
@@ -193,17 +193,13 @@ acddetach(struct ata_device *atadev)
{
struct acd_softc *cdp = atadev->driver;
struct acd_devlist *entry;
- struct bio *bp;
int subdev;
if (cdp->changer_info) {
for (subdev = 0; subdev < cdp->changer_info->slots; subdev++) {
if (cdp->driver[subdev] == cdp)
continue;
- while ((bp = bioq_first(&cdp->driver[subdev]->queue))) {
- bioq_remove(&cdp->driver[subdev]->queue, bp);
- biofinish(bp, NULL, ENXIO);
- }
+ bioq_flush(&cdp->driver[subdev]->queue, NULL, ENXIO);
destroy_dev(cdp->driver[subdev]->dev);
while ((entry = TAILQ_FIRST(&cdp->driver[subdev]->dev_list))) {
destroy_dev(entry->dev);
@@ -217,8 +213,7 @@ acddetach(struct ata_device *atadev)
free(cdp->driver, M_ACD);
free(cdp->changer_info, M_ACD);
}
- while ((bp = bioq_first(&cdp->queue)))
- biofinish(bp, NULL, ENXIO);
+ bioq_flush(&cdp->queue, NULL, ENXIO);
while ((entry = TAILQ_FIRST(&cdp->dev_list))) {
destroy_dev(entry->dev);
TAILQ_REMOVE(&cdp->dev_list, entry, chain);
@@ -1100,7 +1095,7 @@ acdstrategy(struct bio *bp)
bp->bio_resid = bp->bio_bcount;
s = splbio();
- bioqdisksort(&cdp->queue, bp);
+ bioq_disksort(&cdp->queue, bp);
splx(s);
ata_start(cdp->device->channel);
}
diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c
index 0da55dd..5772242 100644
--- a/sys/dev/ata/atapi-fd.c
+++ b/sys/dev/ata/atapi-fd.c
@@ -36,9 +36,9 @@
#include <sys/bio.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <sys/cdio.h>
#include <machine/bus.h>
+#include <geom/geom_disk.h>
#include <dev/ata/ata-all.h>
#include <dev/ata/atapi-all.h>
#include <dev/ata/atapi-fd.h>
@@ -103,12 +103,8 @@ void
afddetach(struct ata_device *atadev)
{
struct afd_softc *fdp = atadev->driver;
- struct bio *bp;
- while ((bp = bioq_first(&fdp->queue))) {
- bioq_remove(&fdp->queue, bp);
- biofinish(bp, NULL, ENXIO);
- }
+ bioq_flush(&fdp->queue, NULL, ENXIO);
disk_destroy(&fdp->disk);
ata_free_name(atadev);
ata_free_lun(&afd_lun_map, fdp->lun);
@@ -283,7 +279,7 @@ afdstrategy(struct bio *bp)
}
s = splbio();
- bioqdisksort(&fdp->queue, bp);
+ bioq_disksort(&fdp->queue, bp);
splx(s);
ata_start(fdp->device->channel);
}
diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c
index 31bf97f..e21a0e6 100644
--- a/sys/dev/ata/atapi-tape.c
+++ b/sys/dev/ata/atapi-tape.c
@@ -145,12 +145,8 @@ void
astdetach(struct ata_device *atadev)
{
struct ast_softc *stp = atadev->driver;
- struct bio *bp;
- while ((bp = bioq_first(&stp->queue))) {
- bioq_remove(&stp->queue, bp);
- biofinish(bp, NULL, ENXIO);
- }
+ bioq_flush(&stp->queue, NULL, ENXIO);
destroy_dev(stp->dev1);
destroy_dev(stp->dev2);
devstat_remove_entry(stp->stats);
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c
index 733fe3d..f56a256 100644
--- a/sys/dev/ccd/ccd.c
+++ b/sys/dev/ccd/ccd.c
@@ -67,6 +67,7 @@
#include <sys/disk.h>
#include <sys/fcntl.h>
#include <sys/vnode.h>
+#include <geom/geom_disk.h>
#include <sys/ccdvar.h>
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 9856420..6c6be92 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -1722,7 +1722,7 @@ fdstrategy(struct bio *bp)
}
bp->bio_pblkno = blknum;
s = splbio();
- bioqdisksort(&fdc->head, bp);
+ bioq_disksort(&fdc->head, bp);
untimeout(fd_turnoff, fd, fd->toffhandle); /* a good idea */
devstat_start_transaction_bio(fd->device_stats, bp);
device_busy(fd->dev);
diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c
index 5cb69a4..c141749 100644
--- a/sys/dev/ida/ida.c
+++ b/sys/dev/ida/ida.c
@@ -46,13 +46,14 @@
#include <sys/bio.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <machine/bus_memio.h>
#include <machine/bus_pio.h>
#include <machine/bus.h>
#include <sys/rman.h>
+#include <geom/geom_disk.h>
+
#include <dev/ida/idareg.h>
#include <dev/ida/idavar.h>
diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c
index 7efb8de..bc82980 100644
--- a/sys/dev/ida/ida_disk.c
+++ b/sys/dev/ida/ida_disk.c
@@ -38,7 +38,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
#include <sys/cons.h>
-#include <sys/disk.h>
#include <machine/bus_memio.h>
#include <machine/bus_pio.h>
@@ -49,6 +48,8 @@
#include <vm/pmap.h>
#include <machine/md_var.h>
+#include <geom/geom_disk.h>
+
#include <dev/ida/idareg.h>
#include <dev/ida/idavar.h>
diff --git a/sys/dev/ida/ida_eisa.c b/sys/dev/ida/ida_eisa.c
index eca4722..a6f3419 100644
--- a/sys/dev/ida/ida_eisa.c
+++ b/sys/dev/ida/ida_eisa.c
@@ -34,13 +34,14 @@
#include <sys/bio.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <machine/bus_pio.h>
#include <machine/bus.h>
#include <machine/resource.h>
#include <sys/rman.h>
+#include <geom/geom_disk.h>
+
#include <dev/ida/idavar.h>
#include <dev/ida/idareg.h>
diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c
index f7194a4..c836de0 100644
--- a/sys/dev/ida/ida_pci.c
+++ b/sys/dev/ida/ida_pci.c
@@ -33,7 +33,6 @@
#include <sys/bio.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <machine/bus_memio.h>
#include <machine/bus_pio.h>
@@ -44,6 +43,8 @@
#include <pci/pcireg.h>
#include <pci/pcivar.h>
+#include <geom/geom_disk.h>
+
#include <dev/ida/idavar.h>
#include <dev/ida/idareg.h>
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c
index cdd6e93..7144f16 100644
--- a/sys/dev/mcd/mcd.c
+++ b/sys/dev/mcd/mcd.c
@@ -334,7 +334,7 @@ mcdstrategy(struct bio *bp)
/* queue it */
s = splbio();
- bioqdisksort(&sc->data.head, bp);
+ bioq_disksort(&sc->data.head, bp);
splx(s);
/* now check whether we can perform processing */
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 0431d3e..958fc98 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -376,7 +376,7 @@ g_md_start(struct bio *bp)
bp->bio_pblkno = bp->bio_offset / sc->secsize;
bp->bio_bcount = bp->bio_length;
mtx_lock(&sc->queue_mtx);
- bioqdisksort(&sc->bio_queue, bp);
+ bioq_disksort(&sc->bio_queue, bp);
mtx_unlock(&sc->queue_mtx);
wakeup(sc);
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index d8841de..b68dd71 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -37,7 +37,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <sys/stat.h>
#include <machine/resource.h>
@@ -47,6 +46,8 @@
#include <machine/clock.h>
#include <sys/rman.h>
+#include <geom/geom_disk.h>
+
#include <dev/mlx/mlx_compat.h>
#include <dev/mlx/mlxio.h>
#include <dev/mlx/mlxvar.h>
diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c
index 0b8664f..44c5965 100644
--- a/sys/dev/mlx/mlx_disk.c
+++ b/sys/dev/mlx/mlx_disk.c
@@ -37,11 +37,12 @@
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <machine/bus.h>
#include <sys/rman.h>
+#include <geom/geom_disk.h>
+
#include <dev/mlx/mlx_compat.h>
#include <dev/mlx/mlxio.h>
#include <dev/mlx/mlxvar.h>
diff --git a/sys/dev/mlx/mlx_pci.c b/sys/dev/mlx/mlx_pci.c
index 4a21246..a2c1792 100644
--- a/sys/dev/mlx/mlx_pci.c
+++ b/sys/dev/mlx/mlx_pci.c
@@ -32,7 +32,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <machine/bus_memio.h>
#include <machine/bus_pio.h>
@@ -40,6 +39,8 @@
#include <machine/resource.h>
#include <sys/rman.h>
+#include <geom/geom_disk.h>
+
#include <pci/pcireg.h>
#include <pci/pcivar.h>
diff --git a/sys/dev/pst/pst-raid.c b/sys/dev/pst/pst-raid.c
index 9e02aac..cb6be12 100644
--- a/sys/dev/pst/pst-raid.c
+++ b/sys/dev/pst/pst-raid.c
@@ -35,7 +35,6 @@
#include <sys/bus.h>
#include <sys/bio.h>
#include <sys/conf.h>
-#include <sys/disk.h>
#include <sys/eventhandler.h>
#include <sys/malloc.h>
#include <sys/lock.h>
@@ -48,6 +47,7 @@
#include <sys/rman.h>
#include <pci/pcivar.h>
#include <pci/pcireg.h>
+#include <geom/geom_disk.h>
#include "dev/pst/pst-iop.h"
@@ -200,7 +200,7 @@ pststrategy(struct bio *bp)
struct pst_softc *psc = bp->bio_disk->d_drv1;
mtx_lock(&psc->mtx);
- bioqdisksort(&psc->queue, bp);
+ bioq_disksort(&psc->queue, bp);
pst_start(psc);
mtx_unlock(&psc->mtx);
}
diff --git a/sys/dev/raidframe/rf_freebsdkintf.c b/sys/dev/raidframe/rf_freebsdkintf.c
index 98374c9..29a88e1 100644
--- a/sys/dev/raidframe/rf_freebsdkintf.c
+++ b/sys/dev/raidframe/rf_freebsdkintf.c
@@ -162,6 +162,7 @@
#include <sys/reboot.h>
#include <sys/module.h>
#include <vm/uma.h>
+#include <geom/geom_disk.h>
#include "opt_raid.h"
#include <dev/raidframe/rf_raid.h>
diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c
index 88e4d07..9a06f8d 100644
--- a/sys/dev/scd/scd.c
+++ b/sys/dev/scd/scd.c
@@ -291,7 +291,7 @@ scdstrategy(struct bio *bp)
/* queue it */
s = splbio();
- bioqdisksort(&sc->data.head, bp);
+ bioq_disksort(&sc->data.head, bp);
splx(s);
/* now check whether we can perform processing */
diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c
index f1f12ae..1a41f16 100644
--- a/sys/dev/twe/twe_freebsd.c
+++ b/sys/dev/twe/twe_freebsd.c
@@ -39,6 +39,7 @@
#include <vm/vm.h>
#include <vm/pmap.h>
#include <dev/twe/twe_compat.h>
+#include <geom/geom_disk.h>
#include <dev/twe/twereg.h>
#include <dev/twe/tweio.h>
#include <dev/twe/twevar.h>
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c
index 733fe3d..f56a256 100644
--- a/sys/geom/geom_ccd.c
+++ b/sys/geom/geom_ccd.c
@@ -67,6 +67,7 @@
#include <sys/disk.h>
#include <sys/fcntl.h>
#include <sys/vnode.h>
+#include <geom/geom_disk.h>
#include <sys/ccdvar.h>
diff --git a/sys/ia64/ia64/sscdisk.c b/sys/ia64/ia64/sscdisk.c
index 966e584..05c8332 100644
--- a/sys/ia64/ia64/sscdisk.c
+++ b/sys/ia64/ia64/sscdisk.c
@@ -105,7 +105,7 @@ sscstrategy(struct bio *bp)
s = splbio();
- bioqdisksort(&sc->bio_queue, bp);
+ bioq_disksort(&sc->bio_queue, bp);
if (sc->busy) {
splx(s);
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index 9856420..6c6be92 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -1722,7 +1722,7 @@ fdstrategy(struct bio *bp)
}
bp->bio_pblkno = blknum;
s = splbio();
- bioqdisksort(&fdc->head, bp);
+ bioq_disksort(&fdc->head, bp);
untimeout(fd_turnoff, fd, fd->toffhandle); /* a good idea */
devstat_start_transaction_bio(fd->device_stats, bp);
device_busy(fd->dev);
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index 5e3aa47..0b5cda1 100644
--- a/sys/pc98/cbus/fdc.c
+++ b/sys/pc98/cbus/fdc.c
@@ -2151,7 +2151,7 @@ fdstrategy(struct bio *bp)
}
bp->bio_pblkno = blknum;
s = splbio();
- bioqdisksort(&fdc->head, bp);
+ bioq_disksort(&fdc->head, bp);
untimeout(fd_turnoff, fd, fd->toffhandle); /* a good idea */
devstat_start_transaction_bio(fd->device_stats, bp);
device_busy(fd->dev);
diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c
index 5e3aa47..0b5cda1 100644
--- a/sys/pc98/pc98/fd.c
+++ b/sys/pc98/pc98/fd.c
@@ -2151,7 +2151,7 @@ fdstrategy(struct bio *bp)
}
bp->bio_pblkno = blknum;
s = splbio();
- bioqdisksort(&fdc->head, bp);
+ bioq_disksort(&fdc->head, bp);
untimeout(fd_turnoff, fd, fd->toffhandle); /* a good idea */
devstat_start_transaction_bio(fd->device_stats, bp);
device_busy(fd->dev);
diff --git a/sys/pc98/pc98/wd.c b/sys/pc98/pc98/wd.c
index ff4e7f7..d4121a9 100644
--- a/sys/pc98/pc98/wd.c
+++ b/sys/pc98/pc98/wd.c
@@ -640,7 +640,7 @@ wdstrategy(struct bio *bp)
du->dk_state = WANTOPEN;
}
- bioqdisksort(&drive_queue[lunit], bp);
+ bioq_disksort(&drive_queue[lunit], bp);
if (wdutab[lunit].b_active == 0)
wdustart(du); /* start drive */
diff --git a/sys/pc98/pc98/wd_cd.c b/sys/pc98/pc98/wd_cd.c
index 21ce10e..4bb2eb8 100644
--- a/sys/pc98/pc98/wd_cd.c
+++ b/sys/pc98/pc98/wd_cd.c
@@ -441,7 +441,7 @@ acdstrategy(struct bio *bp)
bp->bio_resid = bp->bio_bcount;
x = splbio();
- bioqdisksort(&cdp->bio_queue, bp);
+ bioq_disksort(&cdp->bio_queue, bp);
acd_start(cdp);
splx(x);
}
OpenPOWER on IntegriCloud