[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [RFC PATCH 32/56] hmp: Make block_set_io_throttle's arg
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-block] [RFC PATCH 32/56] hmp: Make block_set_io_throttle's arguments unsigned |
Date: |
Tue, 8 Aug 2017 16:34:30 +0100 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
* Markus Armbruster (address@hidden) wrote:
> The previous commit made them unsigned in QMP. Switch HMP's args_type
> from 'l' to 'o'. Loses support for expressions (QEMU pocket
> calculator), gains support for unit suffixes. Negative values are no
> longer accepted and interpreted modulo 2^64. Instead, values between
> 2^63 and 2^64-1 are now accepted.
But that also means all these values are assumed to be in MB by default?
Dave
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> hmp-commands.hx | 2 +-
> hmp.c | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hmp-commands.hx b/hmp-commands.hx
> index 46ce79c..bc3c066 100644
> --- a/hmp-commands.hx
> +++ b/hmp-commands.hx
> @@ -1668,7 +1668,7 @@ ETEXI
>
> {
> .name = "block_set_io_throttle",
> - .args_type =
> "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
> + .args_type =
> "device:B,bps:o,bps_rd:o,bps_wr:o,iops:l,iops_rd:l,iops_wr:l",
> .params = "device bps bps_rd bps_wr iops iops_rd iops_wr",
> .help = "change I/O throttle limits for a block drive",
> .cmd = hmp_block_set_io_throttle,
> diff --git a/hmp.c b/hmp.c
> index 3253674..599e816 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -1764,9 +1764,9 @@ void hmp_block_set_io_throttle(Monitor *mon, const
> QDict *qdict)
> BlockIOThrottle throttle = {
> .has_device = true,
> .device = (char *) qdict_get_str(qdict, "device"),
> - .bps = qdict_get_int(qdict, "bps"),
> - .bps_rd = qdict_get_int(qdict, "bps_rd"),
> - .bps_wr = qdict_get_int(qdict, "bps_wr"),
> + .bps = qdict_get_uint(qdict, "bps"),
> + .bps_rd = qdict_get_uint(qdict, "bps_rd"),
> + .bps_wr = qdict_get_uint(qdict, "bps_wr"),
> .iops = qdict_get_int(qdict, "iops"),
> .iops_rd = qdict_get_int(qdict, "iops_rd"),
> .iops_wr = qdict_get_int(qdict, "iops_wr"),
> --
> 2.7.5
>
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- Re: [Qemu-block] [Qemu-devel] [RFC PATCH 12/56] pc-dimm: Make size and address unsigned in QAPI/QMP, (continued)
[Qemu-block] [RFC PATCH 29/56] block: Make BlockDirtyInfo byte count unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 35/56] blockjob: Lift speed sign conversion into block_job_set_speed(), Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 37/56] blockjob: Make BlockJobInfo and event speed unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 33/56] block: Make block_resize size unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 26/56] block: Make BlockMeasureInfo sizes unsigned in QAPI, Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 32/56] hmp: Make block_set_io_throttle's arguments unsigned, Markus Armbruster, 2017/08/07
- Re: [Qemu-block] [RFC PATCH 32/56] hmp: Make block_set_io_throttle's arguments unsigned,
Dr. David Alan Gilbert <=
[Qemu-block] [RFC PATCH 27/56] block/dirty-bitmap: Clean up signed vs. unsigned dirty counts, Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 31/56] block: Make throttle byte rates and sizes unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 39/56] blockjob: Lift speed sign conversion out of block_job_create(), Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 45/56] blockjob: Lift speed sign conversion out of commit_start() etc., Markus Armbruster, 2017/08/07