mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
libxl: use virDomainObjBeginJob()
This patch removes libxlDomainObjBeginJob() and replaces it with generalized virDomainObjBeginJob(). Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
0d22febfc6
commit
31d9c22d8e
@ -43,64 +43,6 @@
|
|||||||
VIR_LOG_INIT("libxl.libxl_domain");
|
VIR_LOG_INIT("libxl.libxl_domain");
|
||||||
|
|
||||||
|
|
||||||
/* Give up waiting for mutex after 30 seconds */
|
|
||||||
#define LIBXL_JOB_WAIT_TIME (1000ull * 30)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* obj must be locked before calling, libxlDriverPrivate *must NOT be locked
|
|
||||||
*
|
|
||||||
* This must be called by anything that will change the VM state
|
|
||||||
* in any way
|
|
||||||
*
|
|
||||||
* Upon successful return, the object will have its ref count increased,
|
|
||||||
* successful calls must be followed by EndJob eventually
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
libxlDomainObjBeginJob(libxlDriverPrivate *driver G_GNUC_UNUSED,
|
|
||||||
virDomainObj *obj,
|
|
||||||
virDomainJob job)
|
|
||||||
{
|
|
||||||
unsigned long long now;
|
|
||||||
unsigned long long then;
|
|
||||||
|
|
||||||
if (virTimeMillisNow(&now) < 0)
|
|
||||||
return -1;
|
|
||||||
then = now + LIBXL_JOB_WAIT_TIME;
|
|
||||||
|
|
||||||
while (obj->job->active) {
|
|
||||||
VIR_DEBUG("Wait normal job condition for starting job: %s",
|
|
||||||
virDomainJobTypeToString(job));
|
|
||||||
if (virCondWaitUntil(&obj->job->cond, &obj->parent.lock, then) < 0)
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
virDomainObjResetJob(obj->job);
|
|
||||||
|
|
||||||
VIR_DEBUG("Starting job: %s", virDomainJobTypeToString(job));
|
|
||||||
obj->job->active = job;
|
|
||||||
obj->job->owner = virThreadSelfID();
|
|
||||||
obj->job->started = now;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
error:
|
|
||||||
VIR_WARN("Cannot start job (%s) for domain %s;"
|
|
||||||
" current job is (%s) owned by (%llu)",
|
|
||||||
virDomainJobTypeToString(job),
|
|
||||||
obj->def->name,
|
|
||||||
virDomainJobTypeToString(obj->job->active),
|
|
||||||
obj->job->owner);
|
|
||||||
|
|
||||||
if (errno == ETIMEDOUT)
|
|
||||||
virReportError(VIR_ERR_OPERATION_TIMEOUT,
|
|
||||||
"%s", _("cannot acquire state change lock"));
|
|
||||||
else
|
|
||||||
virReportSystemError(errno,
|
|
||||||
"%s", _("cannot acquire job mutex"));
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* obj must be locked before calling
|
* obj must be locked before calling
|
||||||
*
|
*
|
||||||
@ -460,7 +402,7 @@ libxlDomainShutdownThread(void *opaque)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (xl_reason == LIBXL_SHUTDOWN_REASON_POWEROFF) {
|
if (xl_reason == LIBXL_SHUTDOWN_REASON_POWEROFF) {
|
||||||
@ -589,7 +531,7 @@ libxlDomainDeathThread(void *opaque)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, VIR_DOMAIN_SHUTOFF_DESTROYED);
|
virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, VIR_DOMAIN_SHUTOFF_DESTROYED);
|
||||||
|
@ -49,12 +49,6 @@ extern const struct libxl_event_hooks ev_hooks;
|
|||||||
int
|
int
|
||||||
libxlDomainObjPrivateInitCtx(virDomainObj *vm);
|
libxlDomainObjPrivateInitCtx(virDomainObj *vm);
|
||||||
|
|
||||||
int
|
|
||||||
libxlDomainObjBeginJob(libxlDriverPrivate *driver,
|
|
||||||
virDomainObj *obj,
|
|
||||||
virDomainJob job)
|
|
||||||
G_GNUC_WARN_UNUSED_RESULT;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
libxlDomainObjEndJob(libxlDriverPrivate *driver,
|
libxlDomainObjEndJob(libxlDriverPrivate *driver,
|
||||||
virDomainObj *obj);
|
virDomainObj *obj);
|
||||||
|
@ -326,7 +326,7 @@ libxlAutostartDomain(virDomainObj *vm,
|
|||||||
virObjectLock(vm);
|
virObjectLock(vm);
|
||||||
virResetLastError();
|
virResetLastError();
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (vm->autostart && !virDomainObjIsActive(vm) &&
|
if (vm->autostart && !virDomainObjIsActive(vm) &&
|
||||||
@ -1049,7 +1049,7 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml,
|
|||||||
NULL)))
|
NULL)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0) {
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0) {
|
||||||
if (!vm->persistent)
|
if (!vm->persistent)
|
||||||
virDomainObjListRemove(driver->domains, vm);
|
virDomainObjListRemove(driver->domains, vm);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -1159,7 +1159,7 @@ libxlDomainSuspend(virDomainPtr dom)
|
|||||||
if (virDomainSuspendEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainSuspendEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjCheckActive(vm) < 0)
|
if (virDomainObjCheckActive(vm) < 0)
|
||||||
@ -1212,7 +1212,7 @@ libxlDomainResume(virDomainPtr dom)
|
|||||||
if (virDomainResumeEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainResumeEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjCheckActive(vm) < 0)
|
if (virDomainObjCheckActive(vm) < 0)
|
||||||
@ -1373,7 +1373,7 @@ libxlDomainDestroyFlags(virDomainPtr dom,
|
|||||||
if (virDomainDestroyFlagsEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainDestroyFlagsEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjCheckActive(vm) < 0)
|
if (virDomainObjCheckActive(vm) < 0)
|
||||||
@ -1446,7 +1446,7 @@ libxlDomainPMSuspendForDuration(virDomainPtr dom,
|
|||||||
if (virDomainPMSuspendForDurationEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainPMSuspendForDurationEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjCheckActive(vm) < 0)
|
if (virDomainObjCheckActive(vm) < 0)
|
||||||
@ -1499,7 +1499,7 @@ libxlDomainPMWakeup(virDomainPtr dom, unsigned int flags)
|
|||||||
if (virDomainPMWakeupEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainPMWakeupEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_PMSUSPENDED) {
|
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_PMSUSPENDED) {
|
||||||
@ -1633,7 +1633,7 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
|
|||||||
if (virDomainSetMemoryFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
|
if (virDomainSetMemoryFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainLiveConfigHelperMethod(cfg->caps, driver->xmlopt, vm, &flags,
|
if (virDomainLiveConfigHelperMethod(cfg->caps, driver->xmlopt, vm, &flags,
|
||||||
@ -1902,7 +1902,7 @@ libxlDomainSaveFlags(virDomainPtr dom, const char *to, const char *dxml,
|
|||||||
if (virDomainSaveFlagsEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainSaveFlagsEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjCheckActive(vm) < 0)
|
if (virDomainObjCheckActive(vm) < 0)
|
||||||
@ -1967,7 +1967,7 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
|
|||||||
NULL)))
|
NULL)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0) {
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0) {
|
||||||
if (!vm->persistent)
|
if (!vm->persistent)
|
||||||
virDomainObjListRemove(driver->domains, vm);
|
virDomainObjListRemove(driver->domains, vm);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -2014,7 +2014,7 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to, unsigned int flags)
|
|||||||
if (virDomainCoreDumpEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainCoreDumpEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjCheckActive(vm) < 0)
|
if (virDomainObjCheckActive(vm) < 0)
|
||||||
@ -2103,7 +2103,7 @@ libxlDomainManagedSave(virDomainPtr dom, unsigned int flags)
|
|||||||
if (virDomainManagedSaveEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainManagedSaveEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjCheckActive(vm) < 0)
|
if (virDomainObjCheckActive(vm) < 0)
|
||||||
@ -2248,7 +2248,7 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
|
|||||||
if (virDomainSetVcpusFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
|
if (virDomainSetVcpusFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!virDomainObjIsActive(vm) && (flags & VIR_DOMAIN_VCPU_LIVE)) {
|
if (!virDomainObjIsActive(vm) && (flags & VIR_DOMAIN_VCPU_LIVE)) {
|
||||||
@ -2446,7 +2446,7 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned int vcpu,
|
|||||||
if (virDomainPinVcpuFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
|
if (virDomainPinVcpuFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainLiveConfigHelperMethod(cfg->caps, driver->xmlopt, vm,
|
if (virDomainLiveConfigHelperMethod(cfg->caps, driver->xmlopt, vm,
|
||||||
@ -2777,7 +2777,7 @@ libxlDomainCreateWithFlags(virDomainPtr dom,
|
|||||||
if (virDomainCreateWithFlagsEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainCreateWithFlagsEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjIsActive(vm)) {
|
if (virDomainObjIsActive(vm)) {
|
||||||
@ -4095,7 +4095,7 @@ libxlDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
|
|||||||
if (virDomainAttachDeviceFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
|
if (virDomainAttachDeviceFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjUpdateModificationImpact(vm, &flags) < 0)
|
if (virDomainObjUpdateModificationImpact(vm, &flags) < 0)
|
||||||
@ -4189,7 +4189,7 @@ libxlDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
|
|||||||
if (virDomainDetachDeviceFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
|
if (virDomainDetachDeviceFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjUpdateModificationImpact(vm, &flags) < 0)
|
if (virDomainObjUpdateModificationImpact(vm, &flags) < 0)
|
||||||
@ -4477,7 +4477,7 @@ libxlDomainSetAutostart(virDomainPtr dom, int autostart)
|
|||||||
if (virDomainSetAutostartEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainSetAutostartEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!vm->persistent) {
|
if (!vm->persistent) {
|
||||||
@ -4683,7 +4683,7 @@ libxlDomainSetSchedulerParametersFlags(virDomainPtr dom,
|
|||||||
if (virDomainSetSchedulerParametersFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
|
if (virDomainSetSchedulerParametersFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjCheckActive(vm) < 0)
|
if (virDomainObjCheckActive(vm) < 0)
|
||||||
@ -5000,7 +5000,7 @@ libxlDomainInterfaceStats(virDomainPtr dom,
|
|||||||
if (virDomainInterfaceStatsEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainInterfaceStatsEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_QUERY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_QUERY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjCheckActive(vm) < 0)
|
if (virDomainObjCheckActive(vm) < 0)
|
||||||
@ -5168,7 +5168,7 @@ libxlDomainMemoryStats(virDomainPtr dom,
|
|||||||
if (virDomainMemoryStatsEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainMemoryStatsEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_QUERY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_QUERY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjCheckActive(vm) < 0)
|
if (virDomainObjCheckActive(vm) < 0)
|
||||||
@ -5522,7 +5522,7 @@ libxlDomainBlockStats(virDomainPtr dom,
|
|||||||
if (virDomainBlockStatsEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainBlockStatsEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_QUERY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_QUERY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjCheckActive(vm) < 0)
|
if (virDomainObjCheckActive(vm) < 0)
|
||||||
@ -5572,7 +5572,7 @@ libxlDomainBlockStatsFlags(virDomainPtr dom,
|
|||||||
if (virDomainBlockStatsFlagsEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainBlockStatsFlagsEnsureACL(dom->conn, vm->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_QUERY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_QUERY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjCheckActive(vm) < 0)
|
if (virDomainObjCheckActive(vm) < 0)
|
||||||
@ -6368,7 +6368,7 @@ libxlDomainSetMetadata(virDomainPtr dom,
|
|||||||
if (virDomainSetMetadataEnsureACL(dom->conn, vm->def, flags) < 0)
|
if (virDomainSetMetadataEnsureACL(dom->conn, vm->def, flags) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = virDomainObjSetMetadata(vm, type, metadata, key, uri,
|
ret = virDomainObjSetMetadata(vm, type, metadata, key, uri,
|
||||||
|
@ -383,7 +383,7 @@ libxlDomainMigrationSrcBegin(virConnectPtr conn,
|
|||||||
* terminated in the confirm phase. Errors in the begin or perform
|
* terminated in the confirm phase. Errors in the begin or perform
|
||||||
* phase will also terminate the job.
|
* phase will also terminate the job.
|
||||||
*/
|
*/
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(mig = libxlMigrationCookieNew(vm)))
|
if (!(mig = libxlMigrationCookieNew(vm)))
|
||||||
@ -553,7 +553,7 @@ libxlDomainMigrationDstPrepareTunnel3(virConnectPtr dconn,
|
|||||||
* Unless an error is encountered in this function, the job will
|
* Unless an error is encountered in this function, the job will
|
||||||
* be terminated in the finish phase.
|
* be terminated in the finish phase.
|
||||||
*/
|
*/
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
priv = vm->privateData;
|
priv = vm->privateData;
|
||||||
@ -662,7 +662,7 @@ libxlDomainMigrationDstPrepare(virConnectPtr dconn,
|
|||||||
* Unless an error is encountered in this function, the job will
|
* Unless an error is encountered in this function, the job will
|
||||||
* be terminated in the finish phase.
|
* be terminated in the finish phase.
|
||||||
*/
|
*/
|
||||||
if (libxlDomainObjBeginJob(driver, vm, VIR_JOB_MODIFY) < 0)
|
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
priv = vm->privateData;
|
priv = vm->privateData;
|
||||||
|
Loading…
Reference in New Issue
Block a user