Bug 857281 - [qemu] speed unit of "block-job-set-speed" command mismatch descriped in qemu-monitor.hx
[qemu] speed unit of "block-job-set-speed" command mismatch descriped in qemu...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.4
Unspecified Unspecified
medium Severity low
: rc
: ---
Assigned To: Luiz Capitulino
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-13 22:38 EDT by xu
Modified: 2012-09-24 09:42 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-24 09:42:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description xu 2012-09-13 22:38:48 EDT
Description of problem:

unit of value argurment for "block-job-set-speed" descripted in qemu-monitor.hx of source code, is "in bytes per second" but in fact, it's "Megabyte per second"
;

description in qemu-monitor.hx 

block-job-set-speed
-------------------

Set maximum speed for a background block operation.

This command can only be issued when there is an active block job.

Throttling can be disabled by setting the speed to 0.

Arguments:

- device: the device name
- value:  the maximum speed, in bytes per second


Version-Release number of selected component (if applicable):


How reproducible:

100%

Steps to Reproduce:

1. start a block-stream job by send below command to qmp monitor

{"execute": "human-monitor-command", "arguments": { "command-line": "block-stream drive-virtio-disk1"}}


2. set job speed by command 
{"execute": "human-monitor-command", "arguments": { "command-line": "block-job-set-speed drive-virtio-disk1 1 "}}

3. query job status by command:
{"execute": "query-block-jobs"}

  
Actual results:

speed: 1048576 

Expected results:

according description in qemu-monitor.hx  expect result should be speed:1 , but it's not human-read if values is very very big; so I hope to update qemu-monitor.hx to fix this issue; 

Additional info:

[xu@xutian-dev qemu-kvm]$ git config --list
.....
core.logallrefupdates=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=git://git.app.eng.bos.redhat.com/virt/rhel6/qemu-kvm.git
branch.rhel6/master.remote=origin
branch.rhel6/master.merge=refs/heads/rhel6/master
Comment 2 Luiz Capitulino 2012-09-24 09:42:42 EDT
That's correct.

The text you quoted describes the QMP interface, where the speed is in bytes per second. But the human-monitor-command uses the HMP interface, where the speed is in megabytes per second.

Note You need to log in before you can comment on or make changes to this bug.