]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: blockjob: Register disk->mirror with a job only when required
authorPeter Krempa <pkrempa@redhat.com>
Wed, 24 Jul 2019 12:50:33 +0000 (14:50 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 25 Jul 2019 11:21:33 +0000 (13:21 +0200)
commitdae7d01322c3621bd2464dc992dc007ca20605f5
tree348cf145b208008931778b3449b957d98eb4b1a9
parent35a97e4532a2c465a9b4a7a84b39f109f08d79df
qemu: blockjob: Register disk->mirror with a job only when required

The <mirror> subelement is used in two ways: in a commit job to point to
existing storage, and in a block-copy job to point to additional
storage. We need a way to track only the distinct storage.

This patch introduces qemuBlockJobDiskRegisterMirror which registers the
mirror chain separately only for jobs which require it. This also comes
with remembering that in the status XML.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
ACKed-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_blockjob.c
src/qemu/qemu_blockjob.h
src/qemu/qemu_domain.c
tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml