]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Allow showing the dump progress for memory only dump
authorJohn Ferlan <jferlan@redhat.com>
Mon, 20 Nov 2017 20:40:30 +0000 (15:40 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 6 Feb 2018 12:40:21 +0000 (07:40 -0500)
commit150930e30986594c75d2d078daa58844f570c973
treeb928cb2f6ff3106b3cc0100d1831a458ebaa5f0d
parent9a1755b7fee6e93fdb7d288f2674793c0c1a0d6a
qemu: Allow showing the dump progress for memory only dump

https://bugzilla.redhat.com/show_bug.cgi?id=916061

If the QEMU version running is new enough (based on the DUMP_COMPLETED
event), then we can add a 'detach' boolean to the dump-guest-memory
command in order to tell QEMU to run in a thread. This ensures that we
don't lock out other commands while the potentially long running dump
memory is completed.

This allows the usage of a qemuDumpWaitForCompletion which will wait
for the event while the qemuDomainGetJobInfoDumpStats can be used via
qemuDomainGetJobInfo in order to query QEMU to determine how far along
the job is.

Now that we have a true async job, we'll only set the dump_memory_only
flag only when @detach=false; otherwise, we note that the job is a
for stats dump this allows the opposite end for job info to determine
what to copy.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_driver.c