forked from pool/libvirt
9decd8f3cc
- qemu: Fix cgroup handling when setting VCPU BW - daemon: fix leak after listing all volumes - Fix iohelper usage with streams opened for read - util: fix virFileOpenAs return value and resulting error logs - iscsi: don't leak portal string when starting a pool - don't mention disk controllers in generic controller errors - conf: don't crash on a tpm device with no backends - qemu: allocate network connections sooner during domain startup - Make detect_scsi_host_caps a function on all architectures - Fix release of resources with lockd plugin - Fix potential use of undefined variable in remote dispatch code - Fix F_DUPFD_CLOEXEC operation args - qemu: fix stupid typos in VFIO cgroup setup/teardown - network: fix network driver startup for qemu:///session - Remove patches that are included in the 1.0.5.1 release 0471637d-cgroups-vcpu-bw.patch, a2214c52-iohelper.patch, ca697e90-CVE-2013-1962.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=266
35 lines
1.5 KiB
Diff
35 lines
1.5 KiB
Diff
commit f493d83fbd3257453e63f2f32ee90a216fd531c1
|
|
Author: Daniel P. Berrange <berrange@redhat.com>
|
|
Date: Thu May 9 13:53:39 2013 +0100
|
|
|
|
Cope with missing swap cgroup controls
|
|
|
|
It is possible to build a kernel without swap cgroup controls
|
|
present. This causes a fatal error when querying memory
|
|
parameters. Treat missing swap controls as meaning "unlimited".
|
|
The fatal error remains if the user tries to actually change
|
|
the limit.
|
|
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
Index: libvirt-1.0.5.1/src/qemu/qemu_driver.c
|
|
===================================================================
|
|
--- libvirt-1.0.5.1.orig/src/qemu/qemu_driver.c
|
|
+++ libvirt-1.0.5.1/src/qemu/qemu_driver.c
|
|
@@ -7352,9 +7352,12 @@ qemuDomainGetMemoryParameters(virDomainP
|
|
case 2: /* fill swap hard limit here */
|
|
rc = virCgroupGetMemSwapHardLimit(priv->cgroup, &val);
|
|
if (rc != 0) {
|
|
- virReportSystemError(-rc, "%s",
|
|
- _("unable to get swap hard limit"));
|
|
- goto cleanup;
|
|
+ if (rc != -ENOENT) {
|
|
+ virReportSystemError(-rc, "%s",
|
|
+ _("unable to get swap hard limit"));
|
|
+ goto cleanup;
|
|
+ }
|
|
+ val = VIR_DOMAIN_MEMORY_PARAM_UNLIMITED;
|
|
}
|
|
if (virTypedParameterAssign(param,
|
|
VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT,
|