提交 e3189f7c 编写于 作者: P Peter Krempa

qemu: Merge use of 'reuse' flag in qemuDomainSnapshotDiskPrepareOne

Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 fd8e55ca
......@@ -15359,10 +15359,9 @@ qemuDomainSnapshotDiskPrepareOne(virQEMUDriverPtr driver,
else
VIR_FREE(backingStoreStr);
}
}
} else {
/* pre-create the image file so that we can label it before handing it to qemu */
if (!reuse && dd->src->type != VIR_STORAGE_TYPE_BLOCK) {
if (dd->src->type != VIR_STORAGE_TYPE_BLOCK) {
if (virStorageFileCreate(dd->src) < 0) {
virReportSystemError(errno, _("failed to create image file '%s'"),
NULLSTR(dd->src->path));
......@@ -15370,6 +15369,7 @@ qemuDomainSnapshotDiskPrepareOne(virQEMUDriverPtr driver,
}
dd->created = true;
}
}
/* set correct security, cgroup and locking options on the new image */
if (qemuDomainStorageSourceAccessAllow(driver, vm, dd->src, false, true) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册