]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: blockjob: Track orphaned backing chains in blockjob status XML
authorPeter Krempa <pkrempa@redhat.com>
Tue, 19 Mar 2019 06:54:12 +0000 (07:54 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 18 Jul 2019 15:59:34 +0000 (17:59 +0200)
commitb3f8ad07ddb779542e7a6b2d19b3a1eaf272e0d3
tree5fc70fb4fa284a418995057b8c07400d285ecb61
parent7a264536a66bfea0796a74e393f52c54b9d51763
qemu: blockjob: Track orphaned backing chains in blockjob status XML

When the guest unplugs the disk frontend libvirt is responsible for
deleting the backend. Since a blockjob may still have a reference to the
backing chain when it is running we'll have to store the metadata for
the unplugged disk for future reference.

This patch adds 'chain' and 'mirrorChain' fields to 'qemuBlockJobData'
to keep them around with the job along with status XML machinery and
tests. Later patches will then add code to change the ownership of the
chain when unplugging the disk backend.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_blockjob.c
src/qemu/qemu_blockjob.h
src/qemu/qemu_domain.c
tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml