[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V11 09/17] qmp: add interface query-snapshots

From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH V11 09/17] qmp: add interface query-snapshots
Date: Fri, 12 Apr 2013 13:45:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Wenchao Xia <address@hidden> writes:

> 于 2013-4-12 11:22, Eric Blake 写道:
>> On 04/11/2013 09:17 PM, Wenchao Xia wrote:
>>>>> Hmm, as I typed that, I did another search of qemu-schema.json - we have
>>>>> the type 'ImageInfo' defined, but none of the existing 'command's ever
>>>>> call out the use of that type.  Is it a type we are only using
>>>>> internally to date, and where this is the first QMP command that would
>>>>> actually expose SnapshotInfo or ImageInfo to a management app?  Then
>>>>> maybe we _CAN_ modify SnapshotInfo, clean up all the internal code, and
>>>>> provide a saner type for the first time that QMP can actually use it.
>>>> IIRC, it's being used by qemu-img. As it's not trivial to determine if
>>>> the field has users and as what goes in the schema is to be considered
>>>> stable,
>>>> it's better to keep the field. Instead, we could add a better field and
>>>> deprecate the current one.
>>>    I remember there is a patch laster year made "qemu-img info" dump out
>>> json strings, where vm-clock-sec is dumped out.
>> Ah, so it's not QMP exposing it, but qemu-info in JSON mode.  Still,
>> changing that output to delete a field might break existing tools;
>> adding a field might be safer, but then you'd have redundant information
>> in the old style for old tools, as well as the added field.
>   It seems keeping it, is what best we can do now. Markus, are you OK
> with it?

Yes, because:

"qemu-img info --output=json" exists since commit c054b3f, v1.3.0.  I
agree we shouldn't change it incompatibly just because we hate the way
time is represented there.

Doesn't mean we *have* to duplicate the ugly time representation into
QMP.  But avoiding it there involves duplicating SnapshotInfo and
ImageInfo in the schema.  Not worth it, considering there's no
consistency in QMP's time representation anyway.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]