]> xenbits.xensource.com Git - libvirt.git/commit
qemu: blockjob: Clean out disk mirror data after concluding the job
authorPeter Krempa <pkrempa@redhat.com>
Fri, 27 Sep 2024 07:07:22 +0000 (09:07 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 1 Oct 2024 10:54:40 +0000 (12:54 +0200)
commit54109db8265198b98c0bd4c148fff442d37d53b5
tree955f0612a32ccd6f14613bdea1cd2b9cdd95378d
parentb85b60d140df3ea893d75e4759426cceda22e0c4
qemu: blockjob: Clean out disk mirror data after concluding the job

The 'disk->mirrorJob' and 'disk->mirrorState' fields need to be cleared
after a blockjob, but should be kept around while 'disk->mirror' is
still in place. As 'disk->mirror' is cleared only after conclusion of
the job in 'qemuBlockJobEventProcessConcluded()' we should be resetting
them only afterwards.

Move the code later, but since the job is unregistered from the disk we
need to store the pointer to the disk before concluding the job.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_blockjob.c