qemu: allow device block I/O tuning in session mode

In commit 45ad1adb I added a nicer message for tunings that need
cgroups when unavailable (unprivileged), but I added this check for
I/O tuning of block devices, which doesn't need cgroups, because it is
done by QEMU, so let's fix that.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2014-08-15 14:35:53 +02:00
parent 0856757279
commit 7d9def2ec1
2 changed files with 1 additions and 15 deletions

View File

@ -7375,7 +7375,7 @@ qemuBuildCommandLine(virConnectPtr conn,
goto error;
}
if (def->blkio.weight || def->blkio.ndevices) {
if (def->blkio.weight) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Block I/O tuning is not available in session mode"));
goto error;

View File

@ -15864,11 +15864,6 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
goto cleanup;
cfg = virQEMUDriverGetConfig(driver);
if (!cfg->privileged) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Block I/O tuning is not available in session mode"));
goto cleanup;
}
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
@ -16016,7 +16011,6 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
int ret = -1;
size_t i;
virCapsPtr caps = NULL;
virQEMUDriverConfigPtr cfg = NULL;
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
VIR_DOMAIN_AFFECT_CONFIG |
@ -16031,13 +16025,6 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
if (virDomainGetBlockIoTuneEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
cfg = virQEMUDriverGetConfig(driver);
if (!cfg->privileged) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Block I/O tuning is not available in session mode"));
goto cleanup;
}
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
@ -16140,7 +16127,6 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
virObjectUnref(cfg);
return ret;
}