[Qemu-block] [PATCH] block: Allow node name for 'qemu-io' HMP command

2016-08-19 Thread Kevin Wolf
When using a node name, create a temporary BlockBackend that is used to run the qemu-io command. Signed-off-by: Kevin Wolf --- hmp.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hmp.c b/hmp.c index a7dfe6f..ad33b44 100644 --- a/hmp.c +++ b/hmp.c @@

[Qemu-block] [PATCH 09/10] block: Accept device model name for block_set_io_throttle

2016-08-19 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts block_set_io_throttle to accept a qdev device name. Signed-off-by: Kevin Wolf --- blockdev.c | 12

[Qemu-block] [PATCH 05/10] block: Accept device model name for x-blockdev-insert-medium

2016-08-19 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts x-blockdev-insert-medium to accept a qdev device name. Signed-off-by: Kevin Wolf --- blockdev.c | 33

[Qemu-block] [PATCH 08/10] block: Accept device model name for blockdev-change-medium

2016-08-19 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts blockdev-change-medium to accept a qdev device name. Signed-off-by: Kevin Wolf --- blockdev.c | 18

[Qemu-block] [PATCH 10/10] qemu-iotests/118: Test media change with qdev name

2016-08-19 Thread Kevin Wolf
We just added the option to use qdev device names in all device related block QMP commands. This patch converts some of the test cases in 118 to use qdev device names instead of BlockBackend names to cover the new way. It converts cases for each of the media change commands, but only for CD-ROM

[Qemu-block] [PATCH 03/10] qdev-monitor: Add blk_by_qdev_id()

2016-08-19 Thread Kevin Wolf
This finds the BlockBackend attached to the device model identified by its qdev ID. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- include/sysemu/block-backend.h | 1 + qdev-monitor.c | 18 ++ 2 files changed, 19

[Qemu-block] [PATCH 01/10] block: Add blk_by_dev()

2016-08-19 Thread Kevin Wolf
This finds a BlockBackend given the device model that is attached to it. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block/block-backend.c | 19 +++ include/sysemu/block-backend.h | 1 + 2 files changed, 20 insertions(+)

[Qemu-block] [PATCH 06/10] block: Accept device model name for x-blockdev-remove-medium

2016-08-19 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts x-blockdev-remove-medium to accept a qdev device name. Signed-off-by: Kevin Wolf --- blockdev.c | 23

[Qemu-block] [PATCH 04/10] block: Accept device model name for blockdev-open/close-tray

2016-08-19 Thread Kevin Wolf
In order to remove the necessity to use BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts blockdev-open/close-tray to accept a qdev device name. Signed-off-by: Kevin Wolf --- blockdev.c | 60

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

2016-08-19 Thread Kevin Wolf
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

[Qemu-block] [PATCH 02/10] qdev-monitor: Factor out find_device_state()

2016-08-19 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- qdev-monitor.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/qdev-monitor.c b/qdev-monitor.c index e19617f..bc0213f 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c

[Qemu-block] [PATCH for-2.8] iotests: Do not rely on unavailable domains in 162

2016-08-19 Thread Max Reitz
There are some (mostly ISP-specific) name servers who will redirect non-existing domains to special hosts. In this case, we will get a different error message when trying to connect to such a host, which breaks test 162. 162 needed this specific error message so it can confirm that qemu was

Re: [Qemu-block] [Qemu-devel] [PATCH v3] qemu-img: change opening method for the output in dd

2016-08-19 Thread Reda Sallahi
On Tue, Aug 16, 2016 at 12:09:06PM +0100, Stefan Hajnoczi wrote: > On Mon, Aug 15, 2016 at 02:11:49PM +0200, Reda Sallahi wrote: > > +blk2 = blk_new_open(image_opts ? NULL : out.filename, > > +NULL, qoptions, BDRV_O_RDWR, NULL); > > This code duplicates a subset of