qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qmp: add BLOCK_MEDIUM_EJECT event


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] qmp: add BLOCK_MEDIUM_EJECT event
Date: Tue, 24 Jan 2012 13:03:43 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

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 <address@hidden>

Reviewed-by: Eric Blake <address@hidden>

>  
> +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   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]