mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
qemu: blockcommit: Fix placement of qemuDomainDiskBlockJobIsSupported
Commit b50a8354f6
added call to qemuDomainDiskBlockJobIsSupported prior
to filling the 'disk' variable resulting in a crash when attempting a
block commit.
https://gitlab.com/libvirt/libvirt/-/issues/31
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
2f82fe467f
commit
f225f37a8a
@ -18504,9 +18504,6 @@ qemuDomainBlockCommit(virDomainPtr dom,
|
||||
if (virDomainObjCheckActive(vm) < 0)
|
||||
goto endjob;
|
||||
|
||||
if (!qemuDomainDiskBlockJobIsSupported(vm, disk))
|
||||
goto endjob;
|
||||
|
||||
blockdev = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV);
|
||||
|
||||
/* Convert bandwidth MiB to bytes, if necessary */
|
||||
@ -18523,6 +18520,9 @@ qemuDomainBlockCommit(virDomainPtr dom,
|
||||
if (!(disk = qemuDomainDiskByName(vm->def, path)))
|
||||
goto endjob;
|
||||
|
||||
if (!qemuDomainDiskBlockJobIsSupported(vm, disk))
|
||||
goto endjob;
|
||||
|
||||
if (virStorageSourceIsEmpty(disk->src)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("disk %s has no source file to be committed"),
|
||||
|
Loading…
Reference in New Issue
Block a user