From: Kevin Wolf <kwolf@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-block@nongnu.org, eblake@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 1/6] block/qdev: Allow node name for drive properties
Date: Mon, 4 Jul 2016 12:43:54 +0200 [thread overview]
Message-ID: <20160704104354.GC5399@noname.redhat.com> (raw)
In-Reply-To: <429dc8d6-bff3-6918-71cc-c03efbe6c604@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]
Am 02.07.2016 um 17:33 hat Max Reitz geschrieben:
> On 30.06.2016 16:13, Kevin Wolf wrote:
> > If a node name instead of a BlockBackend name is specified as the driver
> > for a guest device, an anonymous BlockBackend is created now.
> >
> > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> > ---
> > hw/core/qdev-properties-system.c | 22 +++++++++++++++++++---
> > 1 file changed, 19 insertions(+), 3 deletions(-)
>
> I just noticed this won't work with (at least) USB mass storage devices.
> scsi_bus_legacy_add_drive() creates a new device and uses
> qdev_prop_set_drive() to set its drive, and that function uses
> blk_name() to get the required value for .drive.
>
> That can of course be fixed by using bdrv_get_node_name(blk_bs(value))
> there if blk_name(value) is empty. But in addition we need to make sure
> that the BB is not deleted in usb_msd_realize_storage() (because that
> function has to detach the device from the BB before creating the SCSI
> disk), so we need to wrap the explicitly hacky block there in
> blk_ref(blk) and blk_unref(blk).
I'm not sure if I even want to fix this here... Maybe it's better to
leave node names broken for usb-storage, as a motivation for someone to
try and clean up this mess for good. I mean, it's not the first time
that this hack breaks.
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2016-07-04 10:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-30 14:13 [Qemu-devel] [PATCH v2 0/6] block: Move BB options from blockdev-add to qdev Kevin Wolf
2016-06-30 14:13 ` [Qemu-devel] [PATCH v2 1/6] block/qdev: Allow node name for drive properties Kevin Wolf
2016-07-02 15:00 ` Max Reitz
2016-07-02 15:33 ` Max Reitz
2016-07-04 10:43 ` Kevin Wolf [this message]
2016-07-05 14:41 ` Max Reitz
2016-06-30 14:13 ` [Qemu-devel] [PATCH v2 2/6] block/qdev: Allow configuring WCE with qdev properties Kevin Wolf
2016-07-02 15:36 ` Max Reitz
2016-06-30 14:13 ` [Qemu-devel] [PATCH v2 3/6] commit: Fix use of error handling policy Kevin Wolf
2016-07-02 15:39 ` Max Reitz
2016-06-30 14:13 ` [Qemu-devel] [PATCH v2 4/6] block/qdev: Allow configuring rerror/werror with qdev properties Kevin Wolf
2016-07-02 15:57 ` Max Reitz
2016-06-30 14:13 ` [Qemu-devel] [PATCH v2 5/6] qemu-iotests: Test setting WCE with qdev Kevin Wolf
2016-07-02 16:15 ` Max Reitz
2016-07-04 10:50 ` Kevin Wolf
2016-07-05 14:57 ` Max Reitz
2016-07-05 22:49 ` Eric Blake
2016-07-06 14:25 ` Kevin Wolf
2016-06-30 14:13 ` [Qemu-devel] [PATCH v2 6/6] block: Remove BB options from blockdev-add Kevin Wolf
2016-07-02 16:28 ` Max Reitz
2016-07-04 10:58 ` Kevin Wolf
2016-07-05 14:58 ` Max Reitz
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=20160704104354.GC5399@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=eblake@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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.