[libvirt] [PATCH] qemu: fix wrong evaluation in qemuDomainSetMemoryParameters

19c6ad9a (qemu: Refactor qemuDomainSetMemoryParameters) introduced a new macro, VIR_GET_LIMIT_PARAMETER(PARAM, VALUE). But if statement in the macro is not correct and so set_XXXX flags are set to false in the wrong. As a result, libvirt ignores all memtune parameters. This patch fixes the conditional expression to work correctly. Signed-off-by: Satoru Moriya <satoru.moriya@hds.com> --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7048ce9..42b8c77 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -7280,7 +7280,7 @@ qemuDomainSetMemoryParameters(virDomainPtr dom, } #define VIR_GET_LIMIT_PARAMETER(PARAM, VALUE) \ - if ((rc = virTypedParamsGetULLong(params, nparams, PARAM, &VALUE) < 0)) \ + if ((rc = virTypedParamsGetULLong(params, nparams, PARAM, &VALUE)) < 0) \ goto cleanup; \ \ if (rc == 1) \ -- 1.7.11.7

On 03/04/13 18:27, Satoru Moriya wrote:
19c6ad9a (qemu: Refactor qemuDomainSetMemoryParameters) introduced a new macro, VIR_GET_LIMIT_PARAMETER(PARAM, VALUE). But if statement in the macro is not correct and so set_XXXX flags are set to false in the wrong. As a result, libvirt ignores all memtune parameters. This patch fixes the conditional expression to work correctly.
Signed-off-by: Satoru Moriya <satoru.moriya@hds.com> --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
EW! :( Thanks for cathing this. ACK and will push soon. Peter

On Mon, Mar 04, 2013 at 06:30:41PM +0100, Peter Krempa wrote:
On 03/04/13 18:27, Satoru Moriya wrote:
19c6ad9a (qemu: Refactor qemuDomainSetMemoryParameters) introduced a new macro, VIR_GET_LIMIT_PARAMETER(PARAM, VALUE). But if statement in the macro is not correct and so set_XXXX flags are set to false in the wrong. As a result, libvirt ignores all memtune parameters. This patch fixes the conditional expression to work correctly.
Signed-off-by: Satoru Moriya <satoru.moriya@hds.com> --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
EW! :( Thanks for cathing this. ACK and will push soon.
Yep still time for the 1.0.3 release to include this/ Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (3)
-
Daniel P. Berrange
-
Peter Krempa
-
Satoru Moriya