From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: fam@euphon.net, qemu-block@nongnu.org, mst@redhat.com,
Dmitry Fomichev <dmitry.fomichev@wdc.com>,
qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 0/4] virtio: handle zoned backing devices
Date: Wed, 10 Jul 2019 13:02:41 +0200 [thread overview]
Message-ID: <20190710110241.GB6501@localhost.localdomain> (raw)
In-Reply-To: <f790cb77-fa6a-c304-bc7f-62bbede78751@redhat.com>
Am 10.07.2019 um 12:09 hat Paolo Bonzini geschrieben:
> On 09/07/19 22:38, Dmitry Fomichev wrote:
> > Currently, attaching zoned block devices (i.e. storage devices
> > compliant to ZAC/ZBC standards) using several virtio methods doesn't
> > work - the zoned devices appear as regular block devices at the guest.
> > This may cause unexpected i/o errors and, potentially, some data
> > corruption.
> >
> > To be more precise, attaching a zoned device via virtio-pci-blk,
> > virtio-scsi-pci/scsi-disk or virtio-scsi-pci/scsi-hd demonstrates the
> > above behavior. A simple fix is needed to make
> > virtio-scsi-pci/scsi-block work and this is covered by a different
> > patch. The virtio-scsi-pci/scsi-generic method appears to handle zoned
> > devices without problems.
>
> The problem with this approach is that other devices (e.g. ide-hd or sd
> card) also break with zoned devices and the only way to fix it would be
> to add code denying zoned block devices to all of them.
>
> The question then becomes how to define a whitelist. One possiblity is
> to add a QOM interface (for example TYPE_ZONED_BLOCK_SUPPORT) to
> scsi-block and scsi-generic. In do_parse_drive you can query the
> BlockBackend with bdrv_get_zoned_info, and return an error if the
> backend is a zoned block device and the device does not implement
> TYPE_ZONED_BLOCK_SUPPORT. (Commit 6b1566c is an example of adding a new
> QOM interface; in your case, it would be simpler as the interface would
> not have any method). Kevin, what do you think?
What about non-device users such as block jobs or (NBD) exports? Won't
they have to special-case such devices, too? In fact, what about image
format drivers or even filters?
I feel that this needs to be managed at the BDS level somehow. Not sure
which mechanism to use, though. Permissions would be suitable for a
blacklist approach, but I agree with you that we need a whitelist
instead.
Hm... Actually, file-posix implements .bdrv_check_perm and could just
refuse attaching a parent there if it doesn't request a specific
permission like BLK_PERM_SUPPORT_ZONED. That should give us the
whitelist semantics through existing infrastructure.
Kevin
next prev parent reply other threads:[~2019-07-10 11:04 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 ` [Qemu-devel] [PATCH 3/4] virtio-blk: Don't realize zoned block devices Dmitry Fomichev
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 [this message]
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=20190710110241.GB6501@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=dmitry.fomichev@wdc.com \
--cc=fam@euphon.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.