From: Eric Blake Date: Wed, 11 Jun 2014 22:22:57 +0000 (-0600) Subject: blockcommit: fix regression with explicit top argument X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=519181d932f6fa62303d65cafcd7e5fa2c98ca1f;p=libvirt.git 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 --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e147d282c5..b5f7b3ce42 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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;