]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: blockjob: Handle 'pending' blockjob state only when we need it
authorPeter Krempa <pkrempa@redhat.com>
Fri, 10 Feb 2023 16:16:43 +0000 (17:16 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 13 Feb 2023 13:20:01 +0000 (14:20 +0100)
commitc433c2434c0459df98ed3355ef615e341acd9009
tree61fb8aa6298b6a6f6a781826a97c9459e1ef3575
parentc699f5e4ee3f1d746d57fc4361cd05914f2c7ff1
qemu: blockjob: Handle 'pending' blockjob state only when we need it

The 'pending' state needs to be handled by the blockjob code only when
the snapshot code requests a block-commit without auto-finalization.

If we always handle it we fail to properly remove the blockjob data for
the 'blockdev-create' job as that also transitions trhough 'pending' but
we'd never update it once it reaches 'concluded' as the code already
thinks that the job has finished and is no longer watching it.

Introduce a 'processPending' property into block job data and set it
only when we know that we need to process 'pending'.

Fixes: 90d9bc9d74a5157167548b26c00b1a016655e295
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2168769
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_block.c
src/qemu/qemu_blockjob.c
src/qemu/qemu_blockjob.h