]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Update only changed scheduler tunables
authorPeter Krempa <pkrempa@redhat.com>
Wed, 5 Sep 2012 12:41:25 +0000 (14:41 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 7 Sep 2012 06:08:37 +0000 (08:08 +0200)
commit51907779ee025e6edf4125cf4b4f35e279e2f6e2
tree70e956a2353969934a4d31b14cf9e8774c1796eb
parent245cef9f9796691fcba5313bea43af94842c7f23
virsh: Update only changed scheduler tunables

When setting the cpu tunables in virsh you are able to update only a
subset of them. Virsh while doing the update updated all of the
tunables, changed ones with new values and unchanged with old ones.
This is unfortunate as it:
a) might overwrite some other change by a race condition (unprobable)
b) fails with range checking as some of the old values saved might be
   out of range

This patch changes the update procedure so that only the changed value
is updated on the host.

This patch also fixes a very unprobable memory leak if the daemon would
return a string tunable parameter, as the typed parameter array was not
cleared.
tools/virsh-domain.c