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>
This commit is contained in:
parent
0c6f08b0b0
commit
e3980e28bb
@ -42,7 +42,7 @@ static inline void ratelimit_set_speed(RateLimit *limit, uint64_t speed,
|
|||||||
uint64_t slice_ns)
|
uint64_t slice_ns)
|
||||||
{
|
{
|
||||||
limit->slice_ns = slice_ns;
|
limit->slice_ns = slice_ns;
|
||||||
limit->slice_quota = ((double)speed * 1000000000ULL) / slice_ns;
|
limit->slice_quota = ((double)speed * slice_ns)/1000000000ULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user