qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] stream: fix ratelimit_set_speed


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] stream: fix ratelimit_set_speed
Date: Wed, 24 Oct 2012 17:29:35 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1

On 10/24/2012 04:10 AM, Dietmar Maurer wrote:
> The formula to compute slice_quota was wrong.
> 
> Signed-off-by: Dietmar Maurer <address@hidden>
> ---
>  include/qemu/ratelimit.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

However, it might also be nice to point to the commit introducing the
bug in the commit message (6ef228fc0de)

> 
> diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h
> index c6ac281..d1610f1 100644
> --- a/include/qemu/ratelimit.h
> +++ b/include/qemu/ratelimit.h
> @@ -42,7 +42,7 @@ static inline void ratelimit_set_speed(RateLimit *limit, 
> uint64_t speed,
>                                         uint64_t slice_ns)
>  {
>      limit->slice_ns = slice_ns;
> -    limit->slice_quota = ((double)speed * 1000000000ULL) / slice_ns;
> +    limit->slice_quota = ((double)speed * slice_ns)/1000000000ULL;
>  }
>  
>  #endif
> 

-- 
Eric Blake   address@hidden    +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]