From: Eric Blake <eblake@redhat.com>
To: "Markus Armbruster" <armbru@redhat.com>,
"Benoît Canet" <benoit.canet@irqsave.net>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] How to introduce bs->node_name ?
Date: Wed, 30 Oct 2013 13:25:35 -0600 [thread overview]
Message-ID: <52715D2F.8000109@redhat.com> (raw)
In-Reply-To: <87eh72eumr.fsf@blackfin.pond.sub.org>
[-- Attachment #1: Type: text/plain, Size: 1927 bytes --]
On 10/30/2013 07:49 AM, Markus Armbruster wrote:
>
> The first proposal is to add another parameter, say "id". Users can
> then refer either to an arbitrary BDS by "id", or (for backward
> compatibility) to the root BDS by "device". When the code sees
> "device", it'll look up the BB, then fetch its root BDS.
>
> CON: Existing parameter "device" becomes compatibility cruft.
>
> PRO: Clean and obvious semantics (in my opinion).
I like this one as well.
>
> The second proposal is to press the existing parameter "device" into
> service for referring to BDS node_name.
>
> To keep backward compatibility, we obviously need to ensure that
> whenever the old code accepts a value of "device", the new code accepts
> it as well, and both resolve it to the same BDS.
>
> What about situations where the old code rejects a value of "device"?
> The new code may resolve it to a non-root BDS that happens to have that
> ID...
>
> What about dynamic reconfiguration changing the root? Example: a
> synchronous snapshot splices in a QCOW2, which becomes the new root. In
> the current code, device_name refers to the new root. Wouldn't that
> require the BDS ID of the old root moves to the new root? But that
> would mean BDS IDs change!
Having device_name tied to the BB, and ID tied to each BDS, seems much
more workable in the long run.
>> My personnal suggestion would be that non specified node-name would be set to
>> "undefined" meaning that no operation could occur on this bs.
>
> Yes, that's how IDs work elsewhere.
Agreed.
> [QMP and HMP code using bdrv_find() snipped]
>
> I think we should review with the QMP schema first, code second.
Yes, get the interface right, and then it's easier to review the code
that implements the interface.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-10-30 19:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-28 15:40 [Qemu-devel] How to introduce bs->node_name ? Benoît Canet
2013-10-29 1:03 ` Fam Zheng
2013-10-30 13:49 ` Markus Armbruster
2013-10-30 19:25 ` Eric Blake [this message]
2013-11-01 14:51 ` Luiz Capitulino
2013-11-01 14:59 ` Eric Blake
2013-11-01 15:12 ` Luiz Capitulino
2013-11-04 11:13 ` Kevin Wolf
2013-11-04 13:51 ` Luiz Capitulino
2013-11-04 9:31 ` Stefan Hajnoczi
2013-11-04 9:48 ` Fam Zheng
2013-11-04 11:06 ` Kevin Wolf
2013-11-04 11:33 ` Fam Zheng
2013-11-07 18:50 ` Benoît Canet
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=52715D2F.8000109@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=benoit.canet@irqsave.net \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--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).