From: Dmitry Fomichev <dmitry.fomichev@wdc.com>
To: kwolf@redhat.com, mreitz@redhat.com, mst@redhat.com,
stefanha@redhat.com, pbonzini@redhat.com, fam@euphon.net,
qemu-block@nongnu.org, qemu-devel@nongnu.org
Cc: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Subject: [Qemu-devel] [PATCH 3/4] virtio-blk: Don't realize zoned block devices
Date: Tue, 9 Jul 2019 16:38:05 -0400 [thread overview]
Message-ID: <20190709203806.17550-4-dmitry.fomichev@wdc.com> (raw)
In-Reply-To: <20190709203806.17550-1-dmitry.fomichev@wdc.com>
Prevent virtio-blk code from attaching a zoned block device because
it will otherwise appear as a reqular block device at the guest and
that will most certainly cause problems.
The functionality to support ZBDs via virtio-blk should be pretty
useful and there are some attempts underway to get it implemented,
but such work will inevitably lead to some modifications in virtio
protocol spec. Therefore, this activity is considered a more
long-term effort.
So for now, we just don't allow zoned block devices to work via
virtio-blk.
Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
---
hw/block/virtio-blk.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index cbb3729158..c11e028308 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -1140,6 +1140,11 @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp)
return;
}
+ if (blk_is_zoned(conf->conf.blk)) {
+ error_setg(errp, "zoned block devices are not supported");
+ return;
+ }
+
if (virtio_has_feature(s->host_features, VIRTIO_BLK_F_DISCARD) &&
(!conf->max_discard_sectors ||
conf->max_discard_sectors > BDRV_REQUEST_MAX_SECTORS)) {
--
2.21.0
next prev parent reply other threads:[~2019-07-09 20:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-09 20:38 [Qemu-devel] [PATCH 0/4] virtio: handle zoned backing devices Dmitry Fomichev
2019-07-09 20:38 ` [Qemu-devel] [PATCH 1/4] block: Add zoned device model property Dmitry Fomichev
2019-07-09 20:38 ` [Qemu-devel] [PATCH 2/4] raw: Recognize zoned backing devices Dmitry Fomichev
2019-07-09 20:38 ` Dmitry Fomichev [this message]
2019-07-09 20:38 ` [Qemu-devel] [PATCH 4/4] hw/scsi: Don't realize zoned block devices for virtio-scsi legacy drivers Dmitry Fomichev
2019-07-10 10:09 ` [Qemu-devel] [PATCH 0/4] virtio: handle zoned backing devices Paolo Bonzini
2019-07-10 11:02 ` Kevin Wolf
2019-07-10 11:33 ` Paolo Bonzini
2019-07-10 21:09 ` Kevin Wolf
2019-07-11 0:52 ` Dmitry Fomichev
2019-07-11 8:04 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190709203806.17550-4-dmitry.fomichev@wdc.com \
--to=dmitry.fomichev@wdc.com \
--cc=fam@euphon.net \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).