1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-10 05:17:59 +03:00

blockcommit: fix regression with explicit top argument

Commit f586965 accidentally changed the semantics of the
virDomainBlockCommit command; where it previously looked for
an explicit top argument from the top of the chain, it now
starts from the backing file of the top.  Of course, until
we allow active commits, the only difference it makes is in
the quality of the error message, but with code for active
commit coming soon, we need to support an explicit mention
of the active layer.

* src/qemu/qemu_driver.c (qemuDomainBlockCommit): Start looking
from top of chain.

Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Eric Blake 2014-06-11 16:22:57 -06:00
parent e430410480
commit 519181d932

View File

@ -15529,8 +15529,7 @@ qemuDomainBlockCommit(virDomainPtr dom,
if (!top)
topSource = disk->src;
else if (virStorageFileParseChainIndex(disk->dst, top, &topIndex) < 0 ||
!(topSource = virStorageFileChainLookup(disk->src,
disk->src->backingStore,
!(topSource = virStorageFileChainLookup(disk->src, NULL,
top, topIndex,
&top_parent)))
goto endjob;