On 09/01/2011 03:03 AM, Daniel P. Berrange wrote:
On Wed, Aug 31, 2011 at 05:15:43PM -0500, Adam Litke wrote:
Due to an unfortunate precedent in qemu, the units for the bandwidth parameter
to block_job_set_speed are different between the text monitor and the qmp
monitor. While the qmp monitor uses bytes/s, the text monitor expects MB/s.
Correct the units for the text interface.
Signed-off-by: Adam Litke<agl@xxxxxxxxxx>
---
src/qemu/qemu_monitor_text.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index f37c98c..854ee7f 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -3067,8 +3067,7 @@ int qemuMonitorTextBlockJob(qemuMonitorPtr mon,
ret = virAsprintf(&cmd, "%s", cmd_name);
} else if (mode == BLOCK_JOB_SPEED) {
cmd_name = "block_job_set_speed";
- ret = virAsprintf(&cmd, "%s %s %llu", cmd_name, device,
- bandwidth * 1024ULL * 1024ULL);
+ ret = virAsprintf(&cmd, "%s %s %luM", cmd_name, device, bandwidth);
} else if (mode == BLOCK_JOB_PULL) {
cmd_name = "block_stream";
ret = virAsprintf(&cmd, "%s %s", cmd_name, device);
ACK
Pushed.
--
Eric Blake eblake@xxxxxxxxxx +1-801-349-2682
Libvirt virtualization library http://libvirt.org
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list