[PATCH] qemu: blockjob: Avoid spurious log errors when cancelling a shallow copy with reused images

Ján Tomko jtomko at redhat.com
Tue Feb 22 17:38:10 UTC 2022


On a Tuesday in 2022, Peter Krempa wrote:
>In case when a user starts a block copy operation with
>VIR_DOMAIN_BLOCK_COPY_SHALLOW and VIR_DOMAIN_BLOCK_COPY_REUSE_EXT and
>both the reused image and the original disk have a backing image libvirt
>specifically does not insert the backing image until after the job is
>asked to be completed via virBlockJobAbort with
>VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT.
>
>This is so that management applications can copy the backing image on
>the background.
>
>Now when a user aborts the block job instead of cancelling it we'd
>ignore the fact that we didn't insert the backing image yet and the
>cancellation would result into a 'blockdev-del' of a invalid node name
>and thus an 'error' severity entry in the log.
>
>To solve this issue we use the same conditions when the backing image
>addition is avoided to remove the internal state for them prior to the
>call to unplug the mirror destination.
>
>Reported-by: Kashyap Chamarthy <kchamart at redhat.com>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_blockjob.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220222/82cfb354/attachment-0001.sig>


More information about the libvir-list mailing list