[PATCH] qemu: blockjob: Handle 'pending' blockjob state only when we need it

Pavel Hrdina phrdina at redhat.com
Mon Feb 13 12:45:15 UTC 2023


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 at 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 at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20230213/95f712aa/attachment.sig>


More information about the libvir-list mailing list