[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V4 1/2] qapi: Add SnapshotInfo and ImageInfo.
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH V4 1/2] qapi: Add SnapshotInfo and ImageInfo. |
Date: |
Wed, 22 Aug 2012 08:56:06 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
On 08/22/2012 08:32 AM, Benoît Canet wrote:
>> Since we have two fields named *-nsec, it might be worth clarifying that
>> date-nsec is merely the fractional portion to be combined with date-sec
>> (always less than 1000000000), while vm-clock-nsec includes seconds if
>> the drift is that large.
>>
>> For that matter, should we even be exposing things in this manner? I
>> know the internal struct has seconds and nanos separate for date,
>> because it maps to struct timespec; but why can't we combine them into
>> one giant number for JSON?
>
> Wouldn't people working with low level language be annoyed after parsing
> this JSON to have to split this combined number in two parts to fit
> them back into struct timespec ?
Perhaps, in which case, why don't we present vm-clock-nsec via two
fields of seconds and fraction, for the same reasoning? My point is
that we have two different bike shed colors showing in this one API, but
I would prefer we be consistent and pick just one (as to _which_ color,
I can be persuaded either way).
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH V4 2/2] qemu-img: Add json output option to the info command., Benoît Canet, 2012/08/22