mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
memtune: change the way how we store unlimited value
There was a mess in the way how we store unlimited value for memory limits and how we handled values provided by user. Internally there were two possible ways how to store unlimited value: as 0 value or as VIR_DOMAIN_MEMORY_PARAM_UNLIMITED. Because we chose to store memory limits as unsigned long long, we cannot use -1 to represent unlimited. It's much easier for us to say that everything greater than VIR_DOMAIN_MEMORY_PARAM_UNLIMITED means unlimited and leave 0 as valid value despite that it makes no sense to set limit to 0. Remove unnecessary function virCompareLimitUlong. The update of test is to prevent the 0 to be miss-used as unlimited in future. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1146539 Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
@@ -798,7 +798,9 @@
|
||||
for <code><memory></code>. For backwards
|
||||
compatibility, output is always in
|
||||
KiB. <span class='since'><code>unit</code>
|
||||
since 0.9.11</span></dd>
|
||||
since 0.9.11</span>
|
||||
Possible values for all *_limit parameters are in range from 0 to
|
||||
VIR_DOMAIN_MEMORY_PARAM_UNLIMITED.</dd>
|
||||
<dt><code>hard_limit</code></dt>
|
||||
<dd> The optional <code>hard_limit</code> element is the maximum memory
|
||||
the guest can use. The units for this value are kibibytes (i.e. blocks
|
||||
|
||||
Reference in New Issue
Block a user