[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PATCH 4/4] hw/scsi: Don't realize zoned block devices for

From: Dmitry Fomichev
Subject: [Qemu-block] [PATCH 4/4] hw/scsi: Don't realize zoned block devices for virtio-scsi legacy drivers
Date: Tue, 9 Jul 2019 16:38:06 -0400

From: Shin'ichiro Kawasaki <address@hidden>

Prevent scsi-hd and scsi-disk drivers from attaching a zoned block device
because it will appear as a regular block device at the guest and will
most certainly cause problems.

The functionality to support ZBDs is not planned for scsi-hd and
scsi-disk legacy drivers. It is supported via scsi-generic driver already
and discussion is ongoing for scsi-block driver.

Signed-off-by: Shin'ichiro Kawasaki <address@hidden>
 hw/scsi/scsi-disk.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index ed7295bfd7..80682a61fb 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -2401,6 +2401,11 @@ static void scsi_hd_realize(SCSIDevice *dev, Error 
      * backend will be issued in scsi_realize
     if (s->qdev.conf.blk) {
+        if (blk_is_zoned(s->qdev.conf.blk)) {
+            error_setg(errp, "zoned block devices are not supported");
+            return;
+        }
         ctx = blk_get_aio_context(s->qdev.conf.blk);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]