All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Christoph Hellwig <chellwig@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] RFC v2: blockdev_add & friends, brief rationale, QMP docs
Date: Tue, 15 Jun 2010 15:27:51 +0200	[thread overview]
Message-ID: <m3sk4oo27c.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <4C177581.2040106@redhat.com> (Avi Kivity's message of "Tue, 15 Jun 2010 15:43:45 +0300")

Avi Kivity <avi@redhat.com> writes:

> On 06/15/2010 03:23 PM, Markus Armbruster wrote:
>>
>>> media_insert/remove seem to duplicate blockdev_add/del.  Perhaps we
>>> don't need them?
>>>
>>> To change media, tell the guest device to eject, blockdev_del,
>>> blockdev_add, reassociate the guest and host parts.
>>>      
>> Device model code is not prepared to have host parts go away and come
>> back during operation.  The device model driver attaches to the host
>> part on initialization, and detaches only when the device gets destroyed
>> (hot unplug).
>>
>> If we yank out the host part during operation as you propose, then the
>> device model driver's pointer to the host part becomes null.  I don't
>> see that ending happily.
>>    
>
> I'm only talking about the interface, not the implementation.
> Internal design details shouldn't be exposed.
>
> For the implementation, I imagine you can create an empty blockdev
> during guest device creation and treat blockdev_add/blockdev_del as
> media change/eject.

If blockdev_del only ejects media, then we need another command to get
rid of a blockdev.

Unless you propose that blockdev_del merely ejects media if the blockdev
is being used by a device, but destroys the blockdev outright if not.
But that would be sick, wouldn't it?

>>> To pretend you're a media changer, blockdev_add all your cds at once
>>> and just change the guest/host association when you want to hear a new
>>> band.
>>>
>>> For a fake a multipath setup, blockdev_add one device, associate it
>>> with multiple guest interfaces.
>>>
>>> Otherwise, looks good.
>>>      
>> Any preference on the command line option syntax?
>>    
>
> Something incredibly long and complicated?
>
> We might keep the existing stuff which is already complicated enough
> for users, and ask machines to build guests using QMP instead of the
> command line.

I sketched three ways to do -blockdev.  They attempt to make the simple
simple, and the complex possible.  Any preference among them?

We can't simply keep -drive, because of the flaws I listed in the
rationale.

  reply	other threads:[~2010-06-15 13:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10 17:45 [Qemu-devel] RFC v2: blockdev_add & friends, brief rationale, QMP docs Markus Armbruster
2010-06-15  9:04 ` Avi Kivity
2010-06-15 12:23   ` Markus Armbruster
2010-06-15 12:43     ` Avi Kivity
2010-06-15 13:27       ` Markus Armbruster [this message]
2010-06-15 13:40         ` Avi Kivity
2010-06-15 14:54           ` Markus Armbruster
2010-06-16  9:50             ` Avi Kivity
2010-06-16 11:02               ` Markus Armbruster
2010-06-16 11:06                 ` Avi Kivity
2010-06-15 13:44 ` [Qemu-devel] " Avi Kivity
2010-06-15 14:39   ` Gerd Hoffmann
2010-06-16 11:20   ` Kevin Wolf
2010-06-16 12:41     ` Markus Armbruster
2010-06-16 13:41       ` Anthony Liguori
2010-06-16 13:57         ` Kevin Wolf
2010-06-16 14:24           ` Christoph Hellwig
2010-06-16 14:47             ` Markus Armbruster
2010-06-16 18:07           ` Anthony Liguori
2010-06-17  8:20             ` Kevin Wolf
2010-06-17 13:01               ` Anthony Liguori
2010-06-17 14:15                 ` Kevin Wolf
2010-06-18  8:20                   ` Markus Armbruster
2010-06-18  9:36                     ` Kevin Wolf
2010-06-18  7:06                 ` Markus Armbruster

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=m3sk4oo27c.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=avi@redhat.com \
    --cc=chellwig@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --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.