diff options
author | Scott Long <scottl@FreeBSD.org> | 2020-02-07 09:22:08 +0000 |
---|---|---|
committer | Scott Long <scottl@FreeBSD.org> | 2020-02-07 09:22:08 +0000 |
commit | d176b8039e91164cd25271ff6191a4fb1a03fe97 (patch) | |
tree | d1382f2fb54cb240d3aeda803ae80070bf8ecf13 /sys/dev/ips | |
parent | a2abae8dc92a5778b3405cfbc1f20eaf7a067074 (diff) | |
download | src-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
Diffstat (limited to 'sys/dev/ips')
-rw-r--r-- | sys/dev/ips/ips_disk.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); |