summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDietmar Maurer <dietmar@proxmox.com>2012-10-24 12:10:47 +0200
committerDoug Goldstein <cardoe@cardoe.com>2012-12-13 15:32:00 -0600
commit007ea40269798ae0d3f493f79b3e9bcc2e3a7b2c (patch)
tree7b4b2b6cb996e2bfa861e02e31b5047c522d0353
parentusb: fail usbdevice_create() when there is no USB bus (diff)
downloadqemu-kvm-007ea40269798ae0d3f493f79b3e9bcc2e3a7b2c.tar.gz
qemu-kvm-007ea40269798ae0d3f493f79b3e9bcc2e3a7b2c.tar.bz2
qemu-kvm-007ea40269798ae0d3f493f79b3e9bcc2e3a7b2c.zip
stream: fix ratelimit_set_speed
The formula to compute slice_quota was wrong since commit 6ef228fc. Signed-off-by: Dietmar Maurer <dietmar@proxmox.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit e3980e28bb888bf643054770452998d1b4319609) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> (cherry picked from commit 178ef3a43ad24d074c683e2fe0658e589747c823)
-rw-r--r--include/qemu/ratelimit.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h
index c6ac28114..d1610f135 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