[libvirt] [PATCH] qemu: Refactor qemuDomainSetMemoryParameters

Peter Krempa pkrempa at redhat.com
Mon Feb 25 16:27:57 UTC 2013


On 02/22/13 13:56, John Ferlan wrote:
> On 02/18/2013 10:18 AM, Peter Krempa wrote:
>> The new TypedParam helper APIs allow to simplify this function
>> significantly.
>>
>> This patch integrates the fix in 75e5bec97b3045e4f926248d5c742f8a50d0f9
>> by correctly ordering the setting functions instead of reordering the
>> parameters.
>> ---
>>   src/qemu/qemu_driver.c | 149 ++++++++++++++++++-------------------------------
>>   1 file changed, 54 insertions(+), 95 deletions(-)
>>
...
>>
>>       /* It will fail if hard limit greater than swap hard limit anyway */
>> -    if (swap_hard_limit &&
>> -        hard_limit &&
>> -        (hard_limit->value.ul > swap_hard_limit->value.ul)) {
>> +    if (set_swap_hard_limit && set_memory_hard_limit &&
>> +        (memory_hard_limit > swap_hard_limit)) {
>>           virReportError(VIR_ERR_INVALID_ARG, "%s",
>>                          _("hard limit must be lower than swap hard limit"));
>
> Consider the messages below, should this be "memory hard_limit tunable
> value must be lower than swap_hard_limit"

I went with the modified spelling of the message ...

>
...
> ACK - seems reasonable to me - your choice on the error message
>
>

... and pushed. Thanks for the review.

Peter




More information about the libvir-list mailing list