diff options
author | Dietmar Maurer <dietmar@proxmox.com> | 2012-10-24 12:10:47 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-11-30 11:33:24 +0100 |
commit | e3980e28bb888bf643054770452998d1b4319609 (patch) | |
tree | 98159f220bbeca11081091d150d1a3faa5bd10cd | |
parent | 0c6f08b0b0d0c758789cdb7257a48e873598bdbb (diff) | |
download | qemu-e3980e28bb888bf643054770452998d1b4319609.tar.gz qemu-e3980e28bb888bf643054770452998d1b4319609.tar.bz2 qemu-e3980e28bb888bf643054770452998d1b4319609.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>
-rw-r--r-- | include/qemu/ratelimit.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h index c6ac281141..d1610f135b 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 |