Skip to content

block: Accept qdev IDs in device level QMP commands

Kevin Wolf qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 3 repliesIn review
  2. v210 patches 7 repliesSuperseded
  3. v110 patches 21 repliesSuperseded

Changes in v3 from the cover letter

- Rebased on top of qmp-commands.hx removal

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10block: Add blk_by_dev()block/block-backend.c include/sysemu/block-backend.h+20 -00 replies
2/10qdev-monitor: Factor out find_device_state()qdev-monitor.c+12 -40 replies
3/10qdev-monitor: Add blk_by_qdev_id()include/sysemu/block-backend.h qdev-monitor.c+19 -00 replies
4/10block: Accept device model name for blockdev-open/close-trayblockdev.c docs/qmp-commands.txt qapi/block-core.json+64 -231 reply
5/10block: Accept device model name for x-blockdev-insert-mediumblockdev.c docs/qmp-commands.txt qapi/block-core.json+26 -200 replies
6/10block: Accept device model name for x-blockdev-remove-mediumblockdev.c docs/qmp-commands.txt qapi/block-core.json+28 -190 replies
7/10block: Accept device model name for ejectblockdev.c docs/qmp-commands.txt hmp.c +1 more+20 -90 replies
8/10block: Accept device model name for blockdev-change-mediumblockdev.c docs/qmp-commands.txt hmp.c +2 more+28 -170 replies
9/10block: Accept device model name for block_set_io_throttleblockdev.c docs/qmp-commands.txt qapi/block-core.json+16 -100 replies
10/10qemu-iotests/118: Test media change with qdev nametests/qemu-iotests/118 tests/qemu-iotests/iotests.py+73 -170 replies

Reviews trailers per patch

5 of 10 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEric Blake
SeriesR-b
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10
6/10
7/10
8/10
9/10
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 00/10] block: Accept qdev IDs in device level QMP commands

In order to remove the necessity to use BlockBackend names in the external API, we already converted all block layer QMP commands on the node level to accept node names instead of BlockBackend names. This series converts the second part, device level commands, to allow qdev device names instead of BlockBackend names.

v3:
- Rebased on top of qmp-commands.hx removal

v2:
- qmp-commands.hx: Update examples to use qdev IDs [Eric]
- QAPI schema: Make sure to include #optional for both 'device' and 'id and to add deprecation warnings for 'device' everywhere [Eric]
- Fixed use of (undefined) device string without has_device in error messages

Kevin Wolf (10):
block: Add blk_by_dev()
qdev-monitor: Factor out find_device_state()
qdev-monitor: Add blk_by_qdev_id()
block: Accept device model name for blockdev-open/close-tray
block: Accept device model name for x-blockdev-insert-medium
block: Accept device model name for x-blockdev-remove-medium
block: Accept device model name for eject
block: Accept device model name for blockdev-change-medium
block: Accept device model name for block_set_io_throttle qemu-iotests/118: Test media change with qdev name

 block/block-backend.c          |  19 ++++++
 blockdev.c                     | 152 +++++++++++++++++++++++++++--------------
 docs/qmp-commands.txt          |  54 +++++++++------
 hmp.c                          |   7 +-
 include/sysemu/block-backend.h |   2 +
 qapi/block-core.json           |  44 ++++++++----
 qapi/block.json                |   9 ++-
 qdev-monitor.c                 |  34 +++++++--
 qmp.c                          |   4 +-
 tests/qemu-iotests/118         |  85 ++++++++++++++++++-----
 tests/qemu-iotests/iotests.py  |   5 ++
 11 files changed, 301 insertions(+), 114 deletions(-)
Signature · 1 line
1.8.3.1