]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Pass vm to qemuMigrationCookieParse if it exists
authorJiri Denemark <jdenemar@redhat.com>
Wed, 30 Nov 2022 13:29:55 +0000 (14:29 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 1 Dec 2022 09:30:21 +0000 (10:30 +0100)
commitaf59c944bb36f11996d03069116df2f14d7a8136
treec692a3b89537e52cb8270577a45db79ce42e7539
parent64d32118540aca3d42bc5ee21c8b780cafe04bfa
qemu: Pass vm to qemuMigrationCookieParse if it exists

The vm object is used inside qemuMigrationCookieParse based on the flags
passed to qemuMigrationCookieParse and the content of the cookie. The
callers should not just blindly guess and pass NULL if they
(incorrectly) think the vm object is not needed. We should always pass
the vm object unless it does not exist yet.

This fixes a bug when statistics of a completed migration reported
"Unknown" operation instead of "Incoming migration" on the destination
host.

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

Fixes: v8.7.0-79-g0150f7a8c1
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_migration.c