From 519181d932f6fa62303d65cafcd7e5fa2c98ca1f Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 11 Jun 2014 16:22:57 -0600 Subject: [PATCH] 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 --- src/qemu/qemu_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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;