[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/5] stream: fix ratelimit_set_speed
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 4/5] stream: fix ratelimit_set_speed |
Date: |
Fri, 30 Nov 2012 14:02:28 +0100 |
From: Dietmar Maurer <address@hidden>
The formula to compute slice_quota was wrong since commit 6ef228fc.
Signed-off-by: Dietmar Maurer <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
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 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
--
1.7.6.5
- [Qemu-devel] [PULL 0/5] Block patches for 1.3.0-rc2, Kevin Wolf, 2012/11/30
- [Qemu-devel] [PATCH 5/5] coroutine-sigaltstack.c: Use stack_t, not struct sigaltstack, Kevin Wolf, 2012/11/30
- [Qemu-devel] [PATCH 1/5] Documentation: Update block cache mode information, Kevin Wolf, 2012/11/30
- [Qemu-devel] [PATCH 3/5] atapi: make change media detection for guests easier, Kevin Wolf, 2012/11/30
- [Qemu-devel] [PATCH 4/5] stream: fix ratelimit_set_speed,
Kevin Wolf <=
- [Qemu-devel] [PATCH 2/5] Documentation: Update image format information, Kevin Wolf, 2012/11/30
- Re: [Qemu-devel] [PULL 0/5] Block patches for 1.3.0-rc2, Anthony Liguori, 2012/11/30