QEMU will soon (patches are available on qemu-devel) get support for
migration events which will finally allow us to get rid of polling
query-migrate every 50ms. However, we first need to be able to wait for
all events related to migration (migration status changes, block job
events, async abort requests) at once. This series prepares the
infrastructure and uses it to switch all polling loops in migration code
to pthread_cond_wait.
https://bugzilla.redhat.com/show_bug.cgi?id=1212077
Version 3 (see individual patches for details):
- most of the series has been ACKed in v2
- "qemu: Use domain condition for synchronous block jobs" was split in 3
patches for easier review
- minor changes requested in v2 review
Version 2 (see individual patches for details):
- rewritten using per-domain condition variable
- enahnced to fully support the migration events
Jiri Denemark (24):
conf: Introduce per-domain condition variable
qemu: Introduce qemuBlockJobUpdate
qemu: Properly report failed migration
qemu: Use domain condition for synchronous block jobs
qemu: Cancel storage migration in parallel
qemu: Abort migration early if disk mirror failed
qemu: Don't mess with disk->mirrorState
Pass domain object to private data formatter/parser
qemu: Make qemuMigrationCancelDriveMirror usable without async job
qemu: Refactor qemuMonitorBlockJobInfo
qemu: Cancel disk mirrors after libvirtd restart
qemu: Use domain condition for asyncAbort
qemu_monitor: Wire up SPICE_MIGRATE_COMPLETED event
qemu: Do not poll for spice migration status
qemu: Refactor qemuDomainGetJob{Info,Stats}
qemu: Refactor qemuMigrationUpdateJobStatus
qemu: Don't pass redundant job name around
qemu: Refactor qemuMigrationWaitForCompletion
qemu_monitor: Wire up MIGRATION event
qemuDomainGetJobStatsInternal: Support migration events
qemu: Update migration state according to MIGRATION event
qemu: Wait for migration events on domain condition
qemu: cancel drive mirrors when p2p connection breaks
DO NOT APPLY: qemu: Work around weird migration status changes
po/POTFILES.in | 1 -
src/conf/domain_conf.c | 51 ++-
src/conf/domain_conf.h | 12 +-
src/libvirt_private.syms | 6 +
src/libxl/libxl_domain.c | 10 +-
src/lxc/lxc_domain.c | 12 +-
src/qemu/qemu_blockjob.c | 185 +++--------
src/qemu/qemu_blockjob.h | 15 +-
src/qemu/qemu_capabilities.c | 3 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_domain.c | 78 +++--
src/qemu/qemu_domain.h | 7 +-
src/qemu/qemu_driver.c | 201 +++++++-----
src/qemu/qemu_migration.c | 763 +++++++++++++++++++++++++++++--------------
src/qemu/qemu_migration.h | 8 +
src/qemu/qemu_monitor.c | 73 ++++-
src/qemu/qemu_monitor.h | 33 +-
src/qemu/qemu_monitor_json.c | 152 ++++-----
src/qemu/qemu_monitor_json.h | 7 +-
src/qemu/qemu_process.c | 92 +++++-
tests/qemumonitorjsontest.c | 40 ---
21 files changed, 1057 insertions(+), 693 deletions(-)
--
2.4.3