Skip to contentSkip to conversation

Block patches

GIT PULL NAK Stefan Hajnoczi 2 participants 4 messages Jan 22, 2018

lore
Share & tools
lore
#0 lore raw

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(-)
Signature · 1 line
2.14.3
#1 lore raw

[Qemu-devel] [PULL 1/2] hw/block: Use errp directly rather than local_err

From: Mao Zhongyi <[email protected]>

Cc John Snow <[email protected]>
Cc Kevin Wolf <[email protected]>
Cc Max Reitz <[email protected]>
Cc Keith Busch <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc Markus Armbruster <[email protected]>

Message-id: e77848d3735ba590f23ffbf8094379c646c33d79.1511317952.git.maozy.fnst@cn.fujitsu.com

---
 hw/block/virtio-blk.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
hw/block/virtio-blk.c +1 -4
index b1532e4e91..58a5def75d 100644
@@ -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;
     }
Signature · 1 line
2.14.3
#2 lore raw

[Qemu-devel] [PULL 2/2] block: add block_set_io_throttle virtio-blk-pci QMP example

In reply to Stefan Hajnoczi

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.

Message-id: [email protected]

---
 qapi/block-core.json | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
qapi/block-core.json +18 -0
index e94a6881b2..4e84cf29db 100644
@@ -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,
Signature · 1 line
2.14.3
#3 lore raw
In reply to Stefan Hajnoczi
Quoted 11 lines · 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)

NACK

Please ignore this pull request for now. It's broken.

Stefan