qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Alberto Garcia <berto@igalia.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PULL 08/10] throttle: add the name of the ThrottleGroup to BlockDeviceInfo
Date: Fri, 12 Jun 2015 15:57:56 +0100	[thread overview]
Message-ID: <1434121078-15776-9-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1434121078-15776-1-git-send-email-stefanha@redhat.com>

From: Alberto Garcia <berto@igalia.com>

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 172df91f09c69c6f0440a697bbd1b3f95b077ee4.1433779731.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 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

  parent reply	other threads:[~2015-06-12 14:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 14:57 [Qemu-devel] [PULL 00/10] Block patches Stefan Hajnoczi
2015-06-12 14:57 ` [Qemu-devel] [PULL 01/10] Revert "iothread: release iothread around aio_poll" Stefan Hajnoczi
2015-06-12 14:57 ` [Qemu-devel] [PULL 02/10] raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size Stefan Hajnoczi
2015-06-12 14:57 ` [Qemu-devel] [PULL 03/10] throttle: Extract timers from ThrottleState into a separate structure Stefan Hajnoczi
2015-06-12 14:57 ` [Qemu-devel] [PULL 04/10] throttle: Add throttle group infrastructure Stefan Hajnoczi
2015-06-12 14:57 ` [Qemu-devel] [PULL 05/10] throttle: Add throttle group infrastructure tests Stefan Hajnoczi
2015-06-12 14:57 ` [Qemu-devel] [PULL 06/10] throttle: Add throttle group support Stefan Hajnoczi
2015-06-15 12:33   ` Eric Blake
2015-06-12 14:57 ` [Qemu-devel] [PULL 07/10] throttle: acquire the ThrottleGroup lock in bdrv_swap() Stefan Hajnoczi
2015-06-12 14:57 ` Stefan Hajnoczi [this message]
2015-06-12 14:57 ` [Qemu-devel] [PULL 09/10] throttle: Update throttle infrastructure copyright Stefan Hajnoczi
2015-06-12 14:57 ` [Qemu-devel] [PULL 10/10] qemu-iotests: expand test 093 to support group throttling Stefan Hajnoczi
2015-06-15  9:42 ` [Qemu-devel] [PULL 00/10] Block patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434121078-15776-9-git-send-email-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).