Re: [Qemu-devel] [PATCH 6/8] block: add eject request callback

2011-11-07 Thread Paolo Bonzini
On 11/07/2011 04:23 PM, Markus Armbruster wrote: 1. eject without -f is as you mentioned. Would implementing the missing part help with the problem at hand? It would help for non-buggy guests. Buggy means even "echo -1 > /sys/block/sr0/events_poll_msecs". However, a full solution would re

Re: [Qemu-devel] [PATCH 6/8] block: add eject request callback

2011-11-07 Thread Markus Armbruster
Paolo Bonzini writes: > On 11/07/2011 02:21 PM, Markus Armbruster wrote: >> The commit message should explain why we need this callback. The cover >> letter says "support for eject requests is required by udev 173." >> Please elaborate on that. > > Well, first and foremost eject requests are in

Re: [Qemu-devel] [PATCH 6/8] block: add eject request callback

2011-11-07 Thread Kevin Wolf
Am 07.11.2011 14:56, schrieb Paolo Bonzini: > On 11/07/2011 02:49 PM, Kevin Wolf wrote: >>> 2. eject with -f should really never be needed, but it does whatever is >>> needed to be able to follow up with a "change" command. It turns out it >>> is really "unlock" and "ask the guest to eject" com

Re: [Qemu-devel] [PATCH 6/8] block: add eject request callback

2011-11-07 Thread Paolo Bonzini
On 11/07/2011 02:49 PM, Kevin Wolf wrote: > 2. eject with -f should really never be needed, but it does whatever is > needed to be able to follow up with a "change" command. It turns out it > is really "unlock" and "ask the guest to eject" combined, but that's the > implementation, not the m

Re: [Qemu-devel] [PATCH 6/8] block: add eject request callback

2011-11-07 Thread Kevin Wolf
Am 07.11.2011 14:36, schrieb Paolo Bonzini: > On 11/07/2011 02:21 PM, Markus Armbruster wrote: >> The commit message should explain why we need this callback. The cover >> letter says "support for eject requests is required by udev 173." >> Please elaborate on that. > > Well, first and foremost e

Re: [Qemu-devel] [PATCH 6/8] block: add eject request callback

2011-11-07 Thread Paolo Bonzini
On 11/07/2011 02:21 PM, Markus Armbruster wrote: The commit message should explain why we need this callback. The cover letter says "support for eject requests is required by udev 173." Please elaborate on that. Well, first and foremost eject requests are in the spec. :) The fact that recen

Re: [Qemu-devel] [PATCH 6/8] block: add eject request callback

2011-11-07 Thread Markus Armbruster
I apologize for the lateness of this review. Paolo Bonzini writes: > Signed-off-by: Paolo Bonzini The commit message should explain why we need this callback. The cover letter says "support for eject requests is required by udev 173." Please elaborate on that. > --- > block.c|7

Re: [Qemu-devel] [PATCH 6/8] block: add eject request callback

2011-10-29 Thread Paolo Bonzini
On 10/28/2011 07:21 PM, Kevin Wolf wrote: > -if (!force&& !bdrv_dev_is_tray_open(bs) > -&& bdrv_dev_is_medium_locked(bs)) { > -qerror_report(QERR_DEVICE_LOCKED, bdrv_get_device_name(bs)); > +if (bdrv_dev_is_medium_locked(bs)&& !bdrv_dev_is_tray_open(bs)) { > +bdrv_

Re: [Qemu-devel] [PATCH 6/8] block: add eject request callback

2011-10-28 Thread Kevin Wolf
Am 25.10.2011 12:53, schrieb Paolo Bonzini: > Signed-off-by: Paolo Bonzini > --- > block.c|7 +++ > block.h|7 +++ > blockdev.c |8 +--- > 3 files changed, 19 insertions(+), 3 deletions(-) > > diff --git a/block.c b/block.c > index 9873b57..53e21ba 100644 > --- a/

[Qemu-devel] [PATCH 6/8] block: add eject request callback

2011-10-25 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block.c|7 +++ block.h|7 +++ blockdev.c |8 +--- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 9873b57..53e21ba 100644 --- a/block.c +++ b/block.c @@ -821,6 +821,13 @@ bool bdrv_dev_has_rem