All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qmp: add BLOCK_MEDIUM_EJECT event
Date: Tue, 24 Jan 2012 13:03:43 -0700	[thread overview]
Message-ID: <4F1F0E9F.8080302@redhat.com> (raw)
In-Reply-To: <20120124161628.4bf2592c@doriath.home>

[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]

On 01/24/2012 11:16 AM, Luiz Capitulino wrote:
> Libvirt wants to be notified when the guest ejects a medium, so that
> it can update its view of the guest.
> 
> This code has been originally written by Daniel Berrange. It adds
> the event to IDE and SCSI emulation.
> 
> Please, note that this only covers guest initiated ejects, that's,
> the QMP/HMP commands 'eject' and 'change' are not covered.
> 
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>

Reviewed-by: Eric Blake <eblake@redhat.com>

>  
> +BLOCK_MEDIUM_EJECT
> +------------------
> +
> +Emitted when the guest succeeds ejecting a medium. If the device has a tray,

s/succeeds ejecting/succeeds at ejecting/

Since libvirt is also tracking whether it makes 'eject' and 'change'
monitor commands, and can also do a query when reconnecting to the
monitor after a libvirtd restart to see if state changed in the meantime
(when an event was lost), this should be sufficient for libvirt to have
an accurate picture of the device state.

I do have to wonder, however, if we also need an event for when the
guest initiates a tray lock or tray unlock event, in order to track
whether plain eject will work or whether a forced eject to override the
tray lock would be required.

-- 
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: 620 bytes --]

  reply	other threads:[~2012-01-24 20:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-24 18:16 [Qemu-devel] [PATCH] qmp: add BLOCK_MEDIUM_EJECT event Luiz Capitulino
2012-01-24 20:03 ` Eric Blake [this message]
2012-01-25  8:41   ` Kevin Wolf
2012-01-25 12:42     ` Luiz Capitulino
2012-01-25 13:23       ` Kevin Wolf
2012-01-25 13:32         ` Paolo Bonzini
2012-01-25 13:43           ` Kevin Wolf
2012-01-25 13:49           ` Markus Armbruster
2012-01-25 13:42         ` Luiz Capitulino
2012-01-26 17:57       ` Luiz Capitulino
2012-01-27  9:52         ` Kevin Wolf
2012-01-27 12:02           ` Paolo Bonzini
2012-01-30 15:18           ` Luiz Capitulino
2012-01-30 15:43             ` Kevin Wolf
2012-01-30 15:55               ` Paolo Bonzini
2012-01-31  8:33                 ` Kevin Wolf
2012-01-31  9:23               ` Markus Armbruster
2012-01-31 13:46                 ` Luiz Capitulino
2012-01-25 10:19 ` Markus Armbruster
2012-01-25 13:31   ` Luiz Capitulino
2012-01-25 14:12     ` Markus Armbruster
2012-01-27 12:10 ` Paolo Bonzini
2012-01-30 15:36   ` Luiz Capitulino

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=4F1F0E9F.8080302@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@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.