* [Qemu-devel] [PULL 0/2] Block patches
@ 2018-01-22 12:40 Stefan Hajnoczi
2018-01-22 12:40 ` [Qemu-devel] [PULL 1/2] hw/block: Use errp directly rather than local_err Stefan Hajnoczi
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2018-01-22 12:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi
The following changes since commit b384cd95eb9c6f73ad84ed1bb0717a26e29cc78f:
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-01-19 16:35:25 +0000)
are available in the Git repository at:
git://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to 91661dbdff76d526d22bc7ddf9df3d41e80cdbbf:
block: add block_set_io_throttle virtio-blk-pci QMP example (2018-01-22 12:19:14 +0000)
----------------------------------------------------------------
----------------------------------------------------------------
Mao Zhongyi (1):
hw/block: Use errp directly rather than local_err
Stefan Hajnoczi (1):
block: add block_set_io_throttle virtio-blk-pci QMP example
qapi/block-core.json | 18 ++++++++++++++++++
hw/block/virtio-blk.c | 5 +----
2 files changed, 19 insertions(+), 4 deletions(-)
--
2.14.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 1/2] hw/block: Use errp directly rather than local_err
2018-01-22 12:40 [Qemu-devel] [PULL 0/2] Block patches Stefan Hajnoczi
@ 2018-01-22 12:40 ` Stefan Hajnoczi
2018-01-22 12:40 ` [Qemu-devel] [PULL 2/2] block: add block_set_io_throttle virtio-blk-pci QMP example Stefan Hajnoczi
2018-01-22 13:54 ` [Qemu-devel] [PULL 0/2] Block patches Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2018-01-22 12:40 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Mao Zhongyi, John Snow, Kevin Wolf, Max Reitz,
Keith Busch, Stefan Hajnoczi, Michael S. Tsirkin, Paolo Bonzini,
Gerd Hoffmann, Markus Armbruster
From: Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
Cc: John Snow <jsnow@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: e77848d3735ba590f23ffbf8094379c646c33d79.1511317952.git.maozy.fnst@cn.fujitsu.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
hw/block/virtio-blk.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index b1532e4e91..58a5def75d 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -913,7 +913,6 @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp)
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
VirtIOBlock *s = VIRTIO_BLK(dev);
VirtIOBlkConf *conf = &s->conf;
- Error *err = NULL;
unsigned i;
if (!conf->conf.blk) {
@@ -966,9 +965,7 @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp)
for (i = 0; i < conf->num_queues; i++) {
virtio_add_queue(vdev, conf->queue_size, virtio_blk_handle_output);
}
- virtio_blk_data_plane_create(vdev, conf, &s->dataplane, &err);
- if (err != NULL) {
- error_propagate(errp, err);
+ if (!virtio_blk_data_plane_create(vdev, conf, &s->dataplane, errp)) {
virtio_cleanup(vdev);
return;
}
--
2.14.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 2/2] block: add block_set_io_throttle virtio-blk-pci QMP example
2018-01-22 12:40 [Qemu-devel] [PULL 0/2] Block patches Stefan Hajnoczi
2018-01-22 12:40 ` [Qemu-devel] [PULL 1/2] hw/block: Use errp directly rather than local_err Stefan Hajnoczi
@ 2018-01-22 12:40 ` Stefan Hajnoczi
2018-01-22 13:54 ` [Qemu-devel] [PULL 0/2] Block patches Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2018-01-22 12:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi, Kevin Wolf
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] Block patches
2018-01-22 12:40 [Qemu-devel] [PULL 0/2] Block patches Stefan Hajnoczi
2018-01-22 12:40 ` [Qemu-devel] [PULL 1/2] hw/block: Use errp directly rather than local_err Stefan Hajnoczi
2018-01-22 12:40 ` [Qemu-devel] [PULL 2/2] block: add block_set_io_throttle virtio-blk-pci QMP example Stefan Hajnoczi
@ 2018-01-22 13:54 ` Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2018-01-22 13:54 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Peter Maydell
On Mon, Jan 22, 2018 at 12:40 PM, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit b384cd95eb9c6f73ad84ed1bb0717a26e29cc78f:
>
> Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-01-19 16:35:25 +0000)
>
> are available in the Git repository at:
>
> git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 91661dbdff76d526d22bc7ddf9df3d41e80cdbbf:
>
> block: add block_set_io_throttle virtio-blk-pci QMP example (2018-01-22 12:19:14 +0000)
NACK
Please ignore this pull request for now. It's broken.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-22 13:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 12:40 [Qemu-devel] [PULL 0/2] Block patches Stefan Hajnoczi
2018-01-22 12:40 ` [Qemu-devel] [PULL 1/2] hw/block: Use errp directly rather than local_err Stefan Hajnoczi
2018-01-22 12:40 ` [Qemu-devel] [PULL 2/2] block: add block_set_io_throttle virtio-blk-pci QMP example Stefan Hajnoczi
2018-01-22 13:54 ` [Qemu-devel] [PULL 0/2] Block patches Stefan Hajnoczi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.