提交 74ae5be4 编写于 作者: E Erik Skultety 提交者: Michal Privoznik

qemu: revert patch - bandwidth tuning in session mode

Since there was a valid note to patch 43b67f2e about the best spot to
check for bandwidth set call while having libvirt daemon run in session
mode, this patch reverts previous changes dealing with bandwith
(also reverts adding variable @cfg in qemuDomainGetNumaParameters which
 does not have any use at the moment, but getting and unreferencing
 driver's config) in qemu_driver.c and qemu_command.c. There will be
another patch in the series which introduces the fix itself.
上级 1d1c5ecd
...@@ -7841,17 +7841,6 @@ qemuBuildCommandLine(virConnectPtr conn, ...@@ -7841,17 +7841,6 @@ qemuBuildCommandLine(virConnectPtr conn,
_("CPU tuning is not available in session mode")); _("CPU tuning is not available in session mode"));
goto error; goto error;
} }
virDomainNetDefPtr *nets = def->nets;
virNetDevBandwidthPtr bandwidth = NULL;
size_t nnets = def->nnets;
for (i = 0; i < nnets; i++) {
if ((bandwidth = virDomainNetGetActualBandwidth(nets[i])) != NULL) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Network bandwidth tuning is not available in session mode"));
goto error;
}
}
} }
for (i = 0; i < def->ngraphics; ++i) { for (i = 0; i < def->ngraphics; ++i) {
......
...@@ -9384,7 +9384,6 @@ qemuDomainGetNumaParameters(virDomainPtr dom, ...@@ -9384,7 +9384,6 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
size_t i; size_t i;
virDomainObjPtr vm = NULL; virDomainObjPtr vm = NULL;
virDomainDefPtr persistentDef = NULL; virDomainDefPtr persistentDef = NULL;
virQEMUDriverConfigPtr cfg = NULL;
char *nodeset = NULL; char *nodeset = NULL;
int ret = -1; int ret = -1;
virCapsPtr caps = NULL; virCapsPtr caps = NULL;
...@@ -9403,7 +9402,6 @@ qemuDomainGetNumaParameters(virDomainPtr dom, ...@@ -9403,7 +9402,6 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
return -1; return -1;
priv = vm->privateData; priv = vm->privateData;
cfg = virQEMUDriverGetConfig(driver);
if (virDomainGetNumaParametersEnsureACL(dom->conn, vm->def) < 0) if (virDomainGetNumaParametersEnsureACL(dom->conn, vm->def) < 0)
goto cleanup; goto cleanup;
...@@ -9477,7 +9475,6 @@ qemuDomainGetNumaParameters(virDomainPtr dom, ...@@ -9477,7 +9475,6 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
if (vm) if (vm)
virObjectUnlock(vm); virObjectUnlock(vm);
virObjectUnref(caps); virObjectUnref(caps);
virObjectUnref(cfg);
return ret; return ret;
} }
...@@ -10448,12 +10445,6 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom, ...@@ -10448,12 +10445,6 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
if (virDomainSetInterfaceParametersEnsureACL(dom->conn, vm->def, flags) < 0) if (virDomainSetInterfaceParametersEnsureACL(dom->conn, vm->def, flags) < 0)
goto cleanup; goto cleanup;
if (!cfg->privileged) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("Network bandwidth tuning is not available in session mode"));
goto cleanup;
}
if (!(caps = virQEMUDriverGetCapabilities(driver, false))) if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup; goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册