From: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Luiz Capitulino <lcapitulino@redhat.com>,
eblake@redhat.com, qemu-devel@nongnu.org,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT & BLOCK_MEDIUM_CHANGED
Date: Fri, 10 Feb 2012 21:47:41 +0100 [thread overview]
Message-ID: <4F35826D.6080408@redhat.com> (raw)
In-Reply-To: <4F357284.1070105@redhat.com>
On 02/10/2012 08:39 PM, Paolo Bonzini wrote:
>>>
>>> 1. added commands blockdev-tray-open, blockdev-tray-close,
>>> blockdev-medium-insert,
>>> blockdev-medium-remove
>
> I think this slightly overengineering. eject and change work well
> enough, we do not need blockdev-medium-insert and blockdev-medium-remove
> (yet). Of course there can be a new API, just nothing user-visible.
>
>>> 2. added the events: BLOCK_TRAY_OPEN, BLOCK_TRAY_CLOSE,
>>> BLOCK_MEDIUM_INSERTED
>>> BLOCK_MEDIUM_REMOVED, which would be emitted when the relating
>>> command is issued
>>> (maybe the events could just be BLOCK_TRAY_CHANGED &
>>> BLOCK_MEDIUM_CHANGED)
>
> Or even just one event with two boolean arguments.
>
> Looks slightly less clean, but it has an advantage: a guest that sends
> "eject" can wait for an event and will know whether the eject command
> was really executed (tray = open, medium = none) or just an eject
> request was obeyed by the guest (tray = open, medium = present).
>
>>> Now, maybe the guest eject could also emit BLOCK_TRAY_OPEN &
>>> BLOCK_TRAY_CLOSE. Then
>>> I think this is a complete solution.
>
> Yes.
Hmm... I don't know...
The more I think about it, the more I like Luiz's original proposal of
only signaling guest-initiated ejects. I won't hold up any other patch
that works, but I cannot think of something that is as easily usable by
management in a non-racy way.
Paolo
prev parent reply other threads:[~2012-02-10 20:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-07 18:09 [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT & BLOCK_MEDIUM_CHANGED Luiz Capitulino
2012-02-07 18:09 ` [Qemu-devel] [PATCH 1/5] block: Rename bdrv_mon_event() & BlockMonEventAction Luiz Capitulino
2012-02-07 18:09 ` [Qemu-devel] [PATCH 2/5] block: bdrv_eject(): Make eject_flag a real bool Luiz Capitulino
2012-02-07 18:09 ` [Qemu-devel] [PATCH 3/5] block: bdrv_eject(): Add tray_changed parameter Luiz Capitulino
2012-02-07 18:09 ` [Qemu-devel] [PATCH 4/5] qmp: add the GUEST_MEDIUM_EJECTED event Luiz Capitulino
2012-02-07 18:09 ` [Qemu-devel] [PATCH 5/5] qmp: add the BLOCK_MEDIUM_CHANGED event Luiz Capitulino
2012-02-09 15:01 ` [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT & BLOCK_MEDIUM_CHANGED Markus Armbruster
2012-02-09 16:07 ` Luiz Capitulino
2012-02-10 9:27 ` Markus Armbruster
2012-02-10 17:20 ` Luiz Capitulino
2012-02-10 7:58 ` Paolo Bonzini
2012-02-10 9:36 ` Markus Armbruster
2012-02-10 17:04 ` Luiz Capitulino
2012-02-10 17:55 ` Kevin Wolf
2012-02-10 19:39 ` Paolo Bonzini
2012-02-10 20:47 ` Paolo Bonzini [this message]
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=4F35826D.6080408@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@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 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).