Commit e3980e28 authored by Dietmar Maurer's avatar Dietmar Maurer Committed by Kevin Wolf
Browse files

stream: fix ratelimit_set_speed



The formula to compute slice_quota was wrong since commit 6ef228fc.

Signed-off-by: default avatarDietmar Maurer <dietmar@proxmox.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 0c6f08b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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