From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Kevin Wolf <kwolf@redhat.com>
Subject: [Qemu-devel] [PULL v2 1/6] block: add block_set_io_throttle virtio-blk-pci QMP example
Date: Mon, 22 Jan 2018 16:00:43 +0000 [thread overview]
Message-ID: <20180122160048.29571-2-stefanha@redhat.com> (raw)
In-Reply-To: <20180122160048.29571-1-stefanha@redhat.com>
The block_set_io_throttle command can look up BlockBackends by the
attached qdev device ID. virtio-blk-pci is a special case because the
actual VirtIOBlock device is the "/virtio-backend" child of the PCI
adapter device.
Add a QMP schema example so clients will know how to use
block_set_io_throttle on the virtio-blk-pci device.
The alternative is to implement some sort of aliasing for qmp_get_blk()
but that is likely to cause confusion and could break future use cases.
Let's not go there.
Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-id: 20180117090700.25811-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
qapi/block-core.json | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index e94a6881b2..4e84cf29db 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1799,6 +1799,24 @@
# Example:
#
# -> { "execute": "block_set_io_throttle",
+# "arguments": { "id": "virtio-blk-pci0/virtio-backend",
+# "bps": 0,
+# "bps_rd": 0,
+# "bps_wr": 0,
+# "iops": 512,
+# "iops_rd": 0,
+# "iops_wr": 0,
+# "bps_max": 0,
+# "bps_rd_max": 0,
+# "bps_wr_max": 0,
+# "iops_max": 0,
+# "iops_rd_max": 0,
+# "iops_wr_max": 0,
+# "bps_max_length": 0,
+# "iops_size": 0 } }
+# <- { "return": {} }
+#
+# -> { "execute": "block_set_io_throttle",
# "arguments": { "id": "ide0-1-0",
# "bps": 1000000,
# "bps_rd": 0,
--
2.14.3
next prev parent reply other threads:[~2018-01-22 16:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 16:00 [Qemu-devel] [PULL v2 0/6] Block patches Stefan Hajnoczi
2018-01-22 16:00 ` Stefan Hajnoczi [this message]
2018-01-22 16:00 ` [Qemu-devel] [PULL v2 2/6] docs/interop/prl-xml: description of Parallels Disk format Stefan Hajnoczi
2018-01-22 16:00 ` [Qemu-devel] [PULL v2 3/6] configure: add dependency Stefan Hajnoczi
2018-01-22 16:00 ` [Qemu-devel] [PULL v2 4/6] block/parallels: move some structures into header Stefan Hajnoczi
2018-01-22 16:00 ` [Qemu-devel] [PULL v2 5/6] block/parallels: replace some magic numbers Stefan Hajnoczi
2018-01-22 16:00 ` [Qemu-devel] [PULL v2 6/6] block/parallels: add backing support to readv/writev Stefan Hajnoczi
2018-01-24 16:59 ` [Qemu-devel] [PULL v2 0/6] 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=20180122160048.29571-2-stefanha@redhat.com \
--to=stefanha@redhat.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).