The first patch rewrites virsh memtune command to accept 0 as valid value instead of ignoring it. In the second patch I'll introduce a simple helper to crop the *_limit values to VIR_DOMAIN_MEMORY_PARAM_UNLIMITED as its used several times while reading values from cgroups and also a helper to check whether the memory limits are set or not. The last patch actually changes the internal representation of unlimited memtune settings. More detailed description is in commit message. My motivation to change it completely is to prevent future bugs with those limits. Pavel Hrdina (3): virsh: fix memtune to also accept 0 as valid value virutil: introduce helper functions for memory limits memtune: change the way how we store unlimited value docs/formatdomain.html.in | 4 +- src/conf/domain_conf.c | 75 +++++++++++++++---- src/libvirt-domain.c | 3 + src/libvirt_private.syms | 3 +- src/lxc/lxc_cgroup.c | 18 ++--- src/lxc/lxc_driver.c | 7 +- src/lxc/lxc_fuse.c | 12 ++-- src/lxc/lxc_native.c | 6 +- src/openvz/openvz_conf.c | 4 +- src/openvz/openvz_driver.c | 4 +- src/qemu/qemu_cgroup.c | 24 +++---- src/qemu/qemu_command.c | 8 ++- src/qemu/qemu_driver.c | 10 +-- src/qemu/qemu_hotplug.c | 2 +- src/qemu/qemu_migration.c | 5 +- src/util/virutil.c | 47 ++++++------ src/util/virutil.h | 5 +- tests/qemuxml2argvdata/qemuxml2argv-memtune.xml | 2 +- .../qemuxml2xmloutdata/qemuxml2xmlout-memtune.xml | 2 +- tools/virsh-domain.c | 83 ++++++++++------------ 20 files changed, 185 insertions(+), 139 deletions(-) -- 2.0.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list