Hi Michal, Daniel
It seems there is something wrong with the 2/2 part of this patchset.
When I do an "change-media" command in virsh, it doesn't do any better
than before, but even worse(I must to wait 5 secs to see the error).
I'm not family with libvirt, just add some log things in the qemu_hotplug.c
and found the tray_status never change to open, but with michal's original
patch (which do active poll on tray_status), I can do "change-media"
successfully
every time.
IMHO, there must be some bug in the processing of qemu tray change.
Thanks,
Wei
On 01/25/2013 08:20 PM, Michal Privoznik wrote:
The first patch is bare bug fix (without any bug reported though).
The second is again a bug fix, but not so easy to spot. Basically, when we
change a media, we should issue 'eject' first, then wait until the tray gets
open, after which we can finally issue 'change' command. Even for bare
'eject'
we ought to check status, shouldn't we?
Michal Privoznik (2):
qemu_monitor: Fix tray-open attribute in query-block
qemu_hotplug: Rework media changing process
src/qemu/qemu_hotplug.c | 51 +++++++++++++++++++++++++++++++++++++++++---
src/qemu/qemu_monitor_json.c | 2 +-
src/qemu/qemu_monitor_text.c | 6 +++---
3 files changed, 52 insertions(+), 7 deletions(-)