You need to sign in or sign up before continuing.
提交 b6316435 编写于 作者: P Peter Krempa

qemu: blockjob: Save config only in qemuBlockJobEventProcessLegacyCompleted

There's no need to do it if the job is not completed. The new helper
allows to do this with much less hassle in the correct place.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 dbdda6ac
......@@ -315,6 +315,7 @@ qemuBlockJobEventProcessLegacyCompleted(virQEMUDriverPtr driver,
ignore_value(qemuDomainDetermineDiskChain(driver, vm, disk, NULL, true));
ignore_value(qemuBlockNodeNamesDetect(driver, vm, asyncJob));
qemuBlockJobUnregister(job);
qemuDomainSaveConfig(vm);
}
......@@ -381,12 +382,6 @@ qemuBlockJobEventProcessLegacy(virQEMUDriverPtr driver,
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0)
VIR_WARN("Unable to save status on vm %s after block job", vm->def->name);
if (job->state == VIR_DOMAIN_BLOCK_JOB_COMPLETED && vm->newDef) {
if (virDomainSaveConfig(cfg->configDir, driver->caps, vm->newDef) < 0)
VIR_WARN("Unable to update persistent definition on vm %s "
"after block job", vm->def->name);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册