]> git.proxmox.com Git - pve-qemu-kvm.git/commitdiff
add stream-fix-ratelimit_set_speed.patch
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 24 Oct 2012 10:17:23 +0000 (12:17 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 24 Oct 2012 10:17:23 +0000 (12:17 +0200)
debian/patches/series
debian/patches/stream-fix-ratelimit_set_speed.patch [new file with mode: 0644]

index 8470f587189e7447506882c7fdddac31a436dd9a..d3dcbcd3e7970a719b9f198f14593ec8b071e5b3 100644 (file)
@@ -13,3 +13,4 @@ fix-qemu-img-snapshot-removal.patch
 move-bdrv-snapshot-find.patch
 internal-snapshot-async.patch
 savevm-live.patch
+stream-fix-ratelimit_set_speed.patch
diff --git a/debian/patches/stream-fix-ratelimit_set_speed.patch b/debian/patches/stream-fix-ratelimit_set_speed.patch
new file mode 100644 (file)
index 0000000..0ba0078
--- /dev/null
@@ -0,0 +1,28 @@
+From 264baba5f5e6c2f42af0262bc2ce81647df74639 Mon Sep 17 00:00:00 2001
+From: Dietmar Maurer <dietmar@proxmox.com>
+Date: Wed, 24 Oct 2012 11:59:23 +0200
+Subject: [PATCH] stream: fix ratelimit_set_speed
+
+The formula to compute slice_quota was wrong.
+
+Signed-off-by: Dietmar Maurer <dietmar@proxmox.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.2.5
+