qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 2/6] block-commit: speed is an optional param


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 2/6] block-commit: speed is an optional parameter
Date: Tue, 08 Apr 2014 10:24:07 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 04/08/2014 06:50 AM, Max Reitz wrote:
> As speed is an optional parameter for the QMP block-commit command, it
> should be set to 0 if not given (as it is undefined if has_speed is
> false), that is, the speed should not be limited.
> 
> Signed-off-by: Max Reitz <address@hidden>
> ---
>  blockdev.c | 3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by: Eric Blake <address@hidden>

> 
> diff --git a/blockdev.c b/blockdev.c
> index b988cc5..9d7bd04 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -1876,6 +1876,9 @@ void qmp_block_commit(const char *device,
>       */
>      BlockdevOnError on_error = BLOCKDEV_ON_ERROR_REPORT;
>  
> +    if (!has_speed) {
> +        speed = 0;
> +    }
>      if (!has_granularity) {
>          granularity = 0;
>      }
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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