qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 08/15] qmp: add block_job_cancel command


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v4 08/15] qmp: add block_job_cancel command
Date: Wed, 11 Apr 2012 15:05:09 +0100

On Wed, Apr 11, 2012 at 3:01 PM, Kevin Wolf <address@hidden> wrote:
> Am 10.04.2012 20:06, schrieb Eric Blake:
>>>>> Is there any policy on _ vs - in command names?  It seems awkward to
>>>>> have block_job_cancel but query-block-jobs.
>>>>
>>>> block_job_cancel is HMP, whereas query-block-jobs is a QMP command. QMP
>>>> uses - consistently. Not sure if HMP is consistent, but it tends to use _.
>>>
>>> OK, on RHEL 6.2, 'help' on HMP includes help for block_job_cancel, and
>>> '{"execute":"query-commands"}' on QMP includes
>>> {"name":"block_job_cancel"}, with underscores in both locations.  So if
>>> your new QMP command is block-job-cancel, you've met the goal of having
>>> a different spelling from the RHEL backport of the earlier semantics.
>>> And if you stuck with underscores, then it's RHEL's problem to solve :)
>>
>> Are we settled enough on the 'drive-mirror' command to commit to that in
>> the qapi in time for qemu 1.1, even if we don't implement it until qemu
>> 1.2?  That would be a sufficient witness of another block job command
>> that therefore implies job cancellation is asynchronous.
>
> We did this kind of thing with image streaming, and we regretted it when
> patch review brought up changed that we would have liked to make, but
> couldn't any more because libvirt already used the initial version.
>
> So I'd rather avoid promising any details of an API before it's really
> implemented.
>
>> If we don't
>> commit to 'drive-mirror' in time, then what else can libvirt use to
>> distinguish between RHEL 6.2 synchronous 'block_job_cancel' and the
>> asynchronous command introduced by this series?
>
> query-version return 0.12.1 on RHEL 6.2, plus something completely
> unrelated that is added in 6.3 like the transaction command?
>
>> Is it too late to rename the QMP command to 'block-job-cancel'?
>
> Streaming hasn't been in any release yet, so in theory I guess we could
> rename the commands.

I actually like Eric's suggestion to rename the commands.  Libvirt
needs code to handle both semantics now anyway.  We might as well use
this chance to make the command naming consistent with QAPI/QMP rules
now.

Will send the patches shortly.

Stefan



reply via email to

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