qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qmp-commands.hx: Update the supported 'transact


From: John Snow
Subject: Re: [Qemu-devel] [PATCH] qmp-commands.hx: Update the supported 'transaction' operations
Date: Mon, 12 Oct 2015 11:31:10 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0


On 10/12/2015 09:54 AM, Eric Blake wrote:
> On 10/12/2015 05:04 AM, Kashyap Chamarthy wrote:
>> [Sorry, I noticed your question only just now, as I was briefly away
>> from this list.]
>>
>> On Fri, Oct 02, 2015 at 07:59:48PM +0200, Max Reitz wrote:
>>> On 02.10.2015 14:12, Kashyap Chamarthy wrote:
>>>> Although the canonical source of reference for QMP commands is
>>>> qapi-schema.json, for consistency's sake, update qmp-commands.hx to
>>>> state the list of supported transactionable operations, namely:
>>>>
> 
>>>>  actions array:
>>>> -    - "type": the operation to perform.  The only supported
>>>> -      value is "blockdev-snapshot-sync". (json-string)
>>>> +    - "type": the operation to perform (json-string).  Possible
>>>> +              values: "drive-backup", "blockdev-backup",
>>>> +                      "blockdev-snapshot-sync",
>>>> +                      "blockdev-snapshot-internal-sync",
>>>> +                      "abort", "block-dirty-bitmap-add",
>>>> +                      "block-dirty-bitmap-clear"
>>>>      - "data": a dictionary.  The contents depend on the value
>>>>        of "type".  When "type" is "blockdev-snapshot-sync":
>>>>        - "device": device name to snapshot (json-string)
>>>>
>>>
>>> Do you want to extend this list, too? Right now it only contains
>>> parameter information for blockdev-snapshot-sync and
>>> blockdev-snapshot-internal-sync.
>>
>> You mean, all the parameters for rest of the transactionable commands
>> that one can possibly add (taking block-core.json)?
> 
> Or conversely, we could drop the action-specific arguments, and just say
> something like "see the documentation for specific additional fields
> appropriate for that action"
> 

This is the approach that's most flexible. As it stands upstream right
now, all of the various actions simply have an identical command layout
to their respective QMP versions, so it'd be easiest to just point to
the various singlet commands.

We'll prevent desync and bad documentation that way. If we ever add
extra arguments per-transaction (like this patchset proposes,) we can
always just document the difference.

> 
>> If so, I can do try that if that's the preferred way, but maybe it can
>> be done as a separate commit, since it's been that way for a while?  
> 
> Yes, at this point, a separate commit for any further cleanups is fine.
> 





reply via email to

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