[libvirt] [PATCH] qemu: Set job statsType for external memory snapshot

Jiri Denemark posted 1 patch 5 years, 1 month ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/f8a8c68766ef4d2d149ab82b9017317ab5094366.1552577326.git.jdenemar@redhat.com
src/qemu/qemu_driver.c | 2 ++
1 file changed, 2 insertions(+)
[libvirt] [PATCH] qemu: Set job statsType for external memory snapshot
Posted by Jiri Denemark 5 years, 1 month ago
Any job which is able to provide statistics that can be queried via
virDomainGetJob{Stats,Info} has to set an appropriate statsType.

Without a proper statsType qemuDomainJobInfoToParams and
qemuDomainJobInfoToInfo have no idea what statistics should be sent to
the API caller.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_driver.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index e461fb51b0..0d0aac6048 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -15558,6 +15558,8 @@ qemuDomainSnapshotCreateActiveExternal(virQEMUDriverPtr driver,
         if (!qemuMigrationSrcIsAllowed(driver, vm, false, 0))
             goto cleanup;
 
+        priv->job.current->statsType = QEMU_DOMAIN_JOB_STATS_TYPE_SAVEDUMP;
+
         /* allow the migration job to be cancelled or the domain to be paused */
         qemuDomainObjSetAsyncJobMask(vm, (QEMU_JOB_DEFAULT_MASK |
                                           JOB_MASK(QEMU_JOB_SUSPEND) |
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: Set job statsType for external memory snapshot
Posted by Erik Skultety 5 years, 1 month ago
On Thu, Mar 14, 2019 at 04:28:46PM +0100, Jiri Denemark wrote:
> Any job which is able to provide statistics that can be queried via
> virDomainGetJob{Stats,Info} has to set an appropriate statsType.
>
> Without a proper statsType qemuDomainJobInfoToParams and
> qemuDomainJobInfoToInfo have no idea what statistics should be sent to
> the API caller.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1688774
>

Reviewed-by: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list