From 2024c1df43eae0d2e35663da0c6e8c51290a386e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Canet?= Date: Mon, 2 Sep 2013 14:14:41 +0200 Subject: block: Add iops_size to do the iops accounting for a given io size. This feature can be used in case where users are avoiding the iops limit by doing jumbo I/Os hammering the storage backend. Signed-off-by: Benoit Canet Signed-off-by: Stefan Hajnoczi --- qmp-commands.hx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'qmp-commands.hx') diff --git a/qmp-commands.hx b/qmp-commands.hx index 7c9667bcce..008cad95a2 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1389,7 +1389,7 @@ EQMP { .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,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?", + .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,iops_size:l?", .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle, }, @@ -1414,6 +1414,7 @@ Arguments: - "iops_max": total I/O operations max (json-int) - "iops_rd_max": read I/O operations max (json-int) - "iops_wr_max": write I/O operations max (json-int) +- "iops_size": I/O size in bytes when limiting (json-int) Example: @@ -1429,7 +1430,8 @@ Example: "bps_wr_max": 0, "iops_max": 0, "iops_rd_max": 0, - "iops_wr_max": 0 } } + "iops_wr_max": 0, + "iops_size": 0 } } <- { "return": {} } EQMP @@ -1776,6 +1778,7 @@ Each json-object contain the following: - "iops_max": total I/O operations max (json-int) - "iops_rd_max": read I/O operations max (json-int) - "iops_wr_max": write I/O operations max (json-int) + - "iops_size": I/O size when limiting by iops (json-int) - "image": the detail of the image, it is a json-object containing the following: - "filename": image file name (json-string) @@ -1851,6 +1854,7 @@ Example: "iops_max": 0, "iops_rd_max": 0, "iops_wr_max": 0, + "iops_size": 0, "image":{ "filename":"disks/test.qcow2", "format":"qcow2", -- cgit v1.2.1