From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmJO7-0003HH-3X for qemu-devel@nongnu.org; Tue, 20 Sep 2016 07:39:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmJO4-0001Is-ED for qemu-devel@nongnu.org; Tue, 20 Sep 2016 07:38:59 -0400 From: Kevin Wolf Date: Tue, 20 Sep 2016 13:38:39 +0200 Message-Id: <1474371529-24466-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH v3 00/10] block: Accept qdev IDs in device level QMP commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, eblake@redhat.com, mreitz@redhat.com, jsnow@redhat.com, qemu-devel@nongnu.org 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(-) -- 1.8.3.1