aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2020-02-07 09:22:08 +0000
committerScott Long <scottl@FreeBSD.org>2020-02-07 09:22:08 +0000
commitd176b8039e91164cd25271ff6191a4fb1a03fe97 (patch)
treed1382f2fb54cb240d3aeda803ae80070bf8ecf13
parenta2abae8dc92a5778b3405cfbc1f20eaf7a067074 (diff)
downloadsrc-d176b8039e91164cd25271ff6191a4fb1a03fe97.tar.gz
src-d176b8039e91164cd25271ff6191a4fb1a03fe97.zip
Ever since the block layer expanded its command syntax beyond just
BIO_READ and BIO_WRITE, we've handled this expanded syntax poorly in drivers when the driver doesn't support a particular command. Do a sweep and fix that. Reported by: imp
Notes
Notes: svn path=/head/; revision=357647
-rw-r--r--sys/cam/ata/ata_da.c4
-rw-r--r--sys/cam/mmc/mmc_da.c4
-rw-r--r--sys/cam/nvme/nvme_da.c5
-rw-r--r--sys/cam/scsi/scsi_cd.c7
-rw-r--r--sys/cam/scsi/scsi_da.c4
-rw-r--r--sys/cam/scsi/scsi_sa.c6
-rw-r--r--sys/dev/aac/aac_disk.c5
-rw-r--r--sys/dev/altera/avgen/altera_avgen.c10
-rw-r--r--sys/dev/altera/sdcard/altera_sdcard_io.c22
-rw-r--r--sys/dev/amr/amr.c4
-rw-r--r--sys/dev/cfi/cfi_disk.c16
-rw-r--r--sys/dev/flash/at45d.c2
-rw-r--r--sys/dev/flash/mx25l.c2
-rw-r--r--sys/dev/flash/n25q.c2
-rw-r--r--sys/dev/ida/ida_disk.c5
-rw-r--r--sys/dev/ips/ips_disk.c7
-rw-r--r--sys/dev/mfi/mfi.c8
-rw-r--r--sys/dev/mlx/mlx_disk.c5
-rw-r--r--sys/dev/mmc/mmcsd.c7
-rw-r--r--sys/dev/nvme/nvme_ns.c2
-rw-r--r--sys/dev/pst/pst-raid.c14
-rw-r--r--sys/dev/twe/twe.c6
-rw-r--r--sys/dev/virtio/block/virtio_blk.c6
-rw-r--r--sys/dev/xen/blkfront/blkfront.c4
24 files changed, 118 insertions, 39 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index 39b8bc77c70f..fd8bb6e427f6 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -2430,6 +2430,10 @@ adastart(struct cam_periph *periph, union ccb *start_ccb)
}
break;
}
+ default:
+ biofinish(bp, NULL, EOPNOTSUPP);
+ xpt_release_ccb(start_ccb);
+ return;
}
start_ccb->ccb_h.ccb_state = ADA_CCB_BUFFER_IO;
start_ccb->ccb_h.flags |= CAM_UNLOCKED;
diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c
index b5f8a106c679..1132bf8ba86d 100644
--- a/sys/cam/mmc/mmc_da.c
+++ b/sys/cam/mmc/mmc_da.c
@@ -1834,6 +1834,10 @@ sddastart(struct cam_periph *periph, union ccb *start_ccb)
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("BIO_DELETE\n"));
sddaschedule(periph);
break;
+ default:
+ biofinish(bp, NULL, EOPNOTSUPP);
+ xpt_release_ccb(start_ccb);
+ return;
}
start_ccb->ccb_h.ccb_bp = bp;
softc->outstanding_cmds++;
diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c
index b17983eff541..1af306206637 100644
--- a/sys/cam/nvme/nvme_da.c
+++ b/sys/cam/nvme/nvme_da.c
@@ -994,6 +994,11 @@ ndastart(struct cam_periph *periph, union ccb *start_ccb)
case BIO_FLUSH:
nda_nvme_flush(softc, nvmeio);
break;
+ default:
+ biofinish(bp, NULL, EOPNOTSUPP);
+ xpt_release_ccb(start_ccb);
+ ndaschedule(periph);
+ return;
}
start_ccb->ccb_state = NDA_CCB_BUFFER_IO;
start_ccb->ccb_bp = bp;
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index 8b8a7e9e164d..ea178f9314ce 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -927,6 +927,13 @@ cdstart(struct cam_periph *periph, union ccb *start_ccb)
}
bioq_remove(&softc->bio_queue, bp);
+ if ((bp->bio_cmd != BIO_READ) &&
+ (bp->bio_cmd != BIO_WRITE)) {
+ biofinish(bp, NULL, EOPNOTSUPP);
+ xpt_release_ccb(start_ccb);
+ return;
+ }
+
scsi_read_write(&start_ccb->csio,
/*retries*/ cd_retry_count,
/* cbfcnp */ cddone,
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index d4d85016e298..cadc438b60e0 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -3381,6 +3381,10 @@ more:
}
break;
}
+ default:
+ biofinish(bp, NULL, EOPNOTSUPP);
+ xpt_release_ccb(start_ccb);
+ return;
}
start_ccb->ccb_h.ccb_state = DA_CCB_BUFFER_IO;
start_ccb->ccb_h.flags |= CAM_UNLOCKED;
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index 4b71a4179efc..dbe81d758be0 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -2683,6 +2683,12 @@ again:
bioq_remove(&softc->bio_queue, bp);
softc->queue_count--;
+ if ((bp->bio_cmd != BIO_READ) &&
+ (bp->bio_cmd != BIO_WRITE)) {
+ biofinish(bp, NULL, EOPNOTSUPP);
+ xpt_release_ccb(start_ccb);
+ return;
+ }
length = bp->bio_bcount;
if ((softc->flags & SA_FLAG_FIXED) != 0) {
diff --git a/sys/dev/aac/aac_disk.c b/sys/dev/aac/aac_disk.c
index 1a547ed039ab..284c1472d7ea 100644
--- a/sys/dev/aac/aac_disk.c
+++ b/sys/dev/aac/aac_disk.c
@@ -163,6 +163,11 @@ aac_disk_strategy(struct bio *bp)
return;
}
+ if ((bp->bio_cmd != BIO_READ) && (bp->bio_cmd != BIO_WRITE)) {
+ biofinish(bp, NULL, EOPNOTSUPP);
+ return;
+ }
+
/* perform accounting */
/* pass the bio to the controller - it can work out who we are */
diff --git a/sys/dev/altera/avgen/altera_avgen.c b/sys/dev/altera/avgen/altera_avgen.c
index 86f45ea42f4a..d7dd7d29b1e0 100644
--- a/sys/dev/altera/avgen/altera_avgen.c
+++ b/sys/dev/altera/avgen/altera_avgen.c
@@ -252,11 +252,13 @@ altera_avgen_disk_strategy(struct bio *bp)
void *data;
long bcount;
daddr_t pblkno;
+ int error;
sc = bp->bio_disk->d_drv1;
data = bp->bio_data;
bcount = bp->bio_bcount;
pblkno = bp->bio_pblkno;
+ error = 0;
/*
* Serialize block reads / writes.
@@ -265,7 +267,7 @@ altera_avgen_disk_strategy(struct bio *bp)
switch (bp->bio_cmd) {
case BIO_READ:
if (!(sc->avg_flags & ALTERA_AVALON_FLAG_GEOM_READ)) {
- biofinish(bp, NULL, EIO);
+ error = EROFS;
break;
}
switch (sc->avg_width) {
@@ -324,11 +326,11 @@ altera_avgen_disk_strategy(struct bio *bp)
break;
default:
- panic("%s: unsupported I/O operation %d", __func__,
- bp->bio_cmd);
+ error = EOPNOTSUPP;
+ break;
}
mtx_unlock(&sc->avg_disk_mtx);
- biofinish(bp, NULL, 0);
+ biofinish(bp, NULL, error);
}
static int
diff --git a/sys/dev/altera/sdcard/altera_sdcard_io.c b/sys/dev/altera/sdcard/altera_sdcard_io.c
index dc1b615bd60a..546e0af2b907 100644
--- a/sys/dev/altera/sdcard/altera_sdcard_io.c
+++ b/sys/dev/altera/sdcard/altera_sdcard_io.c
@@ -293,27 +293,27 @@ recheck:
}
static void
-altera_sdcard_io_start_internal(struct altera_sdcard_softc *sc, struct bio *bp)
+altera_sdcard_io_start_internal(struct altera_sdcard_softc *sc, struct bio **bp)
{
- switch (bp->bio_cmd) {
+ switch (*bp->bio_cmd) {
case BIO_READ:
- altera_sdcard_write_cmd_arg(sc, bp->bio_pblkno *
+ altera_sdcard_write_cmd_arg(sc, *bp->bio_pblkno *
ALTERA_SDCARD_SECTORSIZE);
altera_sdcard_write_cmd(sc, ALTERA_SDCARD_CMD_READ_BLOCK);
break;
case BIO_WRITE:
- altera_sdcard_write_rxtx_buffer(sc, bp->bio_data,
- bp->bio_bcount);
- altera_sdcard_write_cmd_arg(sc, bp->bio_pblkno *
+ altera_sdcard_write_rxtx_buffer(sc, *bp->bio_data,
+ *bp->bio_bcount);
+ altera_sdcard_write_cmd_arg(sc, *bp->bio_pblkno *
ALTERA_SDCARD_SECTORSIZE);
altera_sdcard_write_cmd(sc, ALTERA_SDCARD_CMD_WRITE_BLOCK);
break;
default:
- panic("%s: unsupported I/O operation %d", __func__,
- bp->bio_cmd);
+ biofinish(*bp, NULL, EOPNOTSUPP);
+ *bp = NULL;
}
}
@@ -332,8 +332,8 @@ altera_sdcard_io_start(struct altera_sdcard_softc *sc, struct bio *bp)
*/
KASSERT(bp->bio_bcount == ALTERA_SDCARD_SECTORSIZE,
("%s: I/O size not %d", __func__, ALTERA_SDCARD_SECTORSIZE));
- altera_sdcard_io_start_internal(sc, bp);
- sc->as_currentbio = bp;
+ altera_sdcard_io_start_internal(sc, &bp);
+ sc->as_currentbio = *bp;
sc->as_retriesleft = ALTERA_SDCARD_RETRY_LIMIT;
}
@@ -406,7 +406,7 @@ altera_sdcard_io_complete(struct altera_sdcard_softc *sc, uint16_t asr)
*/
if (sc->as_retriesleft != 0) {
sc->as_flags |= ALTERA_SDCARD_FLAG_IOERROR;
- altera_sdcard_io_start_internal(sc, bp);
+ altera_sdcard_io_start_internal(sc, &bp);
return (0);
}
sc->as_flags &= ~ALTERA_SDCARD_FLAG_IOERROR;
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index 375fa6c533e5..2e77c3e4befc 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -1315,6 +1315,10 @@ amr_bio_command(struct amr_softc *sc, struct amr_command **acp)
ac->ac_flags |= AMR_CMD_PRIORITY | AMR_CMD_DATAOUT;
cmd = AMR_CMD_FLUSH;
break;
+ default:
+ biofinish(bio, NULL, EOPNOTSUPP);
+ amr_releasecmd(ac);
+ return (0);
}
amrd = (struct amrd_softc *)bio->bio_disk->d_drv1;
driveno = amrd->amrd_drive - sc->amr_drive;
diff --git a/sys/dev/cfi/cfi_disk.c b/sys/dev/cfi/cfi_disk.c
index c09946634b08..08aef986b257 100644
--- a/sys/dev/cfi/cfi_disk.c
+++ b/sys/dev/cfi/cfi_disk.c
@@ -315,8 +315,10 @@ cfi_disk_strategy(struct bio *bp)
{
struct cfi_disk_softc *sc = bp->bio_disk->d_drv1;
- if (sc == NULL)
- goto invalid;
+ if (sc == NULL) {
+ biofinish(bp, NULL, EINVAL);
+ return;
+ }
if (bp->bio_bcount == 0) {
bp->bio_resid = bp->bio_bcount;
biodone(bp);
@@ -330,13 +332,11 @@ cfi_disk_strategy(struct bio *bp)
bioq_insert_tail(&sc->bioq, bp);
mtx_unlock(&sc->qlock);
taskqueue_enqueue(sc->tq, &sc->iotask);
- return;
+ break;
+ default:
+ biofinish(bp, NULL, EOPNOTSUPP);
+ break;
}
- /* fall thru... */
-invalid:
- bp->bio_flags |= BIO_ERROR;
- bp->bio_error = EINVAL;
- biodone(bp);
}
static int
diff --git a/sys/dev/flash/at45d.c b/sys/dev/flash/at45d.c
index c5339576c3d1..2c7402dbbe82 100644
--- a/sys/dev/flash/at45d.c
+++ b/sys/dev/flash/at45d.c
@@ -493,7 +493,7 @@ at45d_task(void *arg)
len = sc->pagesize - offset;
break;
default:
- berr = EINVAL;
+ berr = EOPNOTSUPP;
goto out;
}
diff --git a/sys/dev/flash/mx25l.c b/sys/dev/flash/mx25l.c
index 3d146882eea7..916829dc6c97 100644
--- a/sys/dev/flash/mx25l.c
+++ b/sys/dev/flash/mx25l.c
@@ -658,7 +658,7 @@ mx25l_task(void *arg)
bp->bio_data, bp->bio_bcount);
break;
default:
- bp->bio_error = EINVAL;
+ bp->bio_error = EOPNOTSUPP;
}
diff --git a/sys/dev/flash/n25q.c b/sys/dev/flash/n25q.c
index b885da983fcb..cf7bfeef1ee1 100644
--- a/sys/dev/flash/n25q.c
+++ b/sys/dev/flash/n25q.c
@@ -462,7 +462,7 @@ n25q_task(void *arg)
bp->bio_data, bp->bio_bcount);
break;
default:
- bp->bio_error = EINVAL;
+ bp->bio_error = EOPNOTSUPP;
}
biodone(bp);
diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c
index c38b3795e219..db84f905ff50 100644
--- a/sys/dev/ida/ida_disk.c
+++ b/sys/dev/ida/ida_disk.c
@@ -106,6 +106,11 @@ idad_strategy(struct bio *bp)
goto bad;
}
+ if ((bp->bio_cmd != BIO_READ) && (bp->bio_cmd != BIO_WRITE)) {
+ bp->bio_error = EOPNOTSUPP;
+ goto bad;
+ }
+
bp->bio_driver1 = drv;
ida_submit_buf(drv->controller, bp);
return;
diff --git a/sys/dev/ips/ips_disk.c b/sys/dev/ips/ips_disk.c
index 1d2732260792..7ae489ea8201 100644
--- a/sys/dev/ips/ips_disk.c
+++ b/sys/dev/ips/ips_disk.c
@@ -109,6 +109,13 @@ static void ipsd_strategy(struct bio *iobuf)
dsc = iobuf->bio_disk->d_drv1;
DEVICE_PRINTF(8,dsc->dev,"in strategy\n");
iobuf->bio_driver1 = (void *)(uintptr_t)dsc->sc->drives[dsc->disk_number].drivenum;
+
+ if ((iobuf->bio_cmd != BIO_READ) &&
+ (iobuf->bio_cmd != BIO_WRITE)) {
+ biofinish(iobuf, NULL, EOPNOTSUPP);
+ return;
+ }
+
mtx_lock(&dsc->sc->queue_mtx);
bioq_insert_tail(&dsc->sc->queue, iobuf);
ips_start_io_request(dsc->sc);
diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c
index 96c63fa3eb61..46fe586e0b5f 100644
--- a/sys/dev/mfi/mfi.c
+++ b/sys/dev/mfi/mfi.c
@@ -2152,7 +2152,9 @@ mfi_build_syspdio(struct mfi_softc *sc, struct bio *bio)
break;
default:
/* TODO: what about BIO_DELETE??? */
- panic("Unsupported bio command %x\n", bio->bio_cmd);
+ biofinish(bio, NULL, EOPNOTSUPP);
+ mfi_enqueue_free(cm);
+ return (NULL);
}
/* Cheat with the sector length to avoid a non-constant division */
@@ -2211,7 +2213,9 @@ mfi_build_ldio(struct mfi_softc *sc, struct bio *bio)
break;
default:
/* TODO: what about BIO_DELETE??? */
- panic("Unsupported bio command %x\n", bio->bio_cmd);
+ biofinish(bio, NULL, EOPNOTSUPP);
+ mfi_enqueue_free(cm);
+ return (NULL);
}
/* Cheat with the sector length to avoid a non-constant division */
diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c
index 1fb0a27c9da7..bc487d1330a0 100644
--- a/sys/dev/mlx/mlx_disk.c
+++ b/sys/dev/mlx/mlx_disk.c
@@ -157,6 +157,11 @@ mlxd_strategy(struct bio *bp)
goto bad;
}
+ if ((bp->bio_cmd != BIO_READ) && (bp->bio_cmd != BIO_WRITE)) {
+ bp->bio_error = EOPNOTSUPP;
+ goto bad;
+ }
+
/* XXX may only be temporarily offline - sleep? */
MLX_IO_LOCK(sc->mlxd_controller);
if (sc->mlxd_drive->ms_state == MLX_SYSD_OFFLINE) {
diff --git a/sys/dev/mmc/mmcsd.c b/sys/dev/mmc/mmcsd.c
index dcb8290b821e..f9637ac4427f 100644
--- a/sys/dev/mmc/mmcsd.c
+++ b/sys/dev/mmc/mmcsd.c
@@ -1431,7 +1431,7 @@ mmcsd_task(void *arg)
struct mmcsd_softc *sc;
struct bio *bp;
device_t dev, mmcbus;
- int err, sz;
+ int bio_error, err, sz;
part = arg;
sc = part->sc;
@@ -1482,11 +1482,14 @@ mmcsd_task(void *arg)
block = mmcsd_rw(part, bp);
} else if (bp->bio_cmd == BIO_DELETE) {
block = mmcsd_delete(part, bp);
+ } else {
+ bio_error = EOPNOTSUPP;
+ goto release;
}
release:
MMCBUS_RELEASE_BUS(mmcbus, dev);
if (block < end) {
- bp->bio_error = EIO;
+ bp->bio_error = (bio_error == 0) ? EIO : bio_error;
bp->bio_resid = (end - block) * sz;
bp->bio_flags |= BIO_ERROR;
} else {
diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c
index 006d059257c4..dd5465f9377f 100644
--- a/sys/dev/nvme/nvme_ns.c
+++ b/sys/dev/nvme/nvme_ns.c
@@ -488,7 +488,7 @@ nvme_ns_bio_process(struct nvme_namespace *ns, struct bio *bp,
free(dsm_range, M_NVME);
break;
default:
- err = EIO;
+ err = EOPNOTSUPP;
break;
}
diff --git a/sys/dev/pst/pst-raid.c b/sys/dev/pst/pst-raid.c
index 2c16064981ab..eda4dd4022f6 100644
--- a/sys/dev/pst/pst-raid.c
+++ b/sys/dev/pst/pst-raid.c
@@ -214,6 +214,7 @@ pst_start(struct pst_softc *psc)
struct pst_request *request;
struct bio *bp;
u_int32_t mfa;
+ int error;
if (psc->iop->outstanding < (I2O_IOP_OUTBOUND_FRAME_COUNT - 1) &&
(bp = bioq_first(&psc->queue))) {
@@ -231,8 +232,8 @@ pst_start(struct pst_softc *psc)
request->psc = psc;
request->mfa = mfa;
request->bp = bp;
- if (pst_rw(request)) {
- biofinish(request->bp, NULL, EIO);
+ if ((error = pst_rw(request)) != 0) {
+ biofinish(request->bp, NULL, error);
iop_free_mfa(request->psc->iop, request->mfa);
psc->iop->outstanding--;
free(request, M_PSTRAID);
@@ -286,7 +287,7 @@ pst_rw(struct pst_request *request)
break;
default:
printf("pst: unknown command type 0x%02x\n", request->bp->bio_cmd);
- return -1;
+ return EOPNOTSUPP;
}
msg->initiator_context = (u_int32_t)pst_done;
msg->transaction_context = (u_int32_t)request;
@@ -296,7 +297,7 @@ pst_rw(struct pst_request *request)
if (!iop_create_sgl((struct i2o_basic_message *)msg, request->bp->bio_data,
request->bp->bio_bcount, sgl_flag))
- return -1;
+ return EIO;
request->psc->iop->reg->iqueue = request->mfa;
@@ -309,6 +310,7 @@ static void
pst_timeout(void *arg)
{
struct pst_request *request;
+ int error;
request = arg;
printf("pst: timeout mfa=0x%08x cmd=0x%02x\n",
@@ -321,9 +323,9 @@ pst_timeout(void *arg)
request->psc->iop->outstanding--;
return;
}
- if (pst_rw(request)) {
+ if ((error = pst_rw(request)) != 0) {
iop_free_mfa(request->psc->iop, request->mfa);
- biofinish(request->bp, NULL, EIO);
+ biofinish(request->bp, NULL, error);
request->psc->iop->outstanding--;
}
}
diff --git a/sys/dev/twe/twe.c b/sys/dev/twe/twe.c
index 1419d4ffa836..97778ad839b8 100644
--- a/sys/dev/twe/twe.c
+++ b/sys/dev/twe/twe.c
@@ -439,9 +439,13 @@ twe_startio(struct twe_softc *sc)
if (bp->bio_cmd == BIO_READ) {
tr->tr_flags |= TWE_CMD_DATAIN;
cmd->io.opcode = TWE_OP_READ;
- } else {
+ } else if (bp->bio_cmd == BIO_WRITE) {
tr->tr_flags |= TWE_CMD_DATAOUT;
cmd->io.opcode = TWE_OP_WRITE;
+ } else {
+ twe_release_request(tr);
+ biofinish(bp, NULL, EOPNOTSUPP);
+ break;
}
/* build a suitable I/O command (assumes 512-byte rounded transfers) */
diff --git a/sys/dev/virtio/block/virtio_blk.c b/sys/dev/virtio/block/virtio_blk.c
index c36271d47f97..94ad4196155f 100644
--- a/sys/dev/virtio/block/virtio_blk.c
+++ b/sys/dev/virtio/block/virtio_blk.c
@@ -549,6 +549,12 @@ vtblk_strategy(struct bio *bp)
return;
}
+ if ((bp->bio_cmd != BIO_READ) && (bp->bio_cmd != BIO_WRITE) &&
+ (bp->bio_cmd != BIO_FLUSH)) {
+ vtblk_bio_done(sc, bp, EOPNOTSUPP);
+ return;
+ }
+
VTBLK_LOCK(sc);
if (sc->vtblk_flags & VTBLK_FLAG_DETACH) {
diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c
index ae82f0cd022b..d20fc32e66b6 100644
--- a/sys/dev/xen/blkfront/blkfront.c
+++ b/sys/dev/xen/blkfront/blkfront.c
@@ -399,7 +399,9 @@ xbd_bio_command(struct xbd_softc *sc)
panic("flush request, but no flush support available");
break;
default:
- panic("unknown bio command %d", bp->bio_cmd);
+ biofinish(bp, NULL, EOPNOTSUPP);
+ xbd_enqueue_cm(cm, XBD_Q_FREE);
+ return (NULL);
}
return (cm);