[Top][All Lists]
[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: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v4 08/15] qmp: add block_job_cancel command |
Date: |
Fri, 20 Jan 2012 12:55:58 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 |
On 01/20/2012 01:30 AM, Kevin Wolf wrote:
>>> +++ b/hmp-commands.hx
>> Looking at this from libvirt's perspective, would it be possible to give
>> this a different name? Then libvirt would know that if
>> block_job_cancel_async exists, we have the official semantics; and if it
>> doesn't exist, then we can try block_job_cancel as a fallback to see if
>> we have the old blocking semantics.
>>
>> But by using the same name as the old unofficial blocking command, it's
>> difficult to tell if we should expect an event, or whether completion of
>> the command means completion of the cancel.
>>
>
> You're quoting the HMP part, is that intentional? You shouldn't be using
> this at all.
Oh - I missed the .hx file name when trimming my reply. I agree that
libvirt will be using the QMP, not HMP command.
>
> Anyway, are there even any qemu versions out there that implement an
> older interface?
The older interface was backported into RHEL 6.2 qemu, so libvirt has to
maintain the distinction (although it can equally be argued that the
distinction only exists in the RHEL build, and therefore, only the RHEL
build of libvirt has to deal with the issues of an early backport of a
qemu feature).
>> 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 :)
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v4 04/15] block: add image streaming block job, (continued)
[Qemu-devel] [PATCH v4 10/15] blockdev: make image streaming safe across hotplug, Stefan Hajnoczi, 2012/01/06
[Qemu-devel] [PATCH v4 05/15] block: rate-limit streaming operations, Stefan Hajnoczi, 2012/01/06
[Qemu-devel] [PATCH v4 09/15] qmp: add query-block-jobs, Stefan Hajnoczi, 2012/01/06
[Qemu-devel] [PATCH v4 08/15] qmp: add block_job_cancel command, Stefan Hajnoczi, 2012/01/06
[Qemu-devel] [PATCH v4 12/15] add QERR_BASE_ID_NOT_FOUND, Stefan Hajnoczi, 2012/01/06
[Qemu-devel] [PATCH v4 11/15] block: add bdrv_find_backing_image, Stefan Hajnoczi, 2012/01/06
[Qemu-devel] [PATCH v4 01/15] coroutine: add co_sleep_ns() coroutine sleep function, Stefan Hajnoczi, 2012/01/06
[Qemu-devel] [PATCH v4 15/15] test: add image streaming test cases, Stefan Hajnoczi, 2012/01/06