提交 69908db0 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 e3137539
......@@ -18813,7 +18813,7 @@ qemuDomainBlockCommit(virDomainPtr dom,
jobname = job->name;
nodetop = topSource->nodeformat;
nodebase = baseSource->nodeformat;
device = disk->src->nodeformat;
device = qemuDomainDiskGetTopNodename(disk);
if (!backingPath && top_parent &&
!(backingPath = qemuBlockGetBackingStoreString(baseSource)))
goto endjob;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册