qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qmp: add BLOCK_MEDIUM_EJECT event
Date: Wed, 25 Jan 2012 09:41:20 +0100	[thread overview]
Message-ID: <4F1FC030.2030705@redhat.com> (raw)
In-Reply-To: <4F1F0E9F.8080302@redhat.com>

Am 24.01.2012 21:03, schrieb Eric Blake:
> 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.

What's the reason for this behaviour? It feels inconsistent.

Also, I seem to remember that once we had discussed some kind of a "tray
status (open/closed) changed" event, which would be more generic.

>> 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.

The tray is usually locked for a reason, so I would vote against libvirt
automagically overriding it. Note that you don't really need a
lock/unlock event for implementing it, you could just always pass
force=true (or do it after you got QERR_DEVICE_LOCKED).

The only reasonable thing for a management tool to do with a lock/unlock
event would be updating some icon in a GUI or something like that.

Kevin

  reply	other threads:[~2012-01-25  8:38 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
2012-01-25  8:41   ` Kevin Wolf [this message]
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=4F1FC030.2030705@redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@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).