From 891619a66d5e01e5d5db6a11cfd7f26c815338e3 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 1 Apr 2003 15:06:26 +0000 Subject: [PATCH] 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 where this is more appropriate. --- sys/cam/scsi/scsi_cd.c | 16 +++------------- sys/cam/scsi/scsi_da.c | 20 +++++--------------- sys/cam/scsi/scsi_pt.c | 16 ++-------------- sys/cam/scsi/scsi_sa.c | 14 ++------------ sys/contrib/dev/fla/fla.c | 4 ++-- sys/dev/aac/aac.c | 2 +- sys/dev/aac/aac_debug.c | 3 +-- sys/dev/aac/aacvar.h | 2 ++ sys/dev/amr/amr.c | 1 - sys/dev/amr/amr_cam.c | 1 - sys/dev/amr/amr_disk.c | 1 - sys/dev/amr/amr_pci.c | 1 - sys/dev/amr/amrvar.h | 1 + sys/dev/ata/ata-all.c | 2 +- sys/dev/ata/ata-disk.c | 9 +++------ sys/dev/ata/ata-raid.c | 1 + sys/dev/ata/atapi-cd.c | 11 +++-------- sys/dev/ata/atapi-fd.c | 10 +++------- sys/dev/ata/atapi-tape.c | 6 +----- sys/dev/ccd/ccd.c | 1 + sys/dev/fdc/fdc.c | 2 +- sys/dev/ida/ida.c | 3 ++- sys/dev/ida/ida_disk.c | 3 ++- sys/dev/ida/ida_eisa.c | 3 ++- sys/dev/ida/ida_pci.c | 3 ++- sys/dev/mcd/mcd.c | 2 +- sys/dev/md/md.c | 2 +- sys/dev/mlx/mlx.c | 3 ++- sys/dev/mlx/mlx_disk.c | 3 ++- sys/dev/mlx/mlx_pci.c | 3 ++- sys/dev/pst/pst-raid.c | 4 ++-- sys/dev/raidframe/rf_freebsdkintf.c | 1 + sys/dev/scd/scd.c | 2 +- sys/dev/twe/twe_freebsd.c | 1 + sys/geom/geom_ccd.c | 1 + sys/ia64/ia64/sscdisk.c | 2 +- sys/isa/fd.c | 2 +- sys/pc98/cbus/fdc.c | 2 +- sys/pc98/pc98/fd.c | 2 +- sys/pc98/pc98/wd.c | 2 +- sys/pc98/pc98/wd_cd.c | 2 +- 41 files changed, 61 insertions(+), 109 deletions(-) diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 66b18f0d8ac1..2fe1e16120a2 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 bdb827654e78..05402b3a1d82 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -43,7 +43,6 @@ #include #include -#include #include #include #include @@ -53,6 +52,8 @@ #include #include +#include + #ifndef _KERNEL #include #include @@ -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 280093ad703e..63bb15a57a8d 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 acf5acfb8859..e81b110c5b73 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 8a0134112f32..789db7856c2e 100644 --- a/sys/contrib/dev/fla/fla.c +++ b/sys/contrib/dev/fla/fla.c @@ -17,9 +17,9 @@ #include #include #include -#include #include #include +#include #include #include @@ -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 43fdc91b87a6..5f5f427be620 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -43,10 +43,10 @@ #include #include #include +#include #include #include -#include #include #include #include diff --git a/sys/dev/aac/aac_debug.c b/sys/dev/aac/aac_debug.c index 5f02391e553d..78ae942dbf44 100644 --- a/sys/dev/aac/aac_debug.c +++ b/sys/dev/aac/aac_debug.c @@ -39,13 +39,12 @@ #include #include -#include #include -#include #include #include +#include #include #include #include diff --git a/sys/dev/aac/aacvar.h b/sys/dev/aac/aacvar.h index 1d6ab1594b95..1ff5411222ae 100644 --- a/sys/dev/aac/aacvar.h +++ b/sys/dev/aac/aacvar.h @@ -34,6 +34,8 @@ #include #include #include +#include + /* * Driver Parameter Definitions diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index 170ff988c552..29e0a301d8f8 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -68,7 +68,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/amr/amr_cam.c b/sys/dev/amr/amr_cam.c index 1c8f6b6a74db..d30c9647116a 100644 --- a/sys/dev/amr/amr_cam.c +++ b/sys/dev/amr/amr_cam.c @@ -64,7 +64,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/amr/amr_disk.c b/sys/dev/amr/amr_disk.c index 4266f15554c6..e7a9bbe56e7a 100644 --- a/sys/dev/amr/amr_disk.c +++ b/sys/dev/amr/amr_disk.c @@ -68,7 +68,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c index caffc5dd0aaf..eacb1bd41f19 100644 --- a/sys/dev/amr/amr_pci.c +++ b/sys/dev/amr/amr_pci.c @@ -63,7 +63,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/amr/amrvar.h b/sys/dev/amr/amrvar.h index a9bca40588b7..a28fa473b021 100644 --- a/sys/dev/amr/amrvar.h +++ b/sys/dev/amr/amrvar.h @@ -58,6 +58,7 @@ #if __FreeBSD_version >= 500005 # include +# include #endif #ifdef AMR_DEBUG diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 8674a93374bb..867670a83c21 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -47,6 +46,7 @@ #ifdef __alpha__ #include #endif +#include #include #include #include diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index c7d80cbd2347..9801c250f9c2 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -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 9c9028147afd..e8954940c2b5 100644 --- a/sys/dev/ata/ata-raid.c +++ b/sys/dev/ata/ata-raid.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index 8e0d5bc947af..751a2c4c1956 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 0da55dda4ac6..5772242b330f 100644 --- a/sys/dev/ata/atapi-fd.c +++ b/sys/dev/ata/atapi-fd.c @@ -36,9 +36,9 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -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 31bf97f90eb3..e21a0e68294e 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 733fe3daa4a6..f56a256dc3a9 100644 --- a/sys/dev/ccd/ccd.c +++ b/sys/dev/ccd/ccd.c @@ -67,6 +67,7 @@ #include #include #include +#include #include diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 985642076bdd..6c6be9243aa5 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 5cb69a470633..c1417495d206 100644 --- a/sys/dev/ida/ida.c +++ b/sys/dev/ida/ida.c @@ -46,13 +46,14 @@ #include #include #include -#include #include #include #include #include +#include + #include #include diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c index 7efb8deceb68..bc829802d210 100644 --- a/sys/dev/ida/ida_disk.c +++ b/sys/dev/ida/ida_disk.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include @@ -49,6 +48,8 @@ #include #include +#include + #include #include diff --git a/sys/dev/ida/ida_eisa.c b/sys/dev/ida/ida_eisa.c index eca47224cdb2..a6f3419e408c 100644 --- a/sys/dev/ida/ida_eisa.c +++ b/sys/dev/ida/ida_eisa.c @@ -34,13 +34,14 @@ #include #include -#include #include #include #include #include +#include + #include #include diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c index f7194a489045..c836de0634a3 100644 --- a/sys/dev/ida/ida_pci.c +++ b/sys/dev/ida/ida_pci.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -44,6 +43,8 @@ #include #include +#include + #include #include diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index cdd6e93c69b3..7144f16c64b1 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 0431d3e26b9f..958fc9856d34 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 d8841de676ca..b68dd71be133 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -37,7 +37,6 @@ #include #include -#include #include #include @@ -47,6 +46,8 @@ #include #include +#include + #include #include #include diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c index 0b8664fdee9c..44c596531b77 100644 --- a/sys/dev/mlx/mlx_disk.c +++ b/sys/dev/mlx/mlx_disk.c @@ -37,11 +37,12 @@ #include #include -#include #include #include +#include + #include #include #include diff --git a/sys/dev/mlx/mlx_pci.c b/sys/dev/mlx/mlx_pci.c index 4a2124698805..a2c179268fa3 100644 --- a/sys/dev/mlx/mlx_pci.c +++ b/sys/dev/mlx/mlx_pci.c @@ -32,7 +32,6 @@ #include #include -#include #include #include @@ -40,6 +39,8 @@ #include #include +#include + #include #include diff --git a/sys/dev/pst/pst-raid.c b/sys/dev/pst/pst-raid.c index 9e02aac6a9e5..cb6be1267993 100644 --- a/sys/dev/pst/pst-raid.c +++ b/sys/dev/pst/pst-raid.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -48,6 +47,7 @@ #include #include #include +#include #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 98374c9f91a2..29a88e179d9e 100644 --- a/sys/dev/raidframe/rf_freebsdkintf.c +++ b/sys/dev/raidframe/rf_freebsdkintf.c @@ -162,6 +162,7 @@ #include #include #include +#include #include "opt_raid.h" #include diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c index 88e4d07660b8..9a06f8d13bbc 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 f1f12aef0542..1a41f16cfee6 100644 --- a/sys/dev/twe/twe_freebsd.c +++ b/sys/dev/twe/twe_freebsd.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index 733fe3daa4a6..f56a256dc3a9 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -67,6 +67,7 @@ #include #include #include +#include #include diff --git a/sys/ia64/ia64/sscdisk.c b/sys/ia64/ia64/sscdisk.c index 966e584383f7..05c8332ee577 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 985642076bdd..6c6be9243aa5 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 5e3aa47bcf57..0b5cda16e9c2 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 5e3aa47bcf57..0b5cda16e9c2 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 ff4e7f7f42f2..d4121a929682 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 21ce10e24ee6..4bb2eb843c83 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); }