[libvirt] [PATCH 3/3] xml: allow scaled memory on input
Eric Blake
eblake at redhat.com
Thu Feb 23 12:45:03 UTC 2012
On 02/22/2012 09:59 PM, Eric Blake wrote:
> Output is still in kibibytes, but input can now be in different
> scales for ease of typing.
>
> * src/conf/domain_conf.c (virDomainParseMemory): New helper.
> (virDomainDefParseXML): Use it when parsing.
> * docs/schemas/domaincommon.rng: Expand XML.
> * docs/formatdomain.html.in (elementsMemoryAllocation): Document
> scaling.
> ---
> docs/formatdomain.html.in | 39 ++++++++++---
> docs/schemas/domaincommon.rng | 4 +-
> src/conf/domain_conf.c | 129 ++++++++++++++++++++++++++++++++++------
> 3 files changed, 142 insertions(+), 30 deletions(-)
self-NACK to v1 - I forgot to add a unit test that exercises the new
unit parsing, and...
> + tebibytes (1,099,511,627,776). However, the value will be
> + rounded up to the nearest kibibyte by libvirt, and may be
> + further rounded to the granularity supported by the
> + hypervisor. As a sanity check, values less than 4000KiB are
> + not permitted.
This statement is not true (I originally tried to make the C code match
the RNG, but it caused too many testsuite failures, so I rebased and
inserted 2/3 to fix the RNG instead, but forgot to touch this up again).
I'll fix that in v2, along with a rename to unit='KiB' instead of units.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120223/78a19027/attachment-0001.sig>
More information about the libvir-list
mailing list