[libvirt] [PATCH v2 4/4] conf: Use correct type for balloon stats period

Martin Kletzander mkletzan at redhat.com
Tue Mar 17 11:07:38 UTC 2015


On Mon, Mar 16, 2015 at 02:10:35PM +0100, Erik Skultety wrote:
>
>
>On 03/13/2015 05:17 PM, Martin Kletzander wrote:
>> We're parsing memballoon status period as unsigned int, but when we're
>> trying to set it, both we and qemu use signed int.  That means large
>> values will get wrapped around to negative one resulting in error.
>> Basically the same problem as commit e3a7b874 was dealing with when
>> updating live domain.
>>
>> QEMU changed the accepted value to int64 in commit 1f9296b5, but even
>> values as INT_MAX don't make sense since the value passed means seconds.
>> Hence adding capability flag for this change isn't worth it.
>>
>> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140958
>>
>> Signed-off-by: Luyao Huang <lhuang at redhat.com>
>> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
>> ---
>>  docs/formatdomain.html.in | 2 ++
>>  src/conf/domain_conf.c    | 9 +++++++--
>>  src/conf/domain_conf.h    | 2 +-
>>  src/qemu/qemu_process.c   | 2 +-
>>  4 files changed, 11 insertions(+), 4 deletions(-)
>>
>> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
>> index 40e2b29..7a11cc7 100644
>> --- a/docs/formatdomain.html.in
>> +++ b/docs/formatdomain.html.in
>> @@ -5630,6 +5630,8 @@ qemu-kvm -net nic,model=? /dev/null
>>            only be made to the active guest.
>>            If the QEMU driver is not at the right
>>            revision, the attempt to set the period will fail.
>> +          Large values might be ignored, but this only affects
>> +          non-sensical numbers (i.e. many years).
>>            <span class='since'>Since 1.1.1, requires QEMU 1.5</span>
>>          </p>
>>        </dd>
>
>Just a nitpick, I'd probably avoid word construction non-sensical in our
>docs (it's not even correct --> nonsensical) and simplify this to "Large
>values (i.e. many years) might be ignored."
>

In that case, I changed it to 'e.g.', adjusted the column width and
pushed.  Thanks for the reviews.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150317/d2b1569b/attachment-0001.sig>


More information about the libvir-list mailing list