mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: do not check return value of qemuDomainObjExitMonitor
Remove the unreachable code. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
0200cd4910
commit
d7b23755ef
@ -677,8 +677,7 @@ qemuBackupJobCancelBlockjobs(virDomainObj *vm,
|
|||||||
|
|
||||||
rc = qemuMonitorBlockJobCancel(priv->mon, job->name, true);
|
rc = qemuMonitorBlockJobCancel(priv->mon, job->name, true);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(priv->driver, vm) < 0)
|
qemuDomainObjExitMonitor(priv->driver, vm);
|
||||||
return;
|
|
||||||
|
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
backupdisk->state = VIR_DOMAIN_BACKUP_DISK_STATE_CANCELLING;
|
backupdisk->state = VIR_DOMAIN_BACKUP_DISK_STATE_CANCELLING;
|
||||||
@ -910,8 +909,7 @@ qemuBackupBegin(virDomainObj *vm,
|
|||||||
/* note that if the export fails we've already created the checkpoint
|
/* note that if the export fails we've already created the checkpoint
|
||||||
* and we will not delete it */
|
* and we will not delete it */
|
||||||
rc = qemuBackupBeginPullExportDisks(vm, dd, ndd);
|
rc = qemuBackupBeginPullExportDisks(vm, dd, ndd);
|
||||||
if (qemuDomainObjExitMonitor(priv->driver, vm) < 0)
|
qemuDomainObjExitMonitor(priv->driver, vm);
|
||||||
goto endjob;
|
|
||||||
|
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
qemuBackupJobCancelBlockjobs(vm, priv->backup, false, QEMU_ASYNC_JOB_BACKUP);
|
qemuBackupJobCancelBlockjobs(vm, priv->backup, false, QEMU_ASYNC_JOB_BACKUP);
|
||||||
@ -1003,8 +1001,7 @@ qemuBackupNotifyBlockjobEnd(virDomainObj *vm,
|
|||||||
ignore_value(qemuMonitorDelObject(priv->mon, backup->tlsAlias, false));
|
ignore_value(qemuMonitorDelObject(priv->mon, backup->tlsAlias, false));
|
||||||
if (backup->tlsSecretAlias)
|
if (backup->tlsSecretAlias)
|
||||||
ignore_value(qemuMonitorDelObject(priv->mon, backup->tlsSecretAlias, false));
|
ignore_value(qemuMonitorDelObject(priv->mon, backup->tlsSecretAlias, false));
|
||||||
if (qemuDomainObjExitMonitor(priv->driver, vm) < 0)
|
qemuDomainObjExitMonitor(priv->driver, vm);
|
||||||
return;
|
|
||||||
|
|
||||||
/* update the final statistics with the current job's data */
|
/* update the final statistics with the current job's data */
|
||||||
backup->pull_tmp_used += cur;
|
backup->pull_tmp_used += cur;
|
||||||
|
@ -2136,8 +2136,7 @@ qemuBlockStorageSourceDetachOneBlockdev(virQEMUDriver *driver,
|
|||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
ret = qemuMonitorBlockdevDel(qemuDomainGetMonitor(vm), src->nodestorage);
|
ret = qemuMonitorBlockdevDel(qemuDomainGetMonitor(vm), src->nodestorage);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -530,8 +530,7 @@ qemuBlockJobRefreshJobs(virQEMUDriver *driver,
|
|||||||
if (rc == -1 && jobinfo[i]->status == QEMU_MONITOR_JOB_STATUS_CONCLUDED)
|
if (rc == -1 && jobinfo[i]->status == QEMU_MONITOR_JOB_STATUS_CONCLUDED)
|
||||||
VIR_WARN("can't cancel job '%s' with invalid data", job->name);
|
VIR_WARN("can't cancel job '%s' with invalid data", job->name);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
qemuBlockJobUnregister(job, vm);
|
qemuBlockJobUnregister(job, vm);
|
||||||
@ -847,8 +846,8 @@ qemuBlockJobEventProcessConcludedRemoveChain(virQEMUDriver *driver,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
qemuBlockStorageSourceChainDetach(qemuDomainGetMonitor(vm), data);
|
qemuBlockStorageSourceChainDetach(qemuDomainGetMonitor(vm), data);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
|
||||||
return;
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
|
|
||||||
qemuDomainStorageSourceChainAccessRevoke(driver, vm, chain);
|
qemuDomainStorageSourceChainAccessRevoke(driver, vm, chain);
|
||||||
}
|
}
|
||||||
@ -964,8 +963,7 @@ qemuBlockJobProcessEventCompletedPullBitmaps(virDomainObj *vm,
|
|||||||
|
|
||||||
qemuMonitorTransaction(priv->mon, &actions);
|
qemuMonitorTransaction(priv->mon, &actions);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(priv->driver, vm) < 0)
|
qemuDomainObjExitMonitor(priv->driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1138,8 +1136,7 @@ qemuBlockJobProcessEventCompletedCommitBitmaps(virDomainObj *vm,
|
|||||||
|
|
||||||
qemuMonitorTransaction(priv->mon, &actions);
|
qemuMonitorTransaction(priv->mon, &actions);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(priv->driver, vm) < 0)
|
qemuDomainObjExitMonitor(priv->driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (!active) {
|
if (!active) {
|
||||||
if (qemuBlockReopenReadOnly(vm, job->data.commit.base, asyncJob) < 0)
|
if (qemuBlockReopenReadOnly(vm, job->data.commit.base, asyncJob) < 0)
|
||||||
@ -1359,8 +1356,7 @@ qemuBlockJobProcessEventCompletedCopyBitmaps(virDomainObj *vm,
|
|||||||
|
|
||||||
qemuMonitorTransaction(priv->mon, &actions);
|
qemuMonitorTransaction(priv->mon, &actions);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(priv->driver, vm) < 0)
|
qemuDomainObjExitMonitor(priv->driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1442,8 +1438,7 @@ qemuBlockJobProcessEventFailedActiveCommit(virQEMUDriver *driver,
|
|||||||
disk->mirror->nodeformat,
|
disk->mirror->nodeformat,
|
||||||
"libvirt-tmp-activewrite");
|
"libvirt-tmp-activewrite");
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(priv->driver, vm) < 0)
|
qemuDomainObjExitMonitor(priv->driver, vm);
|
||||||
return;
|
|
||||||
|
|
||||||
/* Ideally, we would make the backing chain read only again (yes, SELinux
|
/* Ideally, we would make the backing chain read only again (yes, SELinux
|
||||||
* can do that using different labels). But that is not implemented yet and
|
* can do that using different labels). But that is not implemented yet and
|
||||||
@ -1491,8 +1486,7 @@ qemuBlockJobProcessEventConcludedCreate(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuBlockStorageSourceAttachRollback(qemuDomainGetMonitor(vm), backend);
|
qemuBlockStorageSourceAttachRollback(qemuDomainGetMonitor(vm), backend);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return;
|
|
||||||
|
|
||||||
qemuDomainStorageSourceAccessRevoke(driver, vm, job->data.create.src);
|
qemuDomainStorageSourceAccessRevoke(driver, vm, job->data.create.src);
|
||||||
}
|
}
|
||||||
@ -1527,8 +1521,7 @@ qemuBlockJobProcessEventConcludedBackup(virQEMUDriver *driver,
|
|||||||
job->disk->src->nodeformat,
|
job->disk->src->nodeformat,
|
||||||
job->data.backup.bitmap);
|
job->data.backup.bitmap);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return;
|
|
||||||
|
|
||||||
if (job->data.backup.store)
|
if (job->data.backup.store)
|
||||||
qemuDomainStorageSourceAccessRevoke(driver, vm, job->data.backup.store);
|
qemuDomainStorageSourceAccessRevoke(driver, vm, job->data.backup.store);
|
||||||
@ -1641,8 +1634,7 @@ qemuBlockJobEventProcessConcluded(qemuBlockJobData *job,
|
|||||||
/* dismiss job in qemu */
|
/* dismiss job in qemu */
|
||||||
ignore_value(qemuMonitorJobDismiss(qemuDomainGetMonitor(vm), job->name));
|
ignore_value(qemuMonitorJobDismiss(qemuDomainGetMonitor(vm), job->name));
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if ((job->newstate == QEMU_BLOCKJOB_STATE_COMPLETED ||
|
if ((job->newstate == QEMU_BLOCKJOB_STATE_COMPLETED ||
|
||||||
job->newstate == QEMU_BLOCKJOB_STATE_FAILED) &&
|
job->newstate == QEMU_BLOCKJOB_STATE_FAILED) &&
|
||||||
|
@ -237,8 +237,7 @@ qemuCheckpointDiscardBitmaps(virDomainObj *vm,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
rc = qemuMonitorTransaction(priv->mon, &actions);
|
rc = qemuMonitorTransaction(priv->mon, &actions);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
relabel:
|
relabel:
|
||||||
for (next = relabelimages; next; next = next->next) {
|
for (next = relabelimages; next; next = next->next) {
|
||||||
|
@ -8181,8 +8181,7 @@ qemuDomainUpdateDeviceList(virQEMUDriver *driver,
|
|||||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
rc = qemuMonitorGetDeviceAliases(priv->mon, &aliases);
|
rc = qemuMonitorGetDeviceAliases(priv->mon, &aliases);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -8210,10 +8209,7 @@ qemuDomainUpdateMemoryDeviceInfo(virQEMUDriver *driver,
|
|||||||
|
|
||||||
rc = qemuMonitorGetMemoryDeviceInfo(priv->mon, &meminfo);
|
rc = qemuMonitorGetMemoryDeviceInfo(priv->mon, &meminfo);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
virHashFree(meminfo);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -9480,8 +9476,7 @@ qemuDomainRefreshVcpuInfo(virQEMUDriver *driver,
|
|||||||
rc = qemuMonitorGetCPUInfo(qemuDomainGetMonitor(vm), &info, maxvcpus,
|
rc = qemuMonitorGetCPUInfo(qemuDomainGetMonitor(vm), &info, maxvcpus,
|
||||||
hotplug, fast);
|
hotplug, fast);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -10054,8 +10049,7 @@ qemuDomainCheckMonitor(virQEMUDriver *driver,
|
|||||||
|
|
||||||
ret = qemuMonitorCheck(priv->mon);
|
ret = qemuMonitorCheck(priv->mon);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1942,8 +1942,7 @@ qemuDomainShutdownFlagsMonitor(virQEMUDriver *driver,
|
|||||||
qemuDomainSetFakeReboot(driver, vm, isReboot);
|
qemuDomainSetFakeReboot(driver, vm, isReboot);
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorSystemPowerdown(priv->mon);
|
ret = qemuMonitorSystemPowerdown(priv->mon);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
qemuDomainObjEndJob(driver, vm);
|
qemuDomainObjEndJob(driver, vm);
|
||||||
@ -2068,8 +2067,7 @@ qemuDomainRebootMonitor(virQEMUDriver *driver,
|
|||||||
qemuDomainSetFakeReboot(driver, vm, isReboot);
|
qemuDomainSetFakeReboot(driver, vm, isReboot);
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorSystemPowerdown(priv->mon);
|
ret = qemuMonitorSystemPowerdown(priv->mon);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
qemuDomainObjEndJob(driver, vm);
|
qemuDomainObjEndJob(driver, vm);
|
||||||
@ -2158,8 +2156,7 @@ qemuDomainReset(virDomainPtr dom, unsigned int flags)
|
|||||||
priv = vm->privateData;
|
priv = vm->privateData;
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorSystemReset(priv->mon);
|
ret = qemuMonitorSystemReset(priv->mon);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
priv->fakeReboot = false;
|
priv->fakeReboot = false;
|
||||||
|
|
||||||
@ -2474,8 +2471,7 @@ static int qemuDomainSetMemoryStatsPeriod(virDomainPtr dom, int period,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
r = qemuMonitorSetMemoryStatsPeriod(priv->mon, def->memballoon, period);
|
r = qemuMonitorSetMemoryStatsPeriod(priv->mon, def->memballoon, period);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto endjob;
|
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("unable to set balloon driver collection period"));
|
_("unable to set balloon driver collection period"));
|
||||||
@ -2532,8 +2528,7 @@ static int qemuDomainInjectNMI(virDomainPtr domain, unsigned int flags)
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorInjectNMI(priv->mon);
|
ret = qemuMonitorInjectNMI(priv->mon);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
qemuDomainObjEndJob(driver, vm);
|
qemuDomainObjEndJob(driver, vm);
|
||||||
@ -2592,8 +2587,7 @@ static int qemuDomainSendKey(virDomainPtr domain,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorSendKey(priv->mon, holdtime, keycodes, nkeycodes);
|
ret = qemuMonitorSendKey(priv->mon, holdtime, keycodes, nkeycodes);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
qemuDomainObjEndJob(driver, vm);
|
qemuDomainObjEndJob(driver, vm);
|
||||||
@ -3312,8 +3306,7 @@ qemuDomainCoreDumpWithFormat(virDomainPtr dom,
|
|||||||
if ((ret == 0) && (flags & VIR_DUMP_RESET)) {
|
if ((ret == 0) && (flags & VIR_DUMP_RESET)) {
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorSystemReset(priv->mon);
|
ret = qemuMonitorSystemReset(priv->mon);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resume && virDomainObjIsActive(vm)) {
|
if (resume && virDomainObjIsActive(vm)) {
|
||||||
@ -3430,8 +3423,7 @@ qemuDomainScreenshot(virDomainPtr dom,
|
|||||||
ignore_value(qemuDomainObjExitMonitor(driver, vm));
|
ignore_value(qemuDomainObjExitMonitor(driver, vm));
|
||||||
goto endjob;
|
goto endjob;
|
||||||
}
|
}
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto endjob;
|
|
||||||
|
|
||||||
if (VIR_CLOSE(tmp_fd) < 0) {
|
if (VIR_CLOSE(tmp_fd) < 0) {
|
||||||
virReportSystemError(errno, _("unable to close %s"), tmp);
|
virReportSystemError(errno, _("unable to close %s"), tmp);
|
||||||
@ -3931,8 +3923,7 @@ processNicRxFilterChangedEvent(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorQueryRxFilter(priv->mon, devAlias, &guestFilter);
|
ret = qemuMonitorQueryRxFilter(priv->mon, devAlias, &guestFilter);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
@ -4978,8 +4969,7 @@ qemuDomainGetIOThreadsMon(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorGetIOThreads(priv->mon, iothreads, niothreads);
|
ret = qemuMonitorGetIOThreads(priv->mon, iothreads, niothreads);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -5266,8 +5256,7 @@ qemuDomainHotplugAddIOThread(virQEMUDriver *driver,
|
|||||||
if (qemuMonitorGetIOThreads(priv->mon, &new_iothreads, &new_niothreads) < 0)
|
if (qemuMonitorGetIOThreads(priv->mon, &new_iothreads, &new_niothreads) < 0)
|
||||||
goto exit_monitor;
|
goto exit_monitor;
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (new_niothreads != exp_niothreads) {
|
if (new_niothreads != exp_niothreads) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
@ -5352,8 +5341,7 @@ qemuDomainHotplugModIOThread(virQEMUDriver *driver,
|
|||||||
|
|
||||||
rc = qemuMonitorSetIOThread(priv->mon, &iothread);
|
rc = qemuMonitorSetIOThread(priv->mon, &iothread);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -5389,8 +5377,7 @@ qemuDomainHotplugDelIOThread(virQEMUDriver *driver,
|
|||||||
if (qemuMonitorGetIOThreads(priv->mon, &new_iothreads, &new_niothreads) < 0)
|
if (qemuMonitorGetIOThreads(priv->mon, &new_iothreads, &new_niothreads) < 0)
|
||||||
goto exit_monitor;
|
goto exit_monitor;
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (new_niothreads != exp_niothreads) {
|
if (new_niothreads != exp_niothreads) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
@ -9924,8 +9911,7 @@ qemuDomainBlockResize(virDomainPtr dom,
|
|||||||
ignore_value(qemuDomainObjExitMonitor(driver, vm));
|
ignore_value(qemuDomainObjExitMonitor(driver, vm));
|
||||||
goto endjob;
|
goto endjob;
|
||||||
}
|
}
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto endjob;
|
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
@ -10641,8 +10627,7 @@ qemuDomainMemoryStatsInternal(virQEMUDriver *driver,
|
|||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorGetMemoryStats(qemuDomainGetMonitor(vm),
|
ret = qemuMonitorGetMemoryStats(qemuDomainGetMonitor(vm),
|
||||||
vm->def->memballoon, stats, nr_stats);
|
vm->def->memballoon, stats, nr_stats);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
if (ret < 0 || ret >= nr_stats)
|
if (ret < 0 || ret >= nr_stats)
|
||||||
return ret;
|
return ret;
|
||||||
@ -10819,8 +10804,7 @@ qemuDomainMemoryPeek(virDomainPtr dom,
|
|||||||
goto endjob;
|
goto endjob;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto endjob;
|
|
||||||
|
|
||||||
/* Read the memory file into buffer. */
|
/* Read the memory file into buffer. */
|
||||||
if (saferead(fd, buffer, size) == (ssize_t)-1) {
|
if (saferead(fd, buffer, size) == (ssize_t)-1) {
|
||||||
@ -12787,8 +12771,7 @@ qemuDomainAbortJobMigration(virDomainObj *vm)
|
|||||||
qemuDomainObjAbortAsyncJob(vm);
|
qemuDomainObjAbortAsyncJob(vm);
|
||||||
qemuDomainObjEnterMonitor(priv->driver, vm);
|
qemuDomainObjEnterMonitor(priv->driver, vm);
|
||||||
ret = qemuMonitorMigrateCancel(priv->mon);
|
ret = qemuMonitorMigrateCancel(priv->mon);
|
||||||
if (qemuDomainObjExitMonitor(priv->driver, vm) < 0)
|
qemuDomainObjExitMonitor(priv->driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -13345,8 +13328,7 @@ qemuDomainMigrateStartPostCopy(virDomainPtr dom,
|
|||||||
VIR_DEBUG("Starting post-copy");
|
VIR_DEBUG("Starting post-copy");
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorMigrateStartPostCopy(priv->mon);
|
ret = qemuMonitorMigrateStartPostCopy(priv->mon);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
qemuDomainObjEndJob(driver, vm);
|
qemuDomainObjEndJob(driver, vm);
|
||||||
@ -14060,8 +14042,7 @@ static int qemuDomainQemuMonitorCommand(virDomainPtr domain, const char *cmd,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorArbitraryCommand(priv->mon, cmd, result, hmp);
|
ret = qemuMonitorArbitraryCommand(priv->mon, cmd, result, hmp);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
qemuDomainObjEndJob(driver, vm);
|
qemuDomainObjEndJob(driver, vm);
|
||||||
@ -14336,8 +14317,7 @@ qemuDomainBlockPivot(virQEMUDriver *driver,
|
|||||||
} else {
|
} else {
|
||||||
ret = qemuMonitorDrivePivot(priv->mon, job->name);
|
ret = qemuMonitorDrivePivot(priv->mon, job->name);
|
||||||
}
|
}
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
/* The pivot failed. The block job in QEMU remains in the synchronised state */
|
/* The pivot failed. The block job in QEMU remains in the synchronised state */
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -14468,8 +14448,7 @@ qemuDomainBlockPullCommon(virDomainObj *vm,
|
|||||||
(!baseSource || basePath))
|
(!baseSource || basePath))
|
||||||
ret = qemuMonitorBlockStream(priv->mon, device, jobname, persistjob, basePath,
|
ret = qemuMonitorBlockStream(priv->mon, device, jobname, persistjob, basePath,
|
||||||
nodebase, backingPath, speed);
|
nodebase, backingPath, speed);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
@ -14543,10 +14522,7 @@ qemuDomainBlockJobAbort(virDomainPtr dom,
|
|||||||
} else {
|
} else {
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorBlockJobCancel(priv->mon, job->name, false);
|
ret = qemuMonitorBlockJobCancel(priv->mon, job->name, false);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
goto endjob;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
@ -14761,8 +14737,7 @@ qemuDomainBlockJobSetSpeed(virDomainPtr dom,
|
|||||||
ret = qemuMonitorBlockJobSetSpeed(qemuDomainGetMonitor(vm),
|
ret = qemuMonitorBlockJobSetSpeed(qemuDomainGetMonitor(vm),
|
||||||
job->name,
|
job->name,
|
||||||
speed);
|
speed);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
qemuDomainObjEndJob(driver, vm);
|
qemuDomainObjEndJob(driver, vm);
|
||||||
@ -15145,8 +15120,7 @@ qemuDomainBlockCopyCommon(virDomainObj *vm,
|
|||||||
if (data) {
|
if (data) {
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
rc = qemuBlockStorageSourceChainAttach(priv->mon, data);
|
rc = qemuBlockStorageSourceChainAttach(priv->mon, data);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto endjob;
|
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
@ -15180,8 +15154,7 @@ qemuDomainBlockCopyCommon(virDomainObj *vm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
virDomainAuditDisk(vm, NULL, mirror, "mirror", ret >= 0);
|
virDomainAuditDisk(vm, NULL, mirror, "mirror", ret >= 0);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
qemuDomainStorageSourceChainAccessRevoke(driver, vm, mirror);
|
qemuDomainStorageSourceChainAccessRevoke(driver, vm, mirror);
|
||||||
goto endjob;
|
goto endjob;
|
||||||
@ -15710,8 +15683,7 @@ qemuDomainOpenGraphics(virDomainPtr dom,
|
|||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorOpenGraphics(priv->mon, protocol, fd, "graphicsfd",
|
ret = qemuMonitorOpenGraphics(priv->mon, protocol, fd, "graphicsfd",
|
||||||
(flags & VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH) != 0);
|
(flags & VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH) != 0);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
qemuDomainObjEndJob(driver, vm);
|
qemuDomainObjEndJob(driver, vm);
|
||||||
@ -15787,8 +15759,7 @@ qemuDomainOpenGraphicsFD(virDomainPtr dom,
|
|||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorOpenGraphics(priv->mon, protocol, pair[1], "graphicsfd",
|
ret = qemuMonitorOpenGraphics(priv->mon, protocol, pair[1], "graphicsfd",
|
||||||
(flags & VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH));
|
(flags & VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH));
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
qemuDomainObjEndJob(driver, vm);
|
qemuDomainObjEndJob(driver, vm);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -16224,8 +16195,9 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
rc = qemuMonitorSetBlockIoThrottle(priv->mon, drivealias, qdevid, &info);
|
rc = qemuMonitorSetBlockIoThrottle(priv->mon, drivealias, qdevid, &info);
|
||||||
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0)
|
if (rc < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16355,8 +16327,9 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
|
|||||||
}
|
}
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
rc = qemuMonitorGetBlockIoThrottle(priv->mon, drivealias, qdevid, &reply);
|
rc = qemuMonitorGetBlockIoThrottle(priv->mon, drivealias, qdevid, &reply);
|
||||||
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0)
|
if (rc < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16474,8 +16447,7 @@ qemuDomainGetDiskErrors(virDomainPtr dom,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
table = qemuMonitorGetBlockInfo(priv->mon);
|
table = qemuMonitorGetBlockInfo(priv->mon);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto endjob;
|
|
||||||
if (!table)
|
if (!table)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
@ -16806,8 +16778,7 @@ qemuDomainPMWakeup(virDomainPtr dom,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorSystemWakeup(priv->mon);
|
ret = qemuMonitorSystemWakeup(priv->mon);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
qemuDomainObjEndJob(driver, vm);
|
qemuDomainObjEndJob(driver, vm);
|
||||||
@ -17367,8 +17338,9 @@ qemuDomainSetTime(virDomainPtr dom,
|
|||||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_RTC_RESET_REINJECTION)) {
|
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_RTC_RESET_REINJECTION)) {
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
rv = qemuMonitorRTCResetReinjection(priv->mon);
|
rv = qemuMonitorRTCResetReinjection(priv->mon);
|
||||||
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rv < 0)
|
if (rv < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -18498,8 +18470,7 @@ qemuDomainGetStatsBlock(virQEMUDriver *driver,
|
|||||||
if (fetchnodedata)
|
if (fetchnodedata)
|
||||||
nodedata = qemuMonitorQueryNamedBlockNodes(priv->mon);
|
nodedata = qemuMonitorQueryNamedBlockNodes(priv->mon);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, dom) < 0)
|
qemuDomainObjExitMonitor(driver, dom);
|
||||||
return -1;
|
|
||||||
|
|
||||||
/* failure to retrieve stats is fine at this point */
|
/* failure to retrieve stats is fine at this point */
|
||||||
if (rc < 0 || (fetchnodedata && !nodedata))
|
if (rc < 0 || (fetchnodedata && !nodedata))
|
||||||
@ -18637,8 +18608,7 @@ qemuDomainGetStatsDirtyRateMon(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorQueryDirtyRate(priv->mon, info);
|
ret = qemuMonitorQueryDirtyRate(priv->mon, info);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -20008,8 +19978,7 @@ qemuDomainGetSEVMeasurement(virQEMUDriver *driver,
|
|||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
tmp = qemuMonitorGetSEVMeasurement(QEMU_DOMAIN_PRIVATE(vm)->mon);
|
tmp = qemuMonitorGetSEVMeasurement(QEMU_DOMAIN_PRIVATE(vm)->mon);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto endjob;
|
|
||||||
|
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
@ -20675,8 +20644,7 @@ qemuDomainStartDirtyRateCalc(virDomainPtr dom,
|
|||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorStartDirtyRateCalc(priv->mon, seconds);
|
ret = qemuMonitorStartDirtyRateCalc(priv->mon, seconds);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
qemuDomainObjEndJob(driver, vm);
|
qemuDomainObjEndJob(driver, vm);
|
||||||
|
@ -109,10 +109,7 @@ qemuDomainDeleteDevice(virDomainObj *vm,
|
|||||||
|
|
||||||
rc = qemuMonitorDelDevice(priv->mon, alias);
|
rc = qemuMonitorDelDevice(priv->mon, alias);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
/* Domain is no longer running. No cleanup needed. */
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
/* Deleting device failed. Let's check if DEVICE_DELETED
|
/* Deleting device failed. Let's check if DEVICE_DELETED
|
||||||
@ -272,8 +269,7 @@ qemuDomainChangeMediaLegacy(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
rc = qemuMonitorEjectMedia(priv->mon, driveAlias, force);
|
rc = qemuMonitorEjectMedia(priv->mon, driveAlias, force);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
/* If the tray is present wait for it to open. */
|
/* If the tray is present wait for it to open. */
|
||||||
if (!force && diskPriv->tray) {
|
if (!force && diskPriv->tray) {
|
||||||
@ -305,8 +301,7 @@ qemuDomainChangeMediaLegacy(virQEMUDriver *driver,
|
|||||||
driveAlias,
|
driveAlias,
|
||||||
sourcestr,
|
sourcestr,
|
||||||
format);
|
format);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
@ -354,8 +349,7 @@ qemuHotplugAttachDBusVMState(virQEMUDriver *driver,
|
|||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
priv->dbusVMState = true;
|
priv->dbusVMState = true;
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -391,8 +385,7 @@ qemuHotplugRemoveDBusVMState(virQEMUDriver *driver,
|
|||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
priv->dbusVMState = false;
|
priv->dbusVMState = false;
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -479,8 +472,7 @@ qemuHotplugRemoveManagedPR(virQEMUDriver *driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
ignore_value(qemuMonitorDelObject(priv->mon, qemuDomainGetManagedPRAlias(),
|
ignore_value(qemuMonitorDelObject(priv->mon, qemuDomainGetManagedPRAlias(),
|
||||||
false));
|
false));
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
qemuProcessKillManagedPRDaemon(vm);
|
qemuProcessKillManagedPRDaemon(vm);
|
||||||
|
|
||||||
@ -757,8 +749,7 @@ qemuDomainAttachDiskGeneric(virQEMUDriver *driver,
|
|||||||
|
|
||||||
rc = qemuBlockStorageSourceChainAttach(priv->mon, data);
|
rc = qemuBlockStorageSourceChainAttach(priv->mon, data);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -2;
|
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto rollback;
|
goto rollback;
|
||||||
@ -808,8 +799,7 @@ qemuDomainAttachDiskGeneric(virQEMUDriver *driver,
|
|||||||
VIR_WARN("failed to set blkdeviotune for '%s' of '%s'", disk->dst, vm->def->name);
|
VIR_WARN("failed to set blkdeviotune for '%s' of '%s'", disk->dst, vm->def->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -2;
|
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto rollback;
|
goto rollback;
|
||||||
@ -825,8 +815,7 @@ qemuDomainAttachDiskGeneric(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuBlockStorageSourceChainDetach(priv->mon, data);
|
qemuBlockStorageSourceChainDetach(priv->mon, data);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -2;
|
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -890,11 +879,7 @@ int qemuDomainAttachControllerDevice(virQEMUDriver *driver,
|
|||||||
ignore_value(qemuDomainDetachExtensionDevice(priv->mon, &controller->info));
|
ignore_value(qemuDomainDetachExtensionDevice(priv->mon, &controller->info));
|
||||||
|
|
||||||
exit_monitor:
|
exit_monitor:
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
releaseaddr = false;
|
|
||||||
ret = -1;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
virDomainControllerInsertPreAlloced(vm->def, controller);
|
virDomainControllerInsertPreAlloced(vm->def, controller);
|
||||||
@ -1484,8 +1469,7 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
|
|||||||
}
|
}
|
||||||
netdevPlugged = true;
|
netdevPlugged = true;
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
for (i = 0; i < tapfdSize; i++)
|
for (i = 0; i < tapfdSize; i++)
|
||||||
VIR_FORCE_CLOSE(tapfd[i]);
|
VIR_FORCE_CLOSE(tapfd[i]);
|
||||||
@ -1509,8 +1493,7 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
|
|||||||
virDomainAuditNet(vm, NULL, net, "attach", false);
|
virDomainAuditNet(vm, NULL, net, "attach", false);
|
||||||
goto try_remove;
|
goto try_remove;
|
||||||
}
|
}
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
/* set link state */
|
/* set link state */
|
||||||
if (net->linkstate == VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DOWN) {
|
if (net->linkstate == VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DOWN) {
|
||||||
@ -1526,8 +1509,7 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
|
|||||||
goto try_remove;
|
goto try_remove;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
}
|
}
|
||||||
/* link set to down */
|
/* link set to down */
|
||||||
}
|
}
|
||||||
@ -1725,8 +1707,7 @@ qemuDomainAttachHostPCIDevice(virQEMUDriver *driver,
|
|||||||
ignore_value(qemuDomainDetachExtensionDevice(priv->mon, hostdev->info));
|
ignore_value(qemuDomainDetachExtensionDevice(priv->mon, hostdev->info));
|
||||||
|
|
||||||
exit_monitor:
|
exit_monitor:
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto error;
|
|
||||||
|
|
||||||
virDomainAuditHostdev(vm, hostdev, "attach", ret == 0);
|
virDomainAuditHostdev(vm, hostdev, "attach", ret == 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -1937,8 +1918,7 @@ qemuDomainDelChardevTLSObjects(virQEMUDriver *driver,
|
|||||||
if (secAlias)
|
if (secAlias)
|
||||||
ignore_value(qemuMonitorDelObject(priv->mon, secAlias, false));
|
ignore_value(qemuMonitorDelObject(priv->mon, secAlias, false));
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1985,8 +1965,7 @@ int qemuDomainAttachRedirdevDevice(virQEMUDriver *driver,
|
|||||||
if (qemuMonitorAddDeviceProps(priv->mon, &devprops) < 0)
|
if (qemuMonitorAddDeviceProps(priv->mon, &devprops) < 0)
|
||||||
goto exit_monitor;
|
goto exit_monitor;
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto audit;
|
|
||||||
|
|
||||||
def->redirdevs[def->nredirdevs++] = redirdev;
|
def->redirdevs[def->nredirdevs++] = redirdev;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@ -2251,8 +2230,7 @@ int qemuDomainAttachChrDevice(virQEMUDriver *driver,
|
|||||||
goto exit_monitor;
|
goto exit_monitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto audit;
|
|
||||||
|
|
||||||
qemuDomainChrInsertPreAlloced(vmdef, chr);
|
qemuDomainChrInsertPreAlloced(vmdef, chr);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@ -2358,10 +2336,7 @@ qemuDomainAttachRNGDevice(virQEMUDriver *driver,
|
|||||||
goto exit_monitor;
|
goto exit_monitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
releaseaddr = false;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
VIR_APPEND_ELEMENT_INPLACE(vm->def->rngs, vm->def->nrngs, rng);
|
VIR_APPEND_ELEMENT_INPLACE(vm->def->rngs, vm->def->nrngs, rng);
|
||||||
|
|
||||||
@ -2388,8 +2363,7 @@ qemuDomainAttachRNGDevice(virQEMUDriver *driver,
|
|||||||
ignore_value(qemuMonitorDelObject(priv->mon, objAlias, false));
|
ignore_value(qemuMonitorDelObject(priv->mon, objAlias, false));
|
||||||
if (rng->backend == VIR_DOMAIN_RNG_BACKEND_EGD && chardevAdded)
|
if (rng->backend == VIR_DOMAIN_RNG_BACKEND_EGD && chardevAdded)
|
||||||
ignore_value(qemuMonitorDetachCharDev(priv->mon, charAlias));
|
ignore_value(qemuMonitorDetachCharDev(priv->mon, charAlias));
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
releaseaddr = false;
|
|
||||||
virErrorRestore(&orig_err);
|
virErrorRestore(&orig_err);
|
||||||
|
|
||||||
qemuDomainDelTLSObjects(driver, vm, QEMU_ASYNC_JOB_NONE,
|
qemuDomainDelTLSObjects(driver, vm, QEMU_ASYNC_JOB_NONE,
|
||||||
@ -2482,11 +2456,7 @@ qemuDomainAttachMemory(virQEMUDriver *driver,
|
|||||||
if (qemuMonitorAddDeviceProps(priv->mon, &devprops) < 0)
|
if (qemuMonitorAddDeviceProps(priv->mon, &devprops) < 0)
|
||||||
goto exit_monitor;
|
goto exit_monitor;
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
/* we shouldn't touch mem now, as the def might be freed */
|
|
||||||
mem = NULL;
|
|
||||||
goto audit;
|
|
||||||
}
|
|
||||||
|
|
||||||
event = virDomainEventDeviceAddedNewFromObj(vm, objalias);
|
event = virDomainEventDeviceAddedNewFromObj(vm, objalias);
|
||||||
virObjectEventStateQueue(driver->domainEventState, event);
|
virObjectEventStateQueue(driver->domainEventState, event);
|
||||||
@ -2526,8 +2496,7 @@ qemuDomainAttachMemory(virQEMUDriver *driver,
|
|||||||
virErrorPreserveLast(&orig_err);
|
virErrorPreserveLast(&orig_err);
|
||||||
if (objAdded)
|
if (objAdded)
|
||||||
ignore_value(qemuMonitorDelObject(priv->mon, objalias, false));
|
ignore_value(qemuMonitorDelObject(priv->mon, objalias, false));
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
mem = NULL;
|
|
||||||
|
|
||||||
if (objAdded && mem)
|
if (objAdded && mem)
|
||||||
ignore_value(qemuProcessDestroyMemoryBackingPath(driver, vm, mem));
|
ignore_value(qemuProcessDestroyMemoryBackingPath(driver, vm, mem));
|
||||||
@ -2592,10 +2561,7 @@ qemuDomainAttachHostUSBDevice(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorAddDeviceProps(priv->mon, &devprops);
|
ret = qemuMonitorAddDeviceProps(priv->mon, &devprops);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
virDomainAuditHostdev(vm, hostdev, "attach", ret == 0);
|
virDomainAuditHostdev(vm, hostdev, "attach", ret == 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -2688,8 +2654,7 @@ qemuDomainAttachHostSCSIDevice(virQEMUDriver *driver,
|
|||||||
if (qemuMonitorAddDeviceProps(priv->mon, &devprops) < 0)
|
if (qemuMonitorAddDeviceProps(priv->mon, &devprops) < 0)
|
||||||
goto exit_monitor;
|
goto exit_monitor;
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
virDomainAuditHostdev(vm, hostdev, "attach", true);
|
virDomainAuditHostdev(vm, hostdev, "attach", true);
|
||||||
|
|
||||||
@ -2906,10 +2871,7 @@ qemuDomainAttachMediatedDevice(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorAddDeviceProps(priv->mon, &devprops);
|
ret = qemuMonitorAddDeviceProps(priv->mon, &devprops);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
virDomainAuditHostdev(vm, hostdev, "attach", ret == 0);
|
virDomainAuditHostdev(vm, hostdev, "attach", ret == 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -3063,10 +3025,7 @@ qemuDomainAttachShmemDevice(virQEMUDriver *driver,
|
|||||||
goto exit_monitor;
|
goto exit_monitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
release_address = false;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Doing a copy here just so the pointer doesn't get nullified
|
/* Doing a copy here just so the pointer doesn't get nullified
|
||||||
* because we need it in the audit function */
|
* because we need it in the audit function */
|
||||||
@ -3095,8 +3054,7 @@ qemuDomainAttachShmemDevice(virQEMUDriver *driver,
|
|||||||
ignore_value(qemuMonitorDelObject(priv->mon, memAlias, false));
|
ignore_value(qemuMonitorDelObject(priv->mon, memAlias, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
release_address = false;
|
|
||||||
|
|
||||||
virErrorRestore(&orig_err);
|
virErrorRestore(&orig_err);
|
||||||
|
|
||||||
@ -3195,10 +3153,7 @@ qemuDomainAttachWatchdog(virQEMUDriver *driver,
|
|||||||
if (rv >= 0)
|
if (rv >= 0)
|
||||||
rv = qemuMonitorAddDeviceProps(priv->mon, &props);
|
rv = qemuMonitorAddDeviceProps(priv->mon, &props);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
releaseAddress = false;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rv < 0)
|
if (rv < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -3285,10 +3240,7 @@ qemuDomainAttachInputDevice(virQEMUDriver *driver,
|
|||||||
goto exit_monitor;
|
goto exit_monitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
releaseaddr = false;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
VIR_APPEND_ELEMENT_COPY_INPLACE(vm->def->inputs, vm->def->ninputs, input);
|
VIR_APPEND_ELEMENT_COPY_INPLACE(vm->def->inputs, vm->def->ninputs, input);
|
||||||
|
|
||||||
@ -3314,10 +3266,7 @@ qemuDomainAttachInputDevice(virQEMUDriver *driver,
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
exit_monitor:
|
exit_monitor:
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
releaseaddr = false;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
goto audit;
|
goto audit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3374,10 +3323,7 @@ qemuDomainAttachVsockDevice(virQEMUDriver *driver,
|
|||||||
if ((ret = qemuMonitorAddDeviceProps(priv->mon, &devprops)) < 0)
|
if ((ret = qemuMonitorAddDeviceProps(priv->mon, &devprops)) < 0)
|
||||||
goto exit_monitor;
|
goto exit_monitor;
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
releaseaddr = false;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
vm->def->vsock = g_steal_pointer(&vsock);
|
vm->def->vsock = g_steal_pointer(&vsock);
|
||||||
|
|
||||||
@ -3398,8 +3344,7 @@ qemuDomainAttachVsockDevice(virQEMUDriver *driver,
|
|||||||
ignore_value(qemuMonitorCloseFileHandle(priv->mon, fdname));
|
ignore_value(qemuMonitorCloseFileHandle(priv->mon, fdname));
|
||||||
if (removeextension)
|
if (removeextension)
|
||||||
ignore_value(qemuDomainDetachExtensionDevice(priv->mon, &vsock->info));
|
ignore_value(qemuDomainDetachExtensionDevice(priv->mon, &vsock->info));
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
releaseaddr = false;
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3467,10 +3412,7 @@ qemuDomainAttachFSDevice(virQEMUDriver *driver,
|
|||||||
goto exit_monitor;
|
goto exit_monitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
releaseaddr = false;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
VIR_APPEND_ELEMENT_COPY(vm->def->fss, vm->def->nfss, fs);
|
VIR_APPEND_ELEMENT_COPY(vm->def->fss, vm->def->nfss, fs);
|
||||||
|
|
||||||
@ -3494,8 +3436,7 @@ qemuDomainAttachFSDevice(virQEMUDriver *driver,
|
|||||||
virErrorPreserveLast(&origErr);
|
virErrorPreserveLast(&origErr);
|
||||||
if (chardevAdded)
|
if (chardevAdded)
|
||||||
ignore_value(qemuMonitorDetachCharDev(priv->mon, charAlias));
|
ignore_value(qemuMonitorDetachCharDev(priv->mon, charAlias));
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
releaseaddr = false;
|
|
||||||
virErrorRestore(&origErr);
|
virErrorRestore(&origErr);
|
||||||
goto audit;
|
goto audit;
|
||||||
}
|
}
|
||||||
@ -3664,8 +3605,7 @@ int qemuDomainChangeNetLinkState(virQEMUDriver *driver,
|
|||||||
dev->linkstate = linkstate;
|
dev->linkstate = linkstate;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -4259,8 +4199,7 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriver *driver,
|
|||||||
ret = qemuMonitorExpirePassword(priv->mon, type, expire);
|
ret = qemuMonitorExpirePassword(priv->mon, type, expire);
|
||||||
|
|
||||||
end_job:
|
end_job:
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -4539,8 +4478,7 @@ qemuDomainRemoveDiskDevice(virQEMUDriver *driver,
|
|||||||
if (diskBackend)
|
if (diskBackend)
|
||||||
qemuBlockStorageSourceChainDetach(priv->mon, diskBackend);
|
qemuBlockStorageSourceChainDetach(priv->mon, diskBackend);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
virDomainAuditDisk(vm, disk->src, NULL, "detach", true);
|
virDomainAuditDisk(vm, disk->src, NULL, "detach", true);
|
||||||
|
|
||||||
@ -4616,8 +4554,7 @@ qemuDomainRemoveMemoryDevice(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
rc = qemuMonitorDelObject(priv->mon, backendAlias, true);
|
rc = qemuMonitorDelObject(priv->mon, backendAlias, true);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
rc = -1;
|
|
||||||
|
|
||||||
virDomainAuditMemory(vm, oldmem, newmem, "update", rc == 0);
|
virDomainAuditMemory(vm, oldmem, newmem, "update", rc == 0);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
@ -4716,8 +4653,7 @@ qemuDomainRemoveHostDevice(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
qemuBlockStorageSourceAttachRollback(priv->mon, detachscsi);
|
qemuBlockStorageSourceAttachRollback(priv->mon, detachscsi);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hostdev->parentnet) {
|
if (hostdev->parentnet) {
|
||||||
@ -4834,8 +4770,7 @@ qemuDomainRemoveNetDevice(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
if (qemuMonitorRemoveNetdev(priv->mon, hostnet_name) < 0) {
|
if (qemuMonitorRemoveNetdev(priv->mon, hostnet_name) < 0) {
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
virDomainAuditNet(vm, net, NULL, "detach", false);
|
virDomainAuditNet(vm, net, NULL, "detach", false);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -4881,8 +4816,7 @@ qemuDomainRemoveNetDevice(virQEMUDriver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (QEMU_DOMAIN_NETWORK_PRIVATE(net)->slirp)
|
if (QEMU_DOMAIN_NETWORK_PRIVATE(net)->slirp)
|
||||||
qemuSlirpStop(QEMU_DOMAIN_NETWORK_PRIVATE(net)->slirp, vm, driver, net);
|
qemuSlirpStop(QEMU_DOMAIN_NETWORK_PRIVATE(net)->slirp, vm, driver, net);
|
||||||
@ -4956,8 +4890,7 @@ qemuDomainRemoveChrDevice(virQEMUDriver *driver,
|
|||||||
if (monitor) {
|
if (monitor) {
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
rc = qemuMonitorDetachCharDev(priv->mon, charAlias);
|
rc = qemuMonitorDetachCharDev(priv->mon, charAlias);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rc == 0 &&
|
if (rc == 0 &&
|
||||||
@ -5023,8 +4956,7 @@ qemuDomainRemoveRNGDevice(virQEMUDriver *driver,
|
|||||||
qemuMonitorDetachCharDev(priv->mon, charAlias) < 0)
|
qemuMonitorDetachCharDev(priv->mon, charAlias) < 0)
|
||||||
rc = -1;
|
rc = -1;
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (rng->backend == VIR_DOMAIN_RNG_BACKEND_EGD &&
|
if (rng->backend == VIR_DOMAIN_RNG_BACKEND_EGD &&
|
||||||
rc == 0 &&
|
rc == 0 &&
|
||||||
@ -5078,8 +5010,7 @@ qemuDomainRemoveShmemDevice(virQEMUDriver *driver,
|
|||||||
else
|
else
|
||||||
rc = qemuMonitorDelObject(priv->mon, memAlias, true);
|
rc = qemuMonitorDelObject(priv->mon, memAlias, true);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
virDomainAuditShmem(vm, shmem, "detach", rc == 0);
|
virDomainAuditShmem(vm, shmem, "detach", rc == 0);
|
||||||
|
|
||||||
@ -5173,8 +5104,7 @@ qemuDomainRemoveRedirdevDevice(virQEMUDriver *driver,
|
|||||||
*/
|
*/
|
||||||
ignore_value(qemuMonitorDetachCharDev(priv->mon, charAlias));
|
ignore_value(qemuMonitorDetachCharDev(priv->mon, charAlias));
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (qemuDomainDelChardevTLSObjects(driver, vm, dev->source, charAlias) < 0)
|
if (qemuDomainDelChardevTLSObjects(driver, vm, dev->source, charAlias) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -5211,8 +5141,7 @@ qemuDomainRemoveFSDevice(virQEMUDriver *driver,
|
|||||||
if (qemuMonitorDetachCharDev(priv->mon, charAlias) < 0)
|
if (qemuMonitorDetachCharDev(priv->mon, charAlias) < 0)
|
||||||
rc = -1;
|
rc = -1;
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virDomainAuditFS(vm, fs, NULL, "detach", rc == 0);
|
virDomainAuditFS(vm, fs, NULL, "detach", rc == 0);
|
||||||
@ -5953,8 +5882,7 @@ qemuDomainDetachDeviceChr(virQEMUDriver *driver,
|
|||||||
int rc;
|
int rc;
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
rc = qemuMonitorRemoveNetdev(priv->mon, tmpChr->info.alias);
|
rc = qemuMonitorRemoveNetdev(priv->mon, tmpChr->info.alias);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
rc = -1;
|
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -6490,8 +6418,7 @@ qemuDomainHotplugAddVcpu(virQEMUDriver *driver,
|
|||||||
|
|
||||||
rc = qemuMonitorAddDeviceProps(qemuDomainGetMonitor(vm), &vcpuprops);
|
rc = qemuMonitorAddDeviceProps(qemuDomainGetMonitor(vm), &vcpuprops);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
virDomainAuditVcpu(vm, oldvcpus, oldvcpus + nvcpus, "update", rc == 0);
|
virDomainAuditVcpu(vm, oldvcpus, oldvcpus + nvcpus, "update", rc == 0);
|
||||||
|
|
||||||
@ -6987,8 +6914,7 @@ qemuDomainChangeMemoryRequestedSize(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
rc = qemuMonitorChangeMemoryRequestedSize(priv->mon, alias, requestedsize);
|
rc = qemuMonitorChangeMemoryRequestedSize(priv->mon, alias, requestedsize);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -515,8 +515,7 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver,
|
|||||||
|
|
||||||
if (qemuBlockExportAddNBD(vm, diskAlias, disk->src, diskAlias, true, NULL) < 0)
|
if (qemuBlockExportAddNBD(vm, diskAlias, disk->src, diskAlias, true, NULL) < 0)
|
||||||
goto exit_monitor;
|
goto exit_monitor;
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server.transport == VIR_STORAGE_NET_HOST_TRANS_TCP)
|
if (server.transport == VIR_STORAGE_NET_HOST_TRANS_TCP)
|
||||||
@ -551,8 +550,7 @@ qemuMigrationDstStopNBDServer(virQEMUDriver *driver,
|
|||||||
|
|
||||||
if (qemuMonitorNBDServerStop(priv->mon) < 0)
|
if (qemuMonitorNBDServerStop(priv->mon) < 0)
|
||||||
VIR_WARN("Unable to stop NBD server");
|
VIR_WARN("Unable to stop NBD server");
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
virPortAllocatorRelease(priv->nbdPort);
|
virPortAllocatorRelease(priv->nbdPort);
|
||||||
priv->nbdPort = 0;
|
priv->nbdPort = 0;
|
||||||
@ -873,8 +871,7 @@ qemuMigrationSrcCancelRemoveTempBitmaps(virDomainObj *vm,
|
|||||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
qemuMonitorBitmapRemove(priv->mon, t->nodename, t->bitmapname);
|
qemuMonitorBitmapRemove(priv->mon, t->nodename, t->bitmapname);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -2039,8 +2036,7 @@ qemuMigrationSrcGraphicsRelocate(virQEMUDriver *driver,
|
|||||||
ret = qemuMonitorGraphicsRelocate(priv->mon, type, listenAddress,
|
ret = qemuMonitorGraphicsRelocate(priv->mon, type, listenAddress,
|
||||||
port, tlsPort, tlsSubject);
|
port, tlsPort, tlsSubject);
|
||||||
jobPriv->spiceMigration = !ret;
|
jobPriv->spiceMigration = !ret;
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
@ -3811,8 +3807,7 @@ qemuMigrationSrcContinue(virQEMUDriver *driver,
|
|||||||
|
|
||||||
ret = qemuMonitorMigrateContinue(priv->mon, status);
|
ret = qemuMonitorMigrateContinue(priv->mon, status);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3835,8 +3830,7 @@ qemuMigrationSetDBusVMState(virQEMUDriver *driver,
|
|||||||
|
|
||||||
rv = qemuMonitorSetDBusVMStateIdList(priv->mon, priv->dbusVMStateIds);
|
rv = qemuMonitorSetDBusVMStateIdList(priv->mon, priv->dbusVMStateIds);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
rv = -1;
|
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
} else {
|
} else {
|
||||||
@ -5932,8 +5926,7 @@ qemuMigrationSrcToFile(virQEMUDriver *driver, virDomainObj *vm,
|
|||||||
qemuMonitorSetMigrationSpeed(priv->mon,
|
qemuMonitorSetMigrationSpeed(priv->mon,
|
||||||
QEMU_DOMAIN_MIG_BANDWIDTH_MAX);
|
QEMU_DOMAIN_MIG_BANDWIDTH_MAX);
|
||||||
priv->migMaxBandwidth = QEMU_DOMAIN_MIG_BANDWIDTH_MAX;
|
priv->migMaxBandwidth = QEMU_DOMAIN_MIG_BANDWIDTH_MAX;
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5984,8 +5977,7 @@ qemuMigrationSrcToFile(virQEMUDriver *driver, virDomainObj *vm,
|
|||||||
VIR_CLOSE(pipeFD[1]) < 0)
|
VIR_CLOSE(pipeFD[1]) < 0)
|
||||||
VIR_WARN("failed to close intermediate pipe");
|
VIR_WARN("failed to close intermediate pipe");
|
||||||
}
|
}
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -6057,8 +6049,7 @@ qemuMigrationSrcCancel(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ignore_value(qemuMonitorMigrateCancel(priv->mon));
|
ignore_value(qemuMonitorMigrateCancel(priv->mon));
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
for (i = 0; i < vm->def->ndisks; i++) {
|
for (i = 0; i < vm->def->ndisks; i++) {
|
||||||
virDomainDiskDef *disk = vm->def->disks[i];
|
virDomainDiskDef *disk = vm->def->disks[i];
|
||||||
|
@ -870,8 +870,7 @@ qemuMigrationParamsApply(virQEMUDriver *driver,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
if (xbzrleCacheSize_old)
|
if (xbzrleCacheSize_old)
|
||||||
migParams->params[xbzrle].set = true;
|
migParams->params[xbzrle].set = true;
|
||||||
@ -1412,8 +1411,7 @@ qemuMigrationCapsCheck(virQEMUDriver *driver,
|
|||||||
|
|
||||||
rc = qemuMonitorSetMigrationCapabilities(priv->mon, &json);
|
rc = qemuMonitorSetMigrationCapabilities(priv->mon, &json);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
virResetLastError();
|
virResetLastError();
|
||||||
|
@ -473,8 +473,7 @@ qemuProcessFakeReboot(void *opaque)
|
|||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
rc = qemuMonitorSystemReset(priv->mon);
|
rc = qemuMonitorSystemReset(priv->mon);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto endjob;
|
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
@ -1956,8 +1955,7 @@ qemuProcessInitMonitor(virQEMUDriver *driver,
|
|||||||
|
|
||||||
ret = qemuMonitorSetCapabilities(QEMU_DOMAIN_PRIVATE(vm)->mon);
|
ret = qemuMonitorSetCapabilities(QEMU_DOMAIN_PRIVATE(vm)->mon);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2252,8 +2250,7 @@ qemuRefreshVirtioChannelState(virQEMUDriver *driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = qemuMonitorGetChardevInfo(priv->mon, &info);
|
ret = qemuMonitorGetChardevInfo(priv->mon, &info);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -2306,8 +2303,7 @@ qemuRefreshPRManagerState(virQEMUDriver *driver,
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorGetPRManagerInfo(priv->mon, &info);
|
ret = qemuMonitorGetPRManagerInfo(priv->mon, &info);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -2337,8 +2333,7 @@ qemuRefreshRTC(virQEMUDriver *driver,
|
|||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
rv = qemuMonitorGetRTCTime(priv->mon, &thenbits);
|
rv = qemuMonitorGetRTCTime(priv->mon, &thenbits);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
rv = -1;
|
|
||||||
|
|
||||||
if (rv < 0)
|
if (rv < 0)
|
||||||
return;
|
return;
|
||||||
@ -2427,8 +2422,7 @@ qemuProcessWaitForMonitor(virQEMUDriver *driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
ret = qemuMonitorGetChardevInfo(priv->mon, &info);
|
ret = qemuMonitorGetChardevInfo(priv->mon, &info);
|
||||||
VIR_DEBUG("qemuMonitorGetChardevInfo returned %i", ret);
|
VIR_DEBUG("qemuMonitorGetChardevInfo returned %i", ret);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
if ((ret = qemuProcessFindCharDevicePTYsMonitor(vm, info)) < 0)
|
if ((ret = qemuProcessFindCharDevicePTYsMonitor(vm, info)) < 0)
|
||||||
@ -2470,8 +2464,7 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriver *driver,
|
|||||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
ret = qemuMonitorGetIOThreads(priv->mon, &iothreads, &niothreads);
|
ret = qemuMonitorGetIOThreads(priv->mon, &iothreads, &niothreads);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -2646,8 +2639,7 @@ qemuProcessSetLinkStates(virQEMUDriver *driver,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3194,8 +3186,7 @@ qemuProcessUpdateVideoRamSize(virQEMUDriver *driver,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
cfg = virQEMUDriverGetConfig(driver);
|
cfg = virQEMUDriverGetConfig(driver);
|
||||||
ret = virDomainObjSave(vm, driver->xmlopt, cfg->stateDir);
|
ret = virDomainObjSave(vm, driver->xmlopt, cfg->stateDir);
|
||||||
@ -3326,8 +3317,7 @@ qemuProcessStartCPUs(virQEMUDriver *driver, virDomainObj *vm,
|
|||||||
goto release;
|
goto release;
|
||||||
|
|
||||||
ret = qemuMonitorStartCPUs(priv->mon);
|
ret = qemuMonitorStartCPUs(priv->mon);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto release;
|
goto release;
|
||||||
@ -3364,8 +3354,7 @@ int qemuProcessStopCPUs(virQEMUDriver *driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = qemuMonitorStopCPUs(priv->mon);
|
ret = qemuMonitorStopCPUs(priv->mon);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -3476,8 +3465,7 @@ qemuProcessUpdateState(virQEMUDriver *driver, virDomainObj *vm)
|
|||||||
|
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ret = qemuMonitorGetStatus(priv->mon, &running, &reason);
|
ret = qemuMonitorGetStatus(priv->mon, &running, &reason);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -3713,8 +3701,7 @@ qemuProcessRecoverJob(virQEMUDriver *driver,
|
|||||||
case QEMU_ASYNC_JOB_SNAPSHOT:
|
case QEMU_ASYNC_JOB_SNAPSHOT:
|
||||||
qemuDomainObjEnterMonitor(driver, vm);
|
qemuDomainObjEnterMonitor(driver, vm);
|
||||||
ignore_value(qemuMonitorMigrateCancel(priv->mon));
|
ignore_value(qemuMonitorMigrateCancel(priv->mon));
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
/* resume the domain but only if it was paused as a result of
|
/* resume the domain but only if it was paused as a result of
|
||||||
* running a migration-to-file operation. Although we are
|
* running a migration-to-file operation. Although we are
|
||||||
* recovering an async job, this function is run at startup
|
* recovering an async job, this function is run at startup
|
||||||
@ -4355,8 +4342,7 @@ qemuProcessFetchGuestCPU(virQEMUDriver *driver,
|
|||||||
rc = qemuMonitorGetGuestCPUx86(priv->mon, &dataEnabled, &dataDisabled);
|
rc = qemuMonitorGetGuestCPUx86(priv->mon, &dataEnabled, &dataDisabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (rc == -1)
|
if (rc == -1)
|
||||||
return -1;
|
return -1;
|
||||||
@ -5206,8 +5192,7 @@ qemuProcessSetupBalloon(virQEMUDriver *driver,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6115,8 +6100,7 @@ qemuProcessSetupHotpluggableVcpus(virQEMUDriver *driver,
|
|||||||
|
|
||||||
rc = qemuMonitorAddDeviceProps(qemuDomainGetMonitor(vm), &vcpuprops);
|
rc = qemuMonitorAddDeviceProps(qemuDomainGetMonitor(vm), &vcpuprops);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -7023,8 +7007,7 @@ qemuProcessSetupDiskThrottlingBlockdev(virQEMUDriver *driver,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8337,8 +8320,7 @@ qemuProcessRefreshDisks(virQEMUDriver *driver,
|
|||||||
|
|
||||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) == 0) {
|
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) == 0) {
|
||||||
table = qemuMonitorGetBlockInfo(priv->mon);
|
table = qemuMonitorGetBlockInfo(priv->mon);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
goto cleanup;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!table)
|
if (!table)
|
||||||
|
@ -330,8 +330,7 @@ qemuSnapshotCreateActiveInternal(virQEMUDriver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = qemuMonitorCreateSnapshot(priv->mon, snap->def->name);
|
ret = qemuMonitorCreateSnapshot(priv->mon, snap->def->name);
|
||||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
ret = -1;
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -1289,8 +1288,7 @@ qemuSnapshotDiskCreate(qemuSnapshotDiskContext *snapctxt)
|
|||||||
|
|
||||||
rc = qemuMonitorTransaction(priv->mon, &snapctxt->actions);
|
rc = qemuMonitorTransaction(priv->mon, &snapctxt->actions);
|
||||||
|
|
||||||
if (qemuDomainObjExitMonitor(driver, snapctxt->vm) < 0)
|
qemuDomainObjExitMonitor(driver, snapctxt->vm);
|
||||||
rc = -1;
|
|
||||||
|
|
||||||
for (i = 0; i < snapctxt->ndd; i++) {
|
for (i = 0; i < snapctxt->ndd; i++) {
|
||||||
qemuSnapshotDiskData *dd = snapctxt->dd + i;
|
qemuSnapshotDiskData *dd = snapctxt->dd + i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user