[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/4] block: use Error mechanism instead of -errn
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 2/4] block: use Error mechanism instead of -errno for block_job_set_speed() |
Date: |
Tue, 24 Apr 2012 06:19:08 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
On 04/24/2012 03:01 AM, Paolo Bonzini wrote:
> Il 24/04/2012 10:49, Stefan Hajnoczi ha scritto:
>> "The error is specific to
>> block job speeds so we can add a speed argument to block-stream in the
>> future and clearly identify the invalid parameter."
>>
>> I added the new error to avoid having to change the InvalidParameter
>> 'name' field. It becomes ugly because we have:
>> block-job-set-speed <device> <value>
>> block-stream <device> [<speed>] [<base>]
>>
>> Notice that the parameter is called 'value' in block-job-set-speed and
>> 'speed' in block-stream. Therefore we can't just propagate a single
>> InvalidParameter name='value' error up from block-stream.
>>
>> This means that QMP commands will need to change the error to use the
>> correct name :(. It's doable, but ugly and a bit more complex.
>
> Well, we still have time to change block-job-set-speed. Ugly, but doable.
block-job-set-speed <device> <speed>
would indeed let you use 'speed' as the parameter name in both calls,
and I can just as easily make libvirt target the name 'value' for
block_job_set_speed and 'speed' for block-job-set-speed. I'm okay with
that idea, if it makes the rest of your patch easier.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 1/4] block: use Error mechanism instead of -errno for block_job_create(), (continued)
Re: [Qemu-devel] [PATCH 0/4] block: add optional 'speed' parameter to block-stream, Eric Blake, 2012/04/23
Re: [Qemu-devel] [PATCH 0/4] block: add optional 'speed' parameter to block-stream, Anthony Liguori, 2012/04/23
Re: [Qemu-devel] [PATCH 0/4] block: add optional 'speed' parameter to block-stream, Eric Blake, 2012/04/23
Re: [Qemu-devel] [PATCH 0/4] block: add optional 'speed' parameter to block-stream, Luiz Capitulino, 2012/04/23