qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: anthony@codemonkey.ws
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 4/5] stream: fix ratelimit_set_speed
Date: Fri, 30 Nov 2012 14:02:28 +0100	[thread overview]
Message-ID: <1354280549-5954-5-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1354280549-5954-1-git-send-email-kwolf@redhat.com>

From: Dietmar Maurer <dietmar@proxmox.com>

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>
---
 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

  parent reply	other threads:[~2012-11-30 13:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30 13:02 [Qemu-devel] [PULL 0/5] Block patches for 1.3.0-rc2 Kevin Wolf
2012-11-30 13:02 ` [Qemu-devel] [PATCH 1/5] Documentation: Update block cache mode information Kevin Wolf
2012-11-30 13:02 ` [Qemu-devel] [PATCH 2/5] Documentation: Update image format information Kevin Wolf
2012-11-30 13:02 ` [Qemu-devel] [PATCH 3/5] atapi: make change media detection for guests easier Kevin Wolf
2012-11-30 13:02 ` Kevin Wolf [this message]
2012-11-30 13:02 ` [Qemu-devel] [PATCH 5/5] coroutine-sigaltstack.c: Use stack_t, not struct sigaltstack Kevin Wolf
2012-11-30 18:43 ` [Qemu-devel] [PULL 0/5] Block patches for 1.3.0-rc2 Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1354280549-5954-5-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).