]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: require json for block jobs
authorEric Blake <eblake@redhat.com>
Fri, 17 Feb 2012 21:55:35 +0000 (14:55 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 29 Feb 2012 20:44:20 +0000 (13:44 -0700)
commit68a1300556c4122767a9e77453c0e8e5d97c782f
treeb78b3901eaf6b85236a9873de06664b5db97a0e8
parent513fc05750970902f32473e9fba19d2c411ec558
qemu: require json for block jobs

Block job commands are not part of upstream qemu until 1.1; and
proper support of job completion and cancellation depends on being
able to receive QMP events, which implies the JSON monitor.
Additionally, some early versions of block job commands were
backported to RHEL qemu, but these versions lacked asynchronous
job cancellation and partial block pull, so there are several
patches that will still be needed in this area of libvirt code
to support both flavors of block job commands.

Due to earlier patches in libvirt, we are guaranteed that all versions
of qemu that support block job commands already require libvirt to
use the JSON monitor.  That means that the text version of block jobs
will not be used, and having to refactor two copies of the block job
handlers makes no sense.  So instead, we delete the text handlers.

* src/qemu/qemu_monitor.c (qemuMonitorBlockJob): Drop text monitor
support.
* src/qemu/qemu_monitor_text.h (qemuMonitorTextBlockJob): Delete.
* src/qemu/qemu_monitor_text.c (qemuMonitorTextParseBlockJobOne)
(qemuMonitorTextParseBlockJob, qemuMonitorTextBlockJob):
Likewise.
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor_text.c
src/qemu/qemu_monitor_text.h