提交 586b5466 编写于 作者: E Eric Blake 提交者: Michael Tokarev

qmp: fix integer usage in examples

Per the qapi schema, block_set_io_throttle takes most arguments
as ints, not strings.

* qmp-commands.hx (block_set_io_throttle): Use correct type.  Fix
whitespace and a copy-paste bug in the process.
Signed-off-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NBenoit Canet <benoit@irqsave.net>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 a32b1274
...@@ -1402,22 +1402,22 @@ Change I/O throttle limits for a block drive. ...@@ -1402,22 +1402,22 @@ Change I/O throttle limits for a block drive.
Arguments: Arguments:
- "device": device name (json-string) - "device": device name (json-string)
- "bps": total throughput limit in bytes per second(json-int) - "bps": total throughput limit in bytes per second (json-int)
- "bps_rd": read throughput limit in bytes per second(json-int) - "bps_rd": read throughput limit in bytes per second (json-int)
- "bps_wr": read throughput limit in bytes per second(json-int) - "bps_wr": write throughput limit in bytes per second (json-int)
- "iops": total I/O operations per second(json-int) - "iops": total I/O operations per second (json-int)
- "iops_rd": read I/O operations per second(json-int) - "iops_rd": read I/O operations per second (json-int)
- "iops_wr": write I/O operations per second(json-int) - "iops_wr": write I/O operations per second (json-int)
Example: Example:
-> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0", -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
"bps": "1000000", "bps": 1000000,
"bps_rd": "0", "bps_rd": 0,
"bps_wr": "0", "bps_wr": 0,
"iops": "0", "iops": 0,
"iops_rd": "0", "iops_rd": 0,
"iops_wr": "0" } } "iops_wr": 0 } }
<- { "return": {} } <- { "return": {} }
EQMP EQMP
...@@ -1791,7 +1791,7 @@ Each json-object contain the following: ...@@ -1791,7 +1791,7 @@ Each json-object contain the following:
- "vm-state-size": size of the VM state in bytes (json-int) - "vm-state-size": size of the VM state in bytes (json-int)
- "date-sec": UTC date of the snapshot in seconds (json-int) - "date-sec": UTC date of the snapshot in seconds (json-int)
- "date-nsec": fractional part in nanoseconds to be used with - "date-nsec": fractional part in nanoseconds to be used with
date-sec(json-int) date-sec (json-int)
- "vm-clock-sec": VM clock relative to boot in seconds - "vm-clock-sec": VM clock relative to boot in seconds
(json-int) (json-int)
- "vm-clock-nsec": fractional part in nanoseconds to be used - "vm-clock-nsec": fractional part in nanoseconds to be used
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册