
On Fri, Feb 10, 2023 at 05:46:25PM +0100, Peter Krempa wrote:
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> --- src/qemu/qemu_block.c | 1 + src/qemu/qemu_blockjob.c | 19 ++++++++++--------- src/qemu/qemu_blockjob.h | 4 ++++ 3 files changed, 15 insertions(+), 9 deletions(-)
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>