]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Refactor qemuDomainObjSetJobPhase
authorJiri Denemark <jdenemar@redhat.com>
Tue, 10 May 2022 13:20:25 +0000 (15:20 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 7 Jun 2022 15:40:20 +0000 (17:40 +0200)
commit2b163ca3018467289b642bed0c099cb4a49d1e97
treea9474a8e8c3926f7b2dbb230ea231757a9545d66
parent69d9f54c665487d6d19bcc379d6f4e706e5ae8bc
qemu: Refactor qemuDomainObjSetJobPhase

We will want to update migration phase without affecting job ownership.
Either in the thread that already owns the job or from an event handler
which only changes the phase (of a job no-one owns) without assuming it.

Let's move the ownership change to a new qemuDomainObjStartJobPhase
helper and let qemuDomainObjSetJobPhase set the phase without touching
ownership.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_domainjob.c
src/qemu/qemu_domainjob.h
src/qemu/qemu_migration.c