mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 18:03:32 +00:00
qemu: snapshot: Remove unused cleanup section in qemuDomainSnapshotCreateSingleDiskActive
After getting rid of pre-transaction qemu support the cleanup section is unused. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
7d67319cfb
commit
7b8c319d9c
@ -15197,31 +15197,26 @@ qemuDomainSnapshotCreateSingleDiskActive(virQEMUDriverPtr driver,
|
|||||||
virJSONValuePtr actions,
|
virJSONValuePtr actions,
|
||||||
bool reuse)
|
bool reuse)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
|
||||||
|
|
||||||
if (qemuBlockSnapshotAddLegacy(actions, dd->disk, dd->src, reuse) < 0)
|
if (qemuBlockSnapshotAddLegacy(actions, dd->disk, dd->src, reuse) < 0)
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
/* 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 (!reuse && 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));
|
||||||
goto cleanup;
|
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 */
|
||||||
if (qemuDomainStorageSourceAccessAllow(driver, vm, dd->src, false, true) < 0)
|
if (qemuDomainStorageSourceAccessAllow(driver, vm, dd->src, false, true) < 0)
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
dd->prepared = true;
|
dd->prepared = true;
|
||||||
|
|
||||||
ret = 0;
|
return 0;
|
||||||
|
|
||||||
cleanup:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user