From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3QPY-0008Sn-FQ for qemu-devel@nongnu.org; Fri, 12 Jun 2015 10:58:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z3QPU-0004wy-Dq for qemu-devel@nongnu.org; Fri, 12 Jun 2015 10:58:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3QPU-0004wq-9f for qemu-devel@nongnu.org; Fri, 12 Jun 2015 10:58:20 -0400 From: Stefan Hajnoczi Date: Fri, 12 Jun 2015 15:57:56 +0100 Message-Id: <1434121078-15776-9-git-send-email-stefanha@redhat.com> In-Reply-To: <1434121078-15776-1-git-send-email-stefanha@redhat.com> References: <1434121078-15776-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 08/10] throttle: add the name of the ThrottleGroup to BlockDeviceInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Maydell , Alberto Garcia , Stefan Hajnoczi From: Alberto Garcia Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Message-id: 172df91f09c69c6f0440a697bbd1b3f95b077ee4.1433779731.git.berto@igalia.com Signed-off-by: Stefan Hajnoczi --- block/qapi.c | 3 +++ hmp.c | 6 ++++-- qapi/block-core.json | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index a5ac312..a738148 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -93,6 +93,9 @@ BlockDeviceInfo *bdrv_block_device_info(BlockDriverState *bs, Error **errp) info->has_iops_size = cfg.op_size; info->iops_size = cfg.op_size; + + info->has_group = true; + info->group = g_strdup(throttle_group_get_name(bs)); } info->write_threshold = bdrv_write_threshold_get(bs); diff --git a/hmp.c b/hmp.c index eb5ef61..8fac44a 100644 --- a/hmp.c +++ b/hmp.c @@ -399,7 +399,8 @@ static void print_block_info(Monitor *mon, BlockInfo *info, " iops_max=%" PRId64 " iops_rd_max=%" PRId64 " iops_wr_max=%" PRId64 - " iops_size=%" PRId64 "\n", + " iops_size=%" PRId64 + " group=%s\n", inserted->bps, inserted->bps_rd, inserted->bps_wr, @@ -412,7 +413,8 @@ static void print_block_info(Monitor *mon, BlockInfo *info, inserted->iops_max, inserted->iops_rd_max, inserted->iops_wr_max, - inserted->iops_size); + inserted->iops_size, + inserted->group); } if (verbose) { diff --git a/qapi/block-core.json b/qapi/block-core.json index 3087154..afa9d3d 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -259,6 +259,8 @@ # # @iops_size: #optional an I/O size in bytes (Since 1.7) # +# @group: #optional throttle group name (Since 2.4) +# # @cache: the cache mode used for the block device (since: 2.3) # # @write_threshold: configured write threshold for the device. @@ -278,7 +280,7 @@ '*bps_max': 'int', '*bps_rd_max': 'int', '*bps_wr_max': 'int', '*iops_max': 'int', '*iops_rd_max': 'int', '*iops_wr_max': 'int', - '*iops_size': 'int', 'cache': 'BlockdevCacheInfo', + '*iops_size': 'int', '*group': 'str', 'cache': 'BlockdevCacheInfo', 'write_threshold': 'int' } } ## -- 2.4.2