On 07/04/2014 05:29 AM, Peter Krempa wrote:
Instead of just returning the parent path, return the complete
parent
source structure.
---
src/qemu/qemu_driver.c | 16 ++++-----
src/util/virstoragefile.c | 17 ++++------
src/util/virstoragefile.h | 2 +-
tests/virstoragetest.c | 86 ++++++++++++++++++++++-------------------------
4 files changed, 56 insertions(+), 65 deletions(-)
@@ -15585,10 +15585,9 @@ qemuDomainBlockCommit(virDomainPtr dom,
clean_access = true;
if (qemuDomainPrepareDiskChainElement(driver, vm, disk, baseSource,
VIR_DISK_CHAIN_READ_WRITE) < 0 ||
- (top_parent && top_parent != disk->src->path &&
- qemuDomainPrepareDiskChainElementPath(driver, vm, disk,
- top_parent,
- VIR_DISK_CHAIN_READ_WRITE) < 0))
+ (top_parent != disk->src &&
+ qemuDomainPrepareDiskChainElement(driver, vm, disk, top_parent,
+ VIR_DISK_CHAIN_READ_WRITE) < 0))
Oops. This doesn't quite work with active commit (where top_parent is
NULL, but where qemuDomainPrepareDiskChainElement isn't too happy to get
a NULL pointer). But then again, I'm rebasing my active commit on top
of you, so your patch is not wrong if it goes in first. If you want,
restore the condition to '(top_parent && top_parent != disk->src
&&...)'.
@@ -1388,7 +1387,6 @@ virStorageFileChainLookup(virStorageSourcePtr
chain,
goto error;
}
-
int result = virFileRelLinkPointsTo(parentDir, name,
chain->path);
Aha - squash this hunk into an earlier commit.
ACK, whether or not you fix the NULL top_parent for active commit.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org