goto cleanup;
}
- if (qemuDomainSupportsBlockJobs(vm, &modern) < 0)
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
+ if (!virDomainObjIsActive(vm)) {
+ virReportError(VIR_ERR_OPERATION_INVALID, "%s",
+ _("domain is not running"));
+ goto endjob;
+ }
+
+ if (qemuDomainSupportsBlockJobs(vm, &modern) < 0)
+ goto endjob;
+
if (!modern) {
if (base) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("partial block pull not supported with this "
"QEMU binary"));
- goto cleanup;
+ goto endjob;
}
if (bandwidth) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("setting bandwidth at start of block pull not "
"supported with this QEMU binary"));
- goto cleanup;
+ goto endjob;
}
}
- if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
- goto cleanup;
-
- if (!virDomainObjIsActive(vm)) {
- virReportError(VIR_ERR_OPERATION_INVALID, "%s",
- _("domain is not running"));
- goto endjob;
- }
-
if (!(device = qemuDiskPathToAlias(vm, path, &idx)))
goto endjob;
disk = vm->def->disks[idx];
if (virDomainBlockJobAbortEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
- if (qemuDomainSupportsBlockJobs(vm, &modern) < 0)
- goto cleanup;
-
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
goto endjob;
}
+ if (qemuDomainSupportsBlockJobs(vm, &modern) < 0)
+ goto endjob;
+
if (!(device = qemuDiskPathToAlias(vm, path, &idx)))
goto endjob;
disk = vm->def->disks[idx];
if (virDomainBlockJobSetSpeedEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
- if (qemuDomainSupportsBlockJobs(vm, &modern) < 0)
- goto cleanup;
-
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
goto endjob;
}
+ if (qemuDomainSupportsBlockJobs(vm, &modern) < 0)
+ goto endjob;
+
if (!(device = qemuDiskPathToAlias(vm, path, NULL)))
goto endjob;