mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Merge use of 'reuse' flag in qemuDomainSnapshotDiskPrepareOne
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
fd8e55ca93
commit
e3189f7c0a
@ -15359,16 +15359,16 @@ qemuDomainSnapshotDiskPrepareOne(virQEMUDriverPtr driver,
|
|||||||
else
|
else
|
||||||
VIR_FREE(backingStoreStr);
|
VIR_FREE(backingStoreStr);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
/* pre-create the image file so that we can label it before handing it to qemu */
|
||||||
/* pre-create the image file so that we can label it before handing it to qemu */
|
if (dd->src->type != VIR_STORAGE_TYPE_BLOCK) {
|
||||||
if (!reuse && dd->src->type != VIR_STORAGE_TYPE_BLOCK) {
|
if (virStorageFileCreate(dd->src) < 0) {
|
||||||
if (virStorageFileCreate(dd->src) < 0) {
|
virReportSystemError(errno, _("failed to create image file '%s'"),
|
||||||
virReportSystemError(errno, _("failed to create image file '%s'"),
|
NULLSTR(dd->src->path));
|
||||||
NULLSTR(dd->src->path));
|
return -1;
|
||||||
return -1;
|
}
|
||||||
|
dd->created = true;
|
||||||
}
|
}
|
||||||
dd->created = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set correct security, cgroup and locking options on the new image */
|
/* set correct security, cgroup and locking options on the new image */
|
||||||
|
Loading…
Reference in New Issue
Block a user