
On 04/27/2015 08:01 PM, Peter Krempa wrote:
The documentation states that for shallow block copy the image has to have the same guest visible content as backing file of the current image. This condition can be achieved also with a raw file (or a qcow without a backing file) so remove the condition that would disallow it.
(This patch additionally fixes crash described in https://bugzilla.redhat.com/show_bug.cgi?id=1215569 since it removes the code) --- src/qemu/qemu_driver.c | 10 ---------- 1 file changed, 10 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 70bf7aa..f979d33 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16815,16 +16815,6 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm, if (qemuDomainDetermineDiskChain(driver, vm, disk, false, true) < 0) goto endjob;
- if ((flags & VIR_DOMAIN_BLOCK_COPY_SHALLOW) && - mirror->format == VIR_STORAGE_FILE_RAW && - disk->src->backingStore->path) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("disk '%s' has backing file, so raw shallow copy " - "is not possible"), - disk->dst); - goto endjob; - } -
Although a shallow blockcopy of file without backing file is semantically correct, but still feel a little weird. And, a shallow blockcommit of file without backing file will failed with error "error: invalid argument: top '/var/lib/libvirt/images/raw.img' in chain for 'vda' has no backing file" Should libvirt post error when try a shallow blockcopy of file without backing file, just as shallow blockcommit?
/* Prepare the destination file. */ /* XXX Allow non-file mirror destinations */ if (!virStorageSourceIsLocalStorage(mirror)) {
-- Regards shyu