mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +00:00
BlockJob: Bandwidth parameter is in MB when using text monitor
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@us.ibm.com>
This commit is contained in:
parent
57c95175e2
commit
78d9325d1e
@ -3067,8 +3067,7 @@ int qemuMonitorTextBlockJob(qemuMonitorPtr mon,
|
|||||||
ret = virAsprintf(&cmd, "%s", cmd_name);
|
ret = virAsprintf(&cmd, "%s", cmd_name);
|
||||||
} else if (mode == BLOCK_JOB_SPEED) {
|
} else if (mode == BLOCK_JOB_SPEED) {
|
||||||
cmd_name = "block_job_set_speed";
|
cmd_name = "block_job_set_speed";
|
||||||
ret = virAsprintf(&cmd, "%s %s %llu", cmd_name, device,
|
ret = virAsprintf(&cmd, "%s %s %luM", cmd_name, device, bandwidth);
|
||||||
bandwidth * 1024ULL * 1024ULL);
|
|
||||||
} else if (mode == BLOCK_JOB_PULL) {
|
} else if (mode == BLOCK_JOB_PULL) {
|
||||||
cmd_name = "block_stream";
|
cmd_name = "block_stream";
|
||||||
ret = virAsprintf(&cmd, "%s %s", cmd_name, device);
|
ret = virAsprintf(&cmd, "%s %s", cmd_name, device);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user