On 10/24/2012 04:10 AM, Dietmar Maurer wrote: > The formula to compute slice_quota was wrong. > > Signed-off-by: Dietmar Maurer <diet...@proxmox.com> > --- > include/qemu/ratelimit.h | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-)
Reviewed-by: Eric Blake <ebl...@redhat.com> 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 ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature