libvirt/src/qemu
Michal Privoznik 543af79a14 qemuDomainChangeEjectableMedia: Unlock domain while waiting for event
In 84c59ffa I've tried to fix changing ejectable media process. The
process should go like this:

1) we need to call 'eject' on the monitor
2) we should wait for 'DEVICE_TRAY_MOVED' event
3) now we can issue 'change' command

However, while waiting in step 2) the domain monitor was locked. So
even if qemu reported the desired event, the proper callback was not
called immediately. The monitor handling code needs to lock the
monitor in order to read the event. So that's the first lock we must
not hold while waiting. The second one is the domain lock. When
monitor handling code reads an event, the appropriate callback is
called then. The first thing that each callback does is locking the
corresponding domain as a domain or its device is about to change
state. So we need to unlock both monitor and VM lock. Well, holding
any lock while sleep()-ing is not the best thing to do anyway.
2013-05-21 10:42:21 +02:00
..
libvirtd_qemu.aug qemu: Add VNC WebSocket support 2013-05-15 09:48:05 +02:00
MIGRATION.txt qemu: Implement migration job phases 2011-07-27 08:45:09 -06:00
qemu_agent.c virutil: Move string related functions to virstring.c 2013-05-02 16:56:55 +02:00
qemu_agent.h Convert virDomainObj, qemuAgent, qemuMonitor, lxcMonitor to virObjectLockable 2013-01-16 11:02:58 +00:00
qemu_bridge_filter.c virutil: Move string related functions to virstring.c 2013-05-02 16:56:55 +02:00
qemu_bridge_filter.h Replace 'struct qemud_driver *' with virQEMUDriverPtr 2012-11-28 18:17:25 +00:00
qemu_capabilities.c qemu: Implement support for locking domain's memory pages 2013-05-16 23:21:58 +02:00
qemu_capabilities.h qemu: Implement support for locking domain's memory pages 2013-05-16 23:21:58 +02:00
qemu_cgroup.c qemu: Abstract code for cpuset controller setting into a helper 2013-05-20 19:57:00 +08:00
qemu_cgroup.h qemu: put usb cgroup setup in common function 2013-04-29 21:52:28 -04:00
qemu_command.c qemu: Add callback struct for qemuBuildCommandLine 2013-05-20 20:14:19 +08:00
qemu_command.h qemu: Add callback struct for qemuBuildCommandLine 2013-05-20 20:14:19 +08:00
qemu_conf.c qemu: Check conflicts for shared scsi host device 2013-05-17 19:26:33 +08:00
qemu_conf.h qemu: Refactor qemuSetUnprivSGIO to support scsi host device 2013-05-17 00:57:01 +08:00
qemu_domain.c qemu: use bool in monitor struct 2013-05-13 15:15:54 -06:00
qemu_domain.h qemu: use bool in monitor struct 2013-05-13 15:15:54 -06:00
qemu_driver.c qemu: Add callback struct for qemuBuildCommandLine 2013-05-20 20:14:19 +08:00
qemu_driver.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
qemu_hostdev.c qemu: Set unpriv_sgio for scsi host device 2013-05-17 01:00:01 +08:00
qemu_hostdev.h qemu: Introduce activeScsiHostdevs list for scsi host devices 2013-05-13 21:26:06 +08:00
qemu_hotplug.c qemuDomainChangeEjectableMedia: Unlock domain while waiting for event 2013-05-21 10:42:21 +02:00
qemu_hotplug.h S390: Add hotplug support for s390 virtio devices 2013-03-13 18:13:09 -06:00
qemu_migration.c qemu: Fix crash in migration of graphics-less guests. 2013-05-16 15:48:34 +02:00
qemu_migration.h Pull parsing of migration xml up into QEMU driver APIs 2013-05-08 10:47:48 +01:00
qemu_monitor_json.c qemu: fix bad free 2013-05-13 16:48:55 -06:00
qemu_monitor_json.h qemu: query command line options in QMP 2013-05-13 15:15:54 -06:00
qemu_monitor_text.c virutil: Move string related functions to virstring.c 2013-05-02 16:56:55 +02:00
qemu_monitor_text.h qemu: Parse more fields from query-migrate QMP command 2013-02-22 17:35:59 +01:00
qemu_monitor.c qemu: query command line options in QMP 2013-05-13 15:15:54 -06:00
qemu_monitor.h qemu: query command line options in QMP 2013-05-13 15:15:54 -06:00
qemu_process.c qemu: Add callback struct for qemuBuildCommandLine 2013-05-20 20:14:19 +08:00
qemu_process.h qemu: Move qemuSetUnprivSGIO into qemu_conf.c 2013-05-17 00:51:58 +08:00
qemu.conf qemu: Add VNC WebSocket support 2013-05-15 09:48:05 +02:00
test_libvirtd_qemu.aug.in qemu: Add VNC WebSocket support 2013-05-15 09:48:05 +02:00
THREADS.txt Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00