]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Fix value of 'device' argument for block-commit
authorPeter Krempa <pkrempa@redhat.com>
Mon, 20 Jan 2020 12:19:43 +0000 (13:19 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 24 Jan 2020 12:40:36 +0000 (13:40 +0100)
commit69908db0f62444e51bb8aae157b5ae48f45e2fe4
treecef5e8782ad01217ea9cfe1d01598654d7308eff
parente3137539a9c4af25ab085506d5467ec0847b0ecc
qemu: Fix value of 'device' argument for block-commit

When using blockdev configurations the 'device' argument of
'blockdev-commit' must correspond to the topmost node in the block node
graph. Libvirt didn't do this properly in case when 'copy_on_read'
option was enabled on the disk.

Use qemuDomainDiskGetTopNodename to fix it when calling block-commit.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_driver.c