* [Qemu-devel] [PATCH v2 01/10] block: Add blk_by_dev()
2016-09-19 16:54 [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands Kevin Wolf
@ 2016-09-19 16:54 ` Kevin Wolf
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 02/10] qdev-monitor: Factor out find_device_state() Kevin Wolf
` (9 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Kevin Wolf @ 2016-09-19 16:54 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, eblake, mreitz, jsnow, qemu-devel
This finds a BlockBackend given the device model that is attached to it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
block/block-backend.c | 19 +++++++++++++++++++
include/sysemu/block-backend.h | 1 +
2 files changed, 20 insertions(+)
diff --git a/block/block-backend.c b/block/block-backend.c
index d1349d9..0bd19ab 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -560,6 +560,25 @@ void *blk_get_attached_dev(BlockBackend *blk)
}
/*
+ * Return the BlockBackend which has the device model @dev attached if it
+ * exists, else null.
+ *
+ * @dev must not be null.
+ */
+BlockBackend *blk_by_dev(void *dev)
+{
+ BlockBackend *blk = NULL;
+
+ assert(dev != NULL);
+ while ((blk = blk_all_next(blk)) != NULL) {
+ if (blk->dev == dev) {
+ return blk;
+ }
+ }
+ return NULL;
+}
+
+/*
* Set @blk's device model callbacks to @ops.
* @opaque is the opaque argument to pass to the callbacks.
* This is for use by device models.
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index 4808a96..410eb68 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -111,6 +111,7 @@ int blk_attach_dev(BlockBackend *blk, void *dev);
void blk_attach_dev_nofail(BlockBackend *blk, void *dev);
void blk_detach_dev(BlockBackend *blk, void *dev);
void *blk_get_attached_dev(BlockBackend *blk);
+BlockBackend *blk_by_dev(void *dev);
void blk_set_dev_ops(BlockBackend *blk, const BlockDevOps *ops, void *opaque);
int blk_pread_unthrottled(BlockBackend *blk, int64_t offset, uint8_t *buf,
int count);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH v2 02/10] qdev-monitor: Factor out find_device_state()
2016-09-19 16:54 [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands Kevin Wolf
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 01/10] block: Add blk_by_dev() Kevin Wolf
@ 2016-09-19 16:54 ` Kevin Wolf
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 03/10] qdev-monitor: Add blk_by_qdev_id() Kevin Wolf
` (8 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Kevin Wolf @ 2016-09-19 16:54 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, eblake, mreitz, jsnow, qemu-devel
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
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
@@ -801,7 +801,7 @@ void qmp_device_add(QDict *qdict, QObject **ret_data, Error **errp)
object_unref(OBJECT(dev));
}
-void qmp_device_del(const char *id, Error **errp)
+static DeviceState *find_device_state(const char *id, Error **errp)
{
Object *obj;
@@ -819,15 +819,23 @@ void qmp_device_del(const char *id, Error **errp)
if (!obj) {
error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
"Device '%s' not found", id);
- return;
+ return NULL;
}
if (!object_dynamic_cast(obj, TYPE_DEVICE)) {
error_setg(errp, "%s is not a hotpluggable device", id);
- return;
+ return NULL;
}
- qdev_unplug(DEVICE(obj), errp);
+ return DEVICE(obj);
+}
+
+void qmp_device_del(const char *id, Error **errp)
+{
+ DeviceState *dev = find_device_state(id, errp);
+ if (dev != NULL) {
+ qdev_unplug(dev, errp);
+ }
}
void qdev_machine_init(void)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH v2 03/10] qdev-monitor: Add blk_by_qdev_id()
2016-09-19 16:54 [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands Kevin Wolf
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 01/10] block: Add blk_by_dev() Kevin Wolf
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 02/10] qdev-monitor: Factor out find_device_state() Kevin Wolf
@ 2016-09-19 16:54 ` Kevin Wolf
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 04/10] block: Accept device model name for blockdev-open/close-tray Kevin Wolf
` (7 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Kevin Wolf @ 2016-09-19 16:54 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, eblake, mreitz, jsnow, qemu-devel
This finds the BlockBackend attached to the device model identified by
its qdev ID.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
include/sysemu/block-backend.h | 1 +
qdev-monitor.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index 410eb68..3b29317 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -112,6 +112,7 @@ void blk_attach_dev_nofail(BlockBackend *blk, void *dev);
void blk_detach_dev(BlockBackend *blk, void *dev);
void *blk_get_attached_dev(BlockBackend *blk);
BlockBackend *blk_by_dev(void *dev);
+BlockBackend *blk_by_qdev_id(const char *id, Error **errp);
void blk_set_dev_ops(BlockBackend *blk, const BlockDevOps *ops, void *opaque);
int blk_pread_unthrottled(BlockBackend *blk, int64_t offset, uint8_t *buf,
int count);
diff --git a/qdev-monitor.c b/qdev-monitor.c
index bc0213f..4f78ecb 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -28,6 +28,7 @@
#include "qemu/config-file.h"
#include "qemu/error-report.h"
#include "qemu/help_option.h"
+#include "sysemu/block-backend.h"
/*
* Aliases were a bad idea from the start. Let's keep them
@@ -838,6 +839,23 @@ void qmp_device_del(const char *id, Error **errp)
}
}
+BlockBackend *blk_by_qdev_id(const char *id, Error **errp)
+{
+ DeviceState *dev;
+ BlockBackend *blk;
+
+ dev = find_device_state(id, errp);
+ if (dev == NULL) {
+ return NULL;
+ }
+
+ blk = blk_by_dev(dev);
+ if (!blk) {
+ error_setg(errp, "Device does not have a block device backend");
+ }
+ return blk;
+}
+
void qdev_machine_init(void)
{
qdev_get_peripheral_anon();
--
1.8.3.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH v2 04/10] block: Accept device model name for blockdev-open/close-tray
2016-09-19 16:54 [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands Kevin Wolf
` (2 preceding siblings ...)
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 03/10] qdev-monitor: Add blk_by_qdev_id() Kevin Wolf
@ 2016-09-19 16:54 ` Kevin Wolf
2016-09-19 19:28 ` Eric Blake
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 05/10] block: Accept device model name for x-blockdev-insert-medium Kevin Wolf
` (6 subsequent siblings)
10 siblings, 1 reply; 19+ messages in thread
From: Kevin Wolf @ 2016-09-19 16:54 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, eblake, mreitz, jsnow, qemu-devel
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 <kwolf@redhat.com>
---
blockdev.c | 61 +++++++++++++++++++++++++++++++++++++++-------------
qapi/block-core.json | 14 ++++++++----
qmp-commands.hx | 16 ++++++++------
3 files changed, 66 insertions(+), 25 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index fb207cd..046f9c6 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -56,7 +56,8 @@
static QTAILQ_HEAD(, BlockDriverState) monitor_bdrv_states =
QTAILQ_HEAD_INITIALIZER(monitor_bdrv_states);
-static int do_open_tray(const char *device, bool force, Error **errp);
+static int do_open_tray(const char *blk_name, const char *qdev_id,
+ bool force, Error **errp);
static const char *const if_name[IF_COUNT] = {
[IF_NONE] = "none",
@@ -1198,6 +1199,29 @@ static BlockDriverState *qmp_get_root_bs(const char *name, Error **errp)
return bs;
}
+static BlockBackend *qmp_get_blk(const char *blk_name, const char *qdev_id,
+ Error **errp)
+{
+ BlockBackend *blk;
+
+ if (!blk_name == !qdev_id) {
+ error_setg(errp, "Need exactly one of 'device' and 'id'");
+ return NULL;
+ }
+
+ if (qdev_id) {
+ blk = blk_by_qdev_id(qdev_id, errp);
+ } else {
+ blk = blk_by_name(blk_name);
+ if (blk == NULL) {
+ error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
+ "Device '%s' not found", blk_name);
+ }
+ }
+
+ return blk;
+}
+
void hmp_commit(Monitor *mon, const QDict *qdict)
{
const char *device = qdict_get_str(qdict, "device");
@@ -2250,7 +2274,7 @@ void qmp_eject(const char *device, bool has_force, bool force, Error **errp)
force = false;
}
- rc = do_open_tray(device, force, &local_err);
+ rc = do_open_tray(device, NULL, force, &local_err);
if (rc && rc != -ENOSYS) {
error_propagate(errp, local_err);
return;
@@ -2295,15 +2319,15 @@ void qmp_block_passwd(bool has_device, const char *device,
* If the guest was asked to open the tray, return -EINPROGRESS.
* Else, return 0.
*/
-static int do_open_tray(const char *device, bool force, Error **errp)
+static int do_open_tray(const char *blk_name, const char *qdev_id,
+ bool force, Error **errp)
{
BlockBackend *blk;
+ const char *device = qdev_id ?: blk_name;
bool locked;
- blk = blk_by_name(device);
+ blk = qmp_get_blk(blk_name, qdev_id, errp);
if (!blk) {
- error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
- "Device '%s' not found", device);
return -ENODEV;
}
@@ -2339,7 +2363,9 @@ static int do_open_tray(const char *device, bool force, Error **errp)
return 0;
}
-void qmp_blockdev_open_tray(const char *device, bool has_force, bool force,
+void qmp_blockdev_open_tray(bool has_device, const char *device,
+ bool has_id, const char *id,
+ bool has_force, bool force,
Error **errp)
{
Error *local_err = NULL;
@@ -2348,7 +2374,9 @@ void qmp_blockdev_open_tray(const char *device, bool has_force, bool force,
if (!has_force) {
force = false;
}
- rc = do_open_tray(device, force, &local_err);
+ rc = do_open_tray(has_device ? device : NULL,
+ has_id ? id : NULL,
+ force, &local_err);
if (rc && rc != -ENOSYS && rc != -EINPROGRESS) {
error_propagate(errp, local_err);
return;
@@ -2356,19 +2384,22 @@ void qmp_blockdev_open_tray(const char *device, bool has_force, bool force,
error_free(local_err);
}
-void qmp_blockdev_close_tray(const char *device, Error **errp)
+void qmp_blockdev_close_tray(bool has_device, const char *device,
+ bool has_id, const char *id,
+ Error **errp)
{
BlockBackend *blk;
- blk = blk_by_name(device);
+ device = has_device ? device : NULL;
+ id = has_id ? id : NULL;
+
+ blk = qmp_get_blk(device, id, errp);
if (!blk) {
- error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
- "Device '%s' not found", device);
return;
}
if (!blk_dev_has_removable_media(blk)) {
- error_setg(errp, "Device '%s' is not removable", device);
+ error_setg(errp, "Device '%s' is not removable", device ?: id);
return;
}
@@ -2564,7 +2595,7 @@ void qmp_blockdev_change_medium(const char *device, const char *filename,
goto fail;
}
- rc = do_open_tray(device, false, &err);
+ rc = do_open_tray(device, NULL, false, &err);
if (rc && rc != -ENOSYS) {
error_propagate(errp, err);
goto fail;
@@ -2586,7 +2617,7 @@ void qmp_blockdev_change_medium(const char *device, const char *filename,
blk_apply_root_state(blk, medium_bs);
- qmp_blockdev_close_tray(device, errp);
+ qmp_blockdev_close_tray(true, device, false, NULL, errp);
fail:
/* If the medium has been inserted, the device has its own reference, so
diff --git a/qapi/block-core.json b/qapi/block-core.json
index eb0a7d5a..cd7b38a 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -2363,7 +2363,9 @@
# to it
# - if the guest device does not have an actual tray
#
-# @device: block device name
+# @device: #optional Block device name (deprecated, use @id instead)
+#
+# @id: #optional The name or QOM path of the guest device (since: 2.8)
#
# @force: #optional if false (the default), an eject request will be sent to
# the guest if it has locked the tray (and the tray will not be opened
@@ -2373,7 +2375,8 @@
# Since: 2.5
##
{ 'command': 'blockdev-open-tray',
- 'data': { 'device': 'str',
+ 'data': { '*device': 'str',
+ '*id': 'str',
'*force': 'bool' } }
##
@@ -2385,12 +2388,15 @@
#
# If the tray was already closed before, this will be a no-op.
#
-# @device: block device name
+# @device: #optional Block device name (deprecated, use @id instead)
+#
+# @id: #optional The name or QOM path of the guest device (since: 2.8)
#
# Since: 2.5
##
{ 'command': 'blockdev-close-tray',
- 'data': { 'device': 'str' } }
+ 'data': { '*device': 'str',
+ '*id': 'str' } }
##
# @x-blockdev-remove-medium:
diff --git a/qmp-commands.hx b/qmp-commands.hx
index e6c9193..1643891 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -4295,7 +4295,7 @@ EQMP
{
.name = "blockdev-open-tray",
- .args_type = "device:s,force:b?",
+ .args_type = "device:s?,id:s?,force:b?",
.mhandler.cmd_new = qmp_marshal_blockdev_open_tray,
},
@@ -4320,7 +4320,9 @@ which no such event will be generated, these include:
Arguments:
-- "device": block device name (json-string)
+- "device": block device name (deprecated, use @id instead)
+ (json-string, optional)
+- "id": the name or QOM path of the guest device (json-string, optional)
- "force": if false (the default), an eject request will be sent to the guest if
it has locked the tray (and the tray will not be opened immediately);
if true, the tray will be opened regardless of whether it is locked
@@ -4329,7 +4331,7 @@ Arguments:
Example:
-> { "execute": "blockdev-open-tray",
- "arguments": { "device": "ide1-cd0" } }
+ "arguments": { "id": "ide0-1-0" } }
<- { "timestamp": { "seconds": 1418751016,
"microseconds": 716996 },
@@ -4343,7 +4345,7 @@ EQMP
{
.name = "blockdev-close-tray",
- .args_type = "device:s",
+ .args_type = "device:s?,id:s?",
.mhandler.cmd_new = qmp_marshal_blockdev_close_tray,
},
@@ -4359,12 +4361,14 @@ If the tray was already closed before, this will be a no-op.
Arguments:
-- "device": block device name (json-string)
+- "device": block device name (deprecated, use @id instead)
+ (json-string, optional)
+- "id": the name or QOM path of the guest device (json-string, optional)
Example:
-> { "execute": "blockdev-close-tray",
- "arguments": { "device": "ide1-cd0" } }
+ "arguments": { "id": "ide0-1-0" } }
<- { "timestamp": { "seconds": 1418751345,
"microseconds": 272147 },
--
1.8.3.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH v2 04/10] block: Accept device model name for blockdev-open/close-tray
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 04/10] block: Accept device model name for blockdev-open/close-tray Kevin Wolf
@ 2016-09-19 19:28 ` Eric Blake
2016-09-20 11:05 ` Kevin Wolf
0 siblings, 1 reply; 19+ messages in thread
From: Eric Blake @ 2016-09-19 19:28 UTC (permalink / raw)
To: Kevin Wolf, qemu-block; +Cc: mreitz, jsnow, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]
On 09/19/2016 11:54 AM, Kevin Wolf wrote:
> 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 <kwolf@redhat.com>
> ---
> blockdev.c | 61 +++++++++++++++++++++++++++++++++++++++-------------
> qapi/block-core.json | 14 ++++++++----
> qmp-commands.hx | 16 ++++++++------
> 3 files changed, 66 insertions(+), 25 deletions(-)
>
> +++ b/qmp-commands.hx
> @@ -4295,7 +4295,7 @@ EQMP
>
> {
> .name = "blockdev-open-tray",
> - .args_type = "device:s,force:b?",
> + .args_type = "device:s?,id:s?,force:b?",
> .mhandler.cmd_new = qmp_marshal_blockdev_open_tray,
> },
Let the merge conflicts begin! Commit 33e1666b has landed.
> @@ -4329,7 +4331,7 @@ Arguments:
> Example:
>
> -> { "execute": "blockdev-open-tray",
> - "arguments": { "device": "ide1-cd0" } }
> + "arguments": { "id": "ide0-1-0" } }
The changes to the examples look good. Overall, I'm fine with:
Reviewed-by: Eric Blake <eblake@redhat.com>
but I'm afraid it may be easiest for you to respin v3 and do the rebase
work here and elsewhere in the series.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH v2 04/10] block: Accept device model name for blockdev-open/close-tray
2016-09-19 19:28 ` Eric Blake
@ 2016-09-20 11:05 ` Kevin Wolf
0 siblings, 0 replies; 19+ messages in thread
From: Kevin Wolf @ 2016-09-20 11:05 UTC (permalink / raw)
To: Eric Blake; +Cc: qemu-block, mreitz, jsnow, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1137 bytes --]
Am 19.09.2016 um 21:28 hat Eric Blake geschrieben:
> On 09/19/2016 11:54 AM, Kevin Wolf wrote:
> > 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 <kwolf@redhat.com>
> > ---
> > blockdev.c | 61 +++++++++++++++++++++++++++++++++++++++-------------
> > qapi/block-core.json | 14 ++++++++----
> > qmp-commands.hx | 16 ++++++++------
> > 3 files changed, 66 insertions(+), 25 deletions(-)
> >
>
> > +++ b/qmp-commands.hx
> > @@ -4295,7 +4295,7 @@ EQMP
> >
> > {
> > .name = "blockdev-open-tray",
> > - .args_type = "device:s,force:b?",
> > + .args_type = "device:s?,id:s?,force:b?",
> > .mhandler.cmd_new = qmp_marshal_blockdev_open_tray,
> > },
>
> Let the merge conflicts begin! Commit 33e1666b has landed.
Oh joy. I guess the rebase invalidates all of the R-bs, so I'll drop all
of them and resend a v3.
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH v2 05/10] block: Accept device model name for x-blockdev-insert-medium
2016-09-19 16:54 [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands Kevin Wolf
` (3 preceding siblings ...)
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 04/10] block: Accept device model name for blockdev-open/close-tray Kevin Wolf
@ 2016-09-19 16:54 ` Kevin Wolf
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 06/10] block: Accept device model name for x-blockdev-remove-medium Kevin Wolf
` (5 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Kevin Wolf @ 2016-09-19 16:54 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, eblake, mreitz, jsnow, qemu-devel
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.
As the command is experimental, we can still remove the 'device' option
that uses the BlockBackend name. This requires some test case changes
and is left for another series.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
blockdev.c | 33 +++++++++++++++++----------------
qapi/block-core.json | 7 +++++--
qmp-commands.hx | 8 +++++---
3 files changed, 27 insertions(+), 21 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 046f9c6..0eb173d 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2468,34 +2468,26 @@ out:
aio_context_release(aio_context);
}
-static void qmp_blockdev_insert_anon_medium(const char *device,
+static void qmp_blockdev_insert_anon_medium(BlockBackend *blk,
BlockDriverState *bs, Error **errp)
{
- BlockBackend *blk;
bool has_device;
- blk = blk_by_name(device);
- if (!blk) {
- error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
- "Device '%s' not found", device);
- return;
- }
-
/* For BBs without a device, we can exchange the BDS tree at will */
has_device = blk_get_attached_dev(blk);
if (has_device && !blk_dev_has_removable_media(blk)) {
- error_setg(errp, "Device '%s' is not removable", device);
+ error_setg(errp, "Device is not removable");
return;
}
if (has_device && blk_dev_has_tray(blk) && !blk_dev_is_tray_open(blk)) {
- error_setg(errp, "Tray of device '%s' is not open", device);
+ error_setg(errp, "Tray of the device is not open");
return;
}
if (blk_bs(blk)) {
- error_setg(errp, "There already is a medium in device '%s'", device);
+ error_setg(errp, "There already is a medium in the device");
return;
}
@@ -2511,11 +2503,20 @@ static void qmp_blockdev_insert_anon_medium(const char *device,
}
}
-void qmp_x_blockdev_insert_medium(const char *device, const char *node_name,
- Error **errp)
+void qmp_x_blockdev_insert_medium(bool has_device, const char *device,
+ bool has_id, const char *id,
+ const char *node_name, Error **errp)
{
+ BlockBackend *blk;
BlockDriverState *bs;
+ blk = qmp_get_blk(has_device ? device : NULL,
+ has_id ? id : NULL,
+ errp);
+ if (!blk) {
+ return;
+ }
+
bs = bdrv_find_node(node_name);
if (!bs) {
error_setg(errp, "Node '%s' not found", node_name);
@@ -2528,7 +2529,7 @@ void qmp_x_blockdev_insert_medium(const char *device, const char *node_name,
return;
}
- qmp_blockdev_insert_anon_medium(device, bs, errp);
+ qmp_blockdev_insert_anon_medium(blk, bs, errp);
}
void qmp_blockdev_change_medium(const char *device, const char *filename,
@@ -2609,7 +2610,7 @@ void qmp_blockdev_change_medium(const char *device, const char *filename,
goto fail;
}
- qmp_blockdev_insert_anon_medium(device, medium_bs, &err);
+ qmp_blockdev_insert_anon_medium(blk, medium_bs, &err);
if (err) {
error_propagate(errp, err);
goto fail;
diff --git a/qapi/block-core.json b/qapi/block-core.json
index cd7b38a..6ac6809 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -2427,14 +2427,17 @@
# This command is still a work in progress and is considered experimental.
# Stay away from it unless you want to help with its development.
#
-# @device: block device name
+# @device: #optional Block device name (deprecated, use @id instead)
+#
+# @id: #optional The name or QOM path of the guest device (since: 2.8)
#
# @node-name: name of a node in the block driver state graph
#
# Since: 2.5
##
{ 'command': 'x-blockdev-insert-medium',
- 'data': { 'device': 'str',
+ 'data': { '*device': 'str',
+ '*id': 'str',
'node-name': 'str'} }
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 1643891..bb00099 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -4430,7 +4430,7 @@ EQMP
{
.name = "x-blockdev-insert-medium",
- .args_type = "device:s,node-name:s",
+ .args_type = "device:s?,id:s?,node-name:s",
.mhandler.cmd_new = qmp_marshal_x_blockdev_insert_medium,
},
@@ -4447,7 +4447,9 @@ Stay away from it unless you want to help with its development.
Arguments:
-- "device": block device name (json-string)
+- "device": block device name (deprecated, use @id instead)
+ (json-string, optional)
+- "id": the name or QOM path of the guest device (json-string, optional)
- "node-name": root node of the BDS tree to insert into the block device
Example:
@@ -4461,7 +4463,7 @@ Example:
<- { "return": {} }
-> { "execute": "x-blockdev-insert-medium",
- "arguments": { "device": "ide1-cd0",
+ "arguments": { "id": "ide0-1-0",
"node-name": "node0" } }
<- { "return": {} }
--
1.8.3.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH v2 06/10] block: Accept device model name for x-blockdev-remove-medium
2016-09-19 16:54 [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands Kevin Wolf
` (4 preceding siblings ...)
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 05/10] block: Accept device model name for x-blockdev-insert-medium Kevin Wolf
@ 2016-09-19 16:54 ` Kevin Wolf
2016-09-19 19:32 ` Eric Blake
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 07/10] block: Accept device model name for eject Kevin Wolf
` (4 subsequent siblings)
10 siblings, 1 reply; 19+ messages in thread
From: Kevin Wolf @ 2016-09-19 16:54 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, eblake, mreitz, jsnow, qemu-devel
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.
As the command is experimental, we can still remove the 'device' option
that uses the BlockBackend name. This requires some test case changes
and is left for another series.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
blockdev.c | 28 ++++++++++++++++------------
qapi/block-core.json | 7 +++++--
qmp-commands.hx | 14 ++++++++------
3 files changed, 29 insertions(+), 20 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 0eb173d..a007b22 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2281,7 +2281,7 @@ void qmp_eject(const char *device, bool has_force, bool force, Error **errp)
}
error_free(local_err);
- qmp_x_blockdev_remove_medium(device, errp);
+ qmp_x_blockdev_remove_medium(true, device, false, NULL, errp);
}
void qmp_block_passwd(bool has_device, const char *device,
@@ -2415,30 +2415,34 @@ void qmp_blockdev_close_tray(bool has_device, const char *device,
blk_dev_change_media_cb(blk, true);
}
-void qmp_x_blockdev_remove_medium(const char *device, Error **errp)
+void qmp_x_blockdev_remove_medium(bool has_device, const char *device,
+ bool has_id, const char *id, Error **errp)
{
BlockBackend *blk;
BlockDriverState *bs;
AioContext *aio_context;
- bool has_device;
+ bool has_attached_device;
- blk = blk_by_name(device);
+ device = has_device ? device : NULL;
+ id = has_id ? id : NULL;
+
+ blk = qmp_get_blk(device, id, errp);
if (!blk) {
- error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
- "Device '%s' not found", device);
return;
}
/* For BBs without a device, we can exchange the BDS tree at will */
- has_device = blk_get_attached_dev(blk);
+ has_attached_device = blk_get_attached_dev(blk);
- if (has_device && !blk_dev_has_removable_media(blk)) {
- error_setg(errp, "Device '%s' is not removable", device);
+ if (has_attached_device && !blk_dev_has_removable_media(blk)) {
+ error_setg(errp, "Device '%s' is not removable", device ?: id);
return;
}
- if (has_device && blk_dev_has_tray(blk) && !blk_dev_is_tray_open(blk)) {
- error_setg(errp, "Tray of device '%s' is not open", device);
+ if (has_attached_device && blk_dev_has_tray(blk) &&
+ !blk_dev_is_tray_open(blk))
+ {
+ error_setg(errp, "Tray of device '%s' is not open", device ?: id);
return;
}
@@ -2604,7 +2608,7 @@ void qmp_blockdev_change_medium(const char *device, const char *filename,
error_free(err);
err = NULL;
- qmp_x_blockdev_remove_medium(device, &err);
+ qmp_x_blockdev_remove_medium(true, device, false, NULL, errp);
if (err) {
error_propagate(errp, err);
goto fail;
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 6ac6809..e370366 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -2410,12 +2410,15 @@
# This command is still a work in progress and is considered experimental.
# Stay away from it unless you want to help with its development.
#
-# @device: block device name
+# @device: #optional Block device name (deprecated, use @id instead)
+#
+# @id: #optional The name or QOM path of the guest device (since: 2.8)
#
# Since: 2.5
##
{ 'command': 'x-blockdev-remove-medium',
- 'data': { 'device': 'str' } }
+ 'data': { '*device': 'str',
+ '*id': 'str' } }
##
# @x-blockdev-insert-medium:
diff --git a/qmp-commands.hx b/qmp-commands.hx
index bb00099..4d6d896 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -4382,7 +4382,7 @@ EQMP
{
.name = "x-blockdev-remove-medium",
- .args_type = "device:s",
+ .args_type = "device:s?,id:s?",
.mhandler.cmd_new = qmp_marshal_x_blockdev_remove_medium,
},
@@ -4400,18 +4400,20 @@ Stay away from it unless you want to help with its development.
Arguments:
-- "device": block device name (json-string)
+- "device": block device name (deprecated, use @id instead)
+ (json-string, optional)
+- "id": the name or QOM path of the guest device (json-string, optional)
Example:
-> { "execute": "x-blockdev-remove-medium",
- "arguments": { "device": "ide1-cd0" } }
+ "arguments": { "id": "ide0-1-0" } }
<- { "error": { "class": "GenericError",
- "desc": "Tray of device 'ide1-cd0' is not open" } }
+ "desc": "Tray of device 'ide0-1-0' is not open" } }
-> { "execute": "blockdev-open-tray",
- "arguments": { "device": "ide1-cd0" } }
+ "arguments": { "id": "ide0-1-0" } }
<- { "timestamp": { "seconds": 1418751627,
"microseconds": 549958 },
@@ -4422,7 +4424,7 @@ Example:
<- { "return": {} }
-> { "execute": "x-blockdev-remove-medium",
- "arguments": { "device": "ide1-cd0" } }
+ "arguments": { "device": "ide0-1-0" } }
<- { "return": {} }
--
1.8.3.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH v2 06/10] block: Accept device model name for x-blockdev-remove-medium
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 06/10] block: Accept device model name for x-blockdev-remove-medium Kevin Wolf
@ 2016-09-19 19:32 ` Eric Blake
0 siblings, 0 replies; 19+ messages in thread
From: Eric Blake @ 2016-09-19 19:32 UTC (permalink / raw)
To: Kevin Wolf, qemu-block; +Cc: mreitz, jsnow, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 876 bytes --]
On 09/19/2016 11:54 AM, Kevin Wolf wrote:
> 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.
>
> As the command is experimental, we can still remove the 'device' option
> that uses the BlockBackend name. This requires some test case changes
> and is left for another series.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> blockdev.c | 28 ++++++++++++++++------------
> qapi/block-core.json | 7 +++++--
> qmp-commands.hx | 14 ++++++++------
> 3 files changed, 29 insertions(+), 20 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH v2 07/10] block: Accept device model name for eject
2016-09-19 16:54 [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands Kevin Wolf
` (5 preceding siblings ...)
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 06/10] block: Accept device model name for x-blockdev-remove-medium Kevin Wolf
@ 2016-09-19 16:54 ` Kevin Wolf
2016-09-19 19:33 ` Eric Blake
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 08/10] block: Accept device model name for blockdev-change-medium Kevin Wolf
` (3 subsequent siblings)
10 siblings, 1 reply; 19+ messages in thread
From: Kevin Wolf @ 2016-09-19 16:54 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, eblake, mreitz, jsnow, qemu-devel
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 eject to accept a qdev device name.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
blockdev.c | 10 +++++++---
hmp.c | 2 +-
qapi/block.json | 9 +++++++--
qmp-commands.hx | 10 ++++++----
4 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index a007b22..3d92724 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2265,7 +2265,9 @@ exit:
block_job_txn_unref(block_job_txn);
}
-void qmp_eject(const char *device, bool has_force, bool force, Error **errp)
+void qmp_eject(bool has_device, const char *device,
+ bool has_id, const char *id,
+ bool has_force, bool force, Error **errp)
{
Error *local_err = NULL;
int rc;
@@ -2274,14 +2276,16 @@ void qmp_eject(const char *device, bool has_force, bool force, Error **errp)
force = false;
}
- rc = do_open_tray(device, NULL, force, &local_err);
+ rc = do_open_tray(has_device ? device : NULL,
+ has_id ? id : NULL,
+ force, &local_err);
if (rc && rc != -ENOSYS) {
error_propagate(errp, local_err);
return;
}
error_free(local_err);
- qmp_x_blockdev_remove_medium(true, device, false, NULL, errp);
+ qmp_x_blockdev_remove_medium(has_device, device, has_id, id, errp);
}
void qmp_block_passwd(bool has_device, const char *device,
diff --git a/hmp.c b/hmp.c
index 0a16aef..09827b3 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1376,7 +1376,7 @@ void hmp_eject(Monitor *mon, const QDict *qdict)
const char *device = qdict_get_str(qdict, "device");
Error *err = NULL;
- qmp_eject(device, true, force, &err);
+ qmp_eject(true, device, false, NULL, true, force, &err);
hmp_handle_error(mon, &err);
}
diff --git a/qapi/block.json b/qapi/block.json
index 8b08bd2..c896bd1 100644
--- a/qapi/block.json
+++ b/qapi/block.json
@@ -125,7 +125,9 @@
#
# Ejects a device from a removable drive.
#
-# @device: The name of the device
+# @device: #optional Block device name (deprecated, use @id instead)
+#
+# @id: #optional The name or QOM path of the guest device (since: 2.8)
#
# @force: @optional If true, eject regardless of whether the drive is locked.
# If not specified, the default value is false.
@@ -137,7 +139,10 @@
#
# Since: 0.14.0
##
-{ 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
+{ 'command': 'eject',
+ 'data': { '*device': 'str',
+ '*id': 'str',
+ '*force': 'bool' } }
##
# @nbd-server-start:
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 4d6d896..93904f8 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -83,7 +83,7 @@ EQMP
{
.name = "eject",
- .args_type = "force:-f,device:B",
+ .args_type = "force:-f,device:B?,id:s?",
.mhandler.cmd_new = qmp_marshal_eject,
},
@@ -95,12 +95,14 @@ Eject a removable medium.
Arguments:
-- force: force ejection (json-bool, optional)
-- device: device name (json-string)
+- "force": force ejection (json-bool, optional)
+- "device": block device name (deprecated, use @id instead)
+ (json-string, optional)
+- "id": the name or QOM path of the guest device (json-string, optional)
Example:
--> { "execute": "eject", "arguments": { "device": "ide1-cd0" } }
+-> { "execute": "eject", "arguments": { "id": "ide0-1-0" } }
<- { "return": {} }
Note: The "force" argument defaults to false.
--
1.8.3.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH v2 07/10] block: Accept device model name for eject
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 07/10] block: Accept device model name for eject Kevin Wolf
@ 2016-09-19 19:33 ` Eric Blake
0 siblings, 0 replies; 19+ messages in thread
From: Eric Blake @ 2016-09-19 19:33 UTC (permalink / raw)
To: Kevin Wolf, qemu-block; +Cc: mreitz, jsnow, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 667 bytes --]
On 09/19/2016 11:54 AM, Kevin Wolf wrote:
> 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 eject to accept a qdev device name.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> blockdev.c | 10 +++++++---
> hmp.c | 2 +-
> qapi/block.json | 9 +++++++--
> qmp-commands.hx | 10 ++++++----
> 4 files changed, 21 insertions(+), 10 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH v2 08/10] block: Accept device model name for blockdev-change-medium
2016-09-19 16:54 [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands Kevin Wolf
` (6 preceding siblings ...)
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 07/10] block: Accept device model name for eject Kevin Wolf
@ 2016-09-19 16:54 ` Kevin Wolf
2016-09-19 19:34 ` Eric Blake
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 09/10] block: Accept device model name for block_set_io_throttle Kevin Wolf
` (2 subsequent siblings)
10 siblings, 1 reply; 19+ messages in thread
From: Kevin Wolf @ 2016-09-19 16:54 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, eblake, mreitz, jsnow, qemu-devel
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 <kwolf@redhat.com>
---
blockdev.c | 18 +++++++++++-------
hmp.c | 5 +++--
qapi/block-core.json | 8 ++++++--
qmp-commands.hx | 12 +++++++-----
qmp.c | 4 ++--
5 files changed, 29 insertions(+), 18 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 3d92724..8c8fcd6 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2540,7 +2540,9 @@ void qmp_x_blockdev_insert_medium(bool has_device, const char *device,
qmp_blockdev_insert_anon_medium(blk, bs, errp);
}
-void qmp_blockdev_change_medium(const char *device, const char *filename,
+void qmp_blockdev_change_medium(bool has_device, const char *device,
+ bool has_id, const char *id,
+ const char *filename,
bool has_format, const char *format,
bool has_read_only,
BlockdevChangeReadOnlyMode read_only,
@@ -2553,10 +2555,10 @@ void qmp_blockdev_change_medium(const char *device, const char *filename,
QDict *options = NULL;
Error *err = NULL;
- blk = blk_by_name(device);
+ blk = qmp_get_blk(has_device ? device : NULL,
+ has_id ? id : NULL,
+ errp);
if (!blk) {
- error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
- "Device '%s' not found", device);
goto fail;
}
@@ -2604,7 +2606,9 @@ void qmp_blockdev_change_medium(const char *device, const char *filename,
goto fail;
}
- rc = do_open_tray(device, NULL, false, &err);
+ rc = do_open_tray(has_device ? device : NULL,
+ has_id ? id : NULL,
+ false, &err);
if (rc && rc != -ENOSYS) {
error_propagate(errp, err);
goto fail;
@@ -2612,7 +2616,7 @@ void qmp_blockdev_change_medium(const char *device, const char *filename,
error_free(err);
err = NULL;
- qmp_x_blockdev_remove_medium(true, device, false, NULL, errp);
+ qmp_x_blockdev_remove_medium(has_device, device, has_id, id, errp);
if (err) {
error_propagate(errp, err);
goto fail;
@@ -2626,7 +2630,7 @@ void qmp_blockdev_change_medium(const char *device, const char *filename,
blk_apply_root_state(blk, medium_bs);
- qmp_blockdev_close_tray(true, device, false, NULL, errp);
+ qmp_blockdev_close_tray(has_device, device, has_id, id, errp);
fail:
/* If the medium has been inserted, the device has its own reference, so
diff --git a/hmp.c b/hmp.c
index 09827b3..336e7bf 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1422,8 +1422,9 @@ void hmp_change(Monitor *mon, const QDict *qdict)
}
}
- qmp_blockdev_change_medium(device, target, !!arg, arg,
- !!read_only, read_only_mode, &err);
+ qmp_blockdev_change_medium(true, device, false, NULL, target,
+ !!arg, arg, !!read_only, read_only_mode,
+ &err);
if (err &&
error_get_class(err) == ERROR_CLASS_DEVICE_ENCRYPTED) {
error_free(err);
diff --git a/qapi/block-core.json b/qapi/block-core.json
index e370366..1d7d4cc 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -2470,7 +2470,10 @@
# combines blockdev-open-tray, x-blockdev-remove-medium,
# x-blockdev-insert-medium and blockdev-close-tray).
#
-# @device: block device name
+# @device: #optional Block device name (deprecated, use @id instead)
+#
+# @id: #optional The name or QOM path of the guest device
+# (since: 2.8)
#
# @filename: filename of the new image to be loaded
#
@@ -2483,7 +2486,8 @@
# Since: 2.5
##
{ 'command': 'blockdev-change-medium',
- 'data': { 'device': 'str',
+ 'data': { '*device': 'str',
+ '*id': 'str',
'filename': 'str',
'*format': 'str',
'*read-only-mode': 'BlockdevChangeReadOnlyMode' } }
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 93904f8..cf1ffc5 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -4591,7 +4591,7 @@ EQMP
{
.name = "blockdev-change-medium",
- .args_type = "device:B,filename:F,format:s?,read-only-mode:s?",
+ .args_type = "device:B?,id:s?,filename:F,format:s?,read-only-mode:s?",
.mhandler.cmd_new = qmp_marshal_blockdev_change_medium,
},
@@ -4604,7 +4604,9 @@ and loading a new image file which is inserted as the new medium.
Arguments:
-- "device": device name (json-string)
+- "device": block device name (deprecated, use @id instead)
+ (json-string, optional)
+- "id": the name or QOM path of the guest device (json-string, optional)
- "filename": filename of the new image (json-string)
- "format": format of the new image (json-string, optional)
- "read-only-mode": new read-only mode (json-string, optional)
@@ -4615,7 +4617,7 @@ Examples:
1. Change a removable medium
-> { "execute": "blockdev-change-medium",
- "arguments": { "device": "ide1-cd0",
+ "arguments": { "id": "ide0-1-0",
"filename": "/srv/images/Fedora-12-x86_64-DVD.iso",
"format": "raw" } }
<- { "return": {} }
@@ -4623,7 +4625,7 @@ Examples:
2. Load a read-only medium into a writable drive
-> { "execute": "blockdev-change-medium",
- "arguments": { "device": "isa-fd0",
+ "arguments": { "id": "floppyA",
"filename": "/srv/images/ro.img",
"format": "raw",
"read-only-mode": "retain" } }
@@ -4633,7 +4635,7 @@ Examples:
"desc": "Could not open '/srv/images/ro.img': Permission denied" } }
-> { "execute": "blockdev-change-medium",
- "arguments": { "device": "isa-fd0",
+ "arguments": { "id": "floppyA",
"filename": "/srv/images/ro.img",
"format": "raw",
"read-only-mode": "read-only" } }
diff --git a/qmp.c b/qmp.c
index dea8f81..910f7f0 100644
--- a/qmp.c
+++ b/qmp.c
@@ -446,8 +446,8 @@ void qmp_change(const char *device, const char *target,
if (strcmp(device, "vnc") == 0) {
qmp_change_vnc(target, has_arg, arg, errp);
} else {
- qmp_blockdev_change_medium(device, target, has_arg, arg, false, 0,
- errp);
+ qmp_blockdev_change_medium(true, device, false, NULL, target,
+ has_arg, arg, false, 0, errp);
}
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH v2 08/10] block: Accept device model name for blockdev-change-medium
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 08/10] block: Accept device model name for blockdev-change-medium Kevin Wolf
@ 2016-09-19 19:34 ` Eric Blake
0 siblings, 0 replies; 19+ messages in thread
From: Eric Blake @ 2016-09-19 19:34 UTC (permalink / raw)
To: Kevin Wolf, qemu-block; +Cc: mreitz, jsnow, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 751 bytes --]
On 09/19/2016 11:54 AM, Kevin Wolf wrote:
> 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 <kwolf@redhat.com>
> ---
> blockdev.c | 18 +++++++++++-------
> hmp.c | 5 +++--
> qapi/block-core.json | 8 ++++++--
> qmp-commands.hx | 12 +++++++-----
> qmp.c | 4 ++--
> 5 files changed, 29 insertions(+), 18 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH v2 09/10] block: Accept device model name for block_set_io_throttle
2016-09-19 16:54 [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands Kevin Wolf
` (7 preceding siblings ...)
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 08/10] block: Accept device model name for blockdev-change-medium Kevin Wolf
@ 2016-09-19 16:54 ` Kevin Wolf
2016-09-19 19:35 ` Eric Blake
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 10/10] qemu-iotests/118: Test media change with qdev name Kevin Wolf
2016-09-19 19:15 ` [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands no-reply
10 siblings, 1 reply; 19+ messages in thread
From: Kevin Wolf @ 2016-09-19 16:54 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, eblake, mreitz, jsnow, qemu-devel
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 <kwolf@redhat.com>
---
blockdev.c | 12 +++++++-----
qapi/block-core.json | 8 +++++---
qmp-commands.hx | 8 +++++---
3 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 8c8fcd6..405145a 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2647,10 +2647,10 @@ void qmp_block_set_io_throttle(BlockIOThrottle *arg, Error **errp)
BlockBackend *blk;
AioContext *aio_context;
- blk = blk_by_name(arg->device);
+ blk = qmp_get_blk(arg->has_device ? arg->device : NULL,
+ arg->has_id ? arg->id : NULL,
+ errp);
if (!blk) {
- error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
- "Device '%s' not found", arg->device);
return;
}
@@ -2659,7 +2659,7 @@ void qmp_block_set_io_throttle(BlockIOThrottle *arg, Error **errp)
bs = blk_bs(blk);
if (!bs) {
- error_setg(errp, "Device '%s' has no medium", arg->device);
+ error_setg(errp, "Device has no medium");
goto out;
}
@@ -2723,7 +2723,9 @@ void qmp_block_set_io_throttle(BlockIOThrottle *arg, Error **errp)
* just update the throttling group. */
if (!blk_get_public(blk)->throttle_state) {
blk_io_limits_enable(blk,
- arg->has_group ? arg->group : arg->device);
+ arg->has_group ? arg->group :
+ arg->has_device ? arg->device :
+ arg->id);
} else if (arg->has_group) {
blk_io_limits_update_group(blk, arg->group);
}
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 1d7d4cc..5f04dab 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1377,7 +1377,9 @@
#
# A set of parameters describing block throttling.
#
-# @device: The name of the device
+# @device: #optional Block device name (deprecated, use @id instead)
+#
+# @id: #optional The name or QOM path of the guest device (since: 2.8)
#
# @bps: total throughput limit in bytes per second
#
@@ -1446,8 +1448,8 @@
# Since: 1.1
##
{ 'struct': 'BlockIOThrottle',
- 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
- 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
+ 'data': { '*device': 'str', '*id': 'str', 'bps': 'int', 'bps_rd': 'int',
+ 'bps_wr': 'int', 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
'*bps_max': 'int', '*bps_rd_max': 'int',
'*bps_wr_max': 'int', '*iops_max': 'int',
'*iops_rd_max': 'int', '*iops_wr_max': 'int',
diff --git a/qmp-commands.hx b/qmp-commands.hx
index cf1ffc5..9b8696c 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -2084,7 +2084,7 @@ EQMP
{
.name = "block_set_io_throttle",
- .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,bps_max_length:l?,bps_rd_max_length:l?,bps_wr_max_length:l?,iops_max_length:l?,iops_rd_max_length:l?,iops_wr_max_length:l?,iops_size:l?,group:s?",
+ .args_type = "device:B?,id:s?,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,bps_max_length:l?,bps_rd_max_length:l?,bps_wr_max_length:l?,iops_max_length:l?,iops_rd_max_length:l?,iops_wr_max_length:l?,iops_size:l?,group:s?",
.mhandler.cmd_new = qmp_marshal_block_set_io_throttle,
},
@@ -2096,7 +2096,9 @@ Change I/O throttle limits for a block drive.
Arguments:
-- "device": device name (json-string)
+- "device": block device name (deprecated, use @id instead)
+ (json-string, optional)
+- "id": the name or QOM path of the guest device (json-string, optional)
- "bps": total throughput limit in bytes per second (json-int)
- "bps_rd": read throughput limit in bytes per second (json-int)
- "bps_wr": write throughput limit in bytes per second (json-int)
@@ -2120,7 +2122,7 @@ Arguments:
Example:
--> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
+-> { "execute": "block_set_io_throttle", "arguments": { "id": "ide0-1-0",
"bps": 1000000,
"bps_rd": 0,
"bps_wr": 0,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH v2 09/10] block: Accept device model name for block_set_io_throttle
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 09/10] block: Accept device model name for block_set_io_throttle Kevin Wolf
@ 2016-09-19 19:35 ` Eric Blake
0 siblings, 0 replies; 19+ messages in thread
From: Eric Blake @ 2016-09-19 19:35 UTC (permalink / raw)
To: Kevin Wolf, qemu-block; +Cc: mreitz, jsnow, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 669 bytes --]
On 09/19/2016 11:54 AM, Kevin Wolf wrote:
> 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 <kwolf@redhat.com>
> ---
> blockdev.c | 12 +++++++-----
> qapi/block-core.json | 8 +++++---
> qmp-commands.hx | 8 +++++---
> 3 files changed, 17 insertions(+), 11 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH v2 10/10] qemu-iotests/118: Test media change with qdev name
2016-09-19 16:54 [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands Kevin Wolf
` (8 preceding siblings ...)
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 09/10] block: Accept device model name for block_set_io_throttle Kevin Wolf
@ 2016-09-19 16:54 ` Kevin Wolf
2016-09-19 19:38 ` Eric Blake
2016-09-19 19:15 ` [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands no-reply
10 siblings, 1 reply; 19+ messages in thread
From: Kevin Wolf @ 2016-09-19 16:54 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, eblake, mreitz, jsnow, qemu-devel
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 and not everywhere, so that the old way is still tested, too.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/118 | 85 ++++++++++++++++++++++++++++++++++---------
tests/qemu-iotests/iotests.py | 5 +++
2 files changed, 73 insertions(+), 17 deletions(-)
diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118
index 9e5951f..0380069 100755
--- a/tests/qemu-iotests/118
+++ b/tests/qemu-iotests/118
@@ -62,6 +62,9 @@ class ChangeBaseClass(iotests.QMPTestCase):
self.fail('Timeout while waiting for the tray to close')
class GeneralChangeTestsBaseClass(ChangeBaseClass):
+
+ device_name = None
+
def test_change(self):
result = self.vm.qmp('change', device='drive0', target=new_img,
arg=iotests.imgfmt)
@@ -76,9 +79,15 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
def test_blockdev_change_medium(self):
- result = self.vm.qmp('blockdev-change-medium', device='drive0',
- filename=new_img,
- format=iotests.imgfmt)
+ if self.device_name is not None:
+ result = self.vm.qmp('blockdev-change-medium',
+ id=self.device_name, filename=new_img,
+ format=iotests.imgfmt)
+ else:
+ result = self.vm.qmp('blockdev-change-medium',
+ device='drive0', filename=new_img,
+ format=iotests.imgfmt)
+
self.assert_qmp(result, 'return', {})
self.wait_for_open()
@@ -90,7 +99,10 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
def test_eject(self):
- result = self.vm.qmp('eject', device='drive0', force=True)
+ if self.device_name is not None:
+ result = self.vm.qmp('eject', id=self.device_name, force=True)
+ else:
+ result = self.vm.qmp('eject', device='drive0', force=True)
self.assert_qmp(result, 'return', {})
self.wait_for_open()
@@ -101,7 +113,10 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
self.assert_qmp_absent(result, 'return[0]/inserted')
def test_tray_eject_change(self):
- result = self.vm.qmp('eject', device='drive0', force=True)
+ if self.device_name is not None:
+ result = self.vm.qmp('eject', id=self.device_name, force=True)
+ else:
+ result = self.vm.qmp('eject', device='drive0', force=True)
self.assert_qmp(result, 'return', {})
self.wait_for_open()
@@ -111,9 +126,12 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
self.assert_qmp(result, 'return[0]/tray_open', True)
self.assert_qmp_absent(result, 'return[0]/inserted')
- result = self.vm.qmp('blockdev-change-medium', device='drive0',
- filename=new_img,
- format=iotests.imgfmt)
+ if self.device_name is not None:
+ result = self.vm.qmp('blockdev-change-medium', id=self.device_name,
+ filename=new_img, format=iotests.imgfmt)
+ else:
+ result = self.vm.qmp('blockdev-change-medium', device='drive0',
+ filename=new_img, format=iotests.imgfmt)
self.assert_qmp(result, 'return', {})
self.wait_for_close()
@@ -124,7 +142,12 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
def test_tray_open_close(self):
- result = self.vm.qmp('blockdev-open-tray', device='drive0', force=True)
+ if self.device_name is not None:
+ result = self.vm.qmp('blockdev-open-tray',
+ id=self.device_name, force=True)
+ else:
+ result = self.vm.qmp('blockdev-open-tray',
+ device='drive0', force=True)
self.assert_qmp(result, 'return', {})
self.wait_for_open()
@@ -137,7 +160,10 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
else:
self.assert_qmp(result, 'return[0]/inserted/image/filename', old_img)
- result = self.vm.qmp('blockdev-close-tray', device='drive0')
+ if self.device_name is not None:
+ result = self.vm.qmp('blockdev-close-tray', id=self.device_name)
+ else:
+ result = self.vm.qmp('blockdev-close-tray', device='drive0')
self.assert_qmp(result, 'return', {})
if self.has_real_tray or not self.was_empty:
@@ -162,7 +188,10 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
self.assert_qmp(result, 'return[0]/tray_open', True)
self.assert_qmp_absent(result, 'return[0]/inserted')
- result = self.vm.qmp('blockdev-close-tray', device='drive0')
+ if self.device_name is not None:
+ result = self.vm.qmp('blockdev-close-tray', id=self.device_name)
+ else:
+ result = self.vm.qmp('blockdev-close-tray', device='drive0')
self.assert_qmp(result, 'return', {})
self.wait_for_close()
@@ -206,7 +235,12 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
'driver': 'file'}})
self.assert_qmp(result, 'return', {})
- result = self.vm.qmp('blockdev-open-tray', device='drive0', force=True)
+ if self.device_name is not None:
+ result = self.vm.qmp('blockdev-open-tray',
+ id=self.device_name, force=True)
+ else:
+ result = self.vm.qmp('blockdev-open-tray',
+ device='drive0', force=True)
self.assert_qmp(result, 'return', {})
self.wait_for_open()
@@ -219,7 +253,11 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
else:
self.assert_qmp(result, 'return[0]/inserted/image/filename', old_img)
- result = self.vm.qmp('x-blockdev-remove-medium', device='drive0')
+ if self.device_name is not None:
+ result = self.vm.qmp('x-blockdev-remove-medium',
+ id=self.device_name)
+ else:
+ result = self.vm.qmp('x-blockdev-remove-medium', device='drive0')
self.assert_qmp(result, 'return', {})
result = self.vm.qmp('query-block')
@@ -227,8 +265,12 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
self.assert_qmp(result, 'return[0]/tray_open', True)
self.assert_qmp_absent(result, 'return[0]/inserted')
- result = self.vm.qmp('x-blockdev-insert-medium', device='drive0',
- node_name='new')
+ if self.device_name is not None:
+ result = self.vm.qmp('x-blockdev-insert-medium',
+ id=self.device_name, node_name='new')
+ else:
+ result = self.vm.qmp('x-blockdev-insert-medium',
+ device='drive0', node_name='new')
self.assert_qmp(result, 'return', {})
result = self.vm.qmp('query-block')
@@ -236,7 +278,10 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
self.assert_qmp(result, 'return[0]/tray_open', True)
self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
- result = self.vm.qmp('blockdev-close-tray', device='drive0')
+ if self.device_name is not None:
+ result = self.vm.qmp('blockdev-close-tray', id=self.device_name)
+ else:
+ result = self.vm.qmp('blockdev-close-tray', device='drive0')
self.assert_qmp(result, 'return', {})
self.wait_for_close()
@@ -280,7 +325,13 @@ class TestInitiallyFilled(GeneralChangeTestsBaseClass):
def setUp(self, media, interface):
qemu_img('create', '-f', iotests.imgfmt, old_img, '1440k')
qemu_img('create', '-f', iotests.imgfmt, new_img, '1440k')
- self.vm = iotests.VM().add_drive(old_img, 'media=%s' % media, interface)
+ self.vm = iotests.VM()
+ if interface == 'ide':
+ self.device_name = 'qdev0'
+ self.vm.add_drive(old_img, 'media=%s' % media, 'none')
+ self.vm.add_device('ide-cd,drive=drive0,id=%s' % self.device_name)
+ else:
+ self.vm.add_drive(old_img, 'media=%s' % media, interface)
self.vm.launch()
def tearDown(self):
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index f1f36d7..3329bc1 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -139,6 +139,11 @@ class VM(qtest.QEMUQtestMachine):
self._debug = True
self._num_drives = 0
+ def add_device(self, opts):
+ self._args.append('-device')
+ self._args.append(opts)
+ return self
+
def add_drive_raw(self, opts):
self._args.append('-drive')
self._args.append(opts)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH v2 10/10] qemu-iotests/118: Test media change with qdev name
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 10/10] qemu-iotests/118: Test media change with qdev name Kevin Wolf
@ 2016-09-19 19:38 ` Eric Blake
0 siblings, 0 replies; 19+ messages in thread
From: Eric Blake @ 2016-09-19 19:38 UTC (permalink / raw)
To: Kevin Wolf, qemu-block; +Cc: mreitz, jsnow, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]
On 09/19/2016 11:54 AM, Kevin Wolf wrote:
> 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 and not everywhere, so that the old way is still tested, too.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> tests/qemu-iotests/118 | 85 ++++++++++++++++++++++++++++++++++---------
> tests/qemu-iotests/iotests.py | 5 +++
> 2 files changed, 73 insertions(+), 17 deletions(-)
>
> @@ -90,7 +99,10 @@ class GeneralChangeTestsBaseClass(ChangeBaseClass):
> self.assert_qmp(result, 'return[0]/inserted/image/filename', new_img)
>
> def test_eject(self):
> - result = self.vm.qmp('eject', device='drive0', force=True)
> + if self.device_name is not None:
I guess writing it like this instead of "if not self.device_name:"
allows us to write a test where self.device_name is "", if we wanted to
make sure that error message is sane. Probably not worth changing
anything based on that observation, so keep the patch as-is, and add:
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands
2016-09-19 16:54 [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands Kevin Wolf
` (9 preceding siblings ...)
2016-09-19 16:54 ` [Qemu-devel] [PATCH v2 10/10] qemu-iotests/118: Test media change with qdev name Kevin Wolf
@ 2016-09-19 19:15 ` no-reply
10 siblings, 0 replies; 19+ messages in thread
From: no-reply @ 2016-09-19 19:15 UTC (permalink / raw)
To: kwolf; +Cc: famz, qemu-block, jsnow, qemu-devel, mreitz
Hi,
Your series failed automatic build test. Please find the testing commands and
their output below. If you have docker installed, you can probably reproduce it
locally.
Subject: [Qemu-devel] [PATCH v2 00/10] block: Accept qdev IDs in device level QMP commands
Message-id: 1474304097-5790-1-git-send-email-kwolf@redhat.com
Type: series
=== TEST SCRIPT BEGIN ===
#!/bin/bash
set -e
git submodule update --init dtc
make J=8 docker-test-quick@centos6
make J=8 docker-test-mingw@fedora
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/1474304097-5790-1-git-send-email-kwolf@redhat.com -> patchew/1474304097-5790-1-git-send-email-kwolf@redhat.com
* [new tag] patchew/1474306544-24708-1-git-send-email-berrange@redhat.com -> patchew/1474306544-24708-1-git-send-email-berrange@redhat.com
Switched to a new branch 'test'
d1089ee qemu-iotests/118: Test media change with qdev name
5d9b8a9 block: Accept device model name for block_set_io_throttle
67e0070 block: Accept device model name for blockdev-change-medium
8f4431c block: Accept device model name for eject
e47c17c block: Accept device model name for x-blockdev-remove-medium
f0c7593 block: Accept device model name for x-blockdev-insert-medium
8c7f2d8 block: Accept device model name for blockdev-open/close-tray
d690c73 qdev-monitor: Add blk_by_qdev_id()
2b53d88 qdev-monitor: Factor out find_device_state()
a531e02 block: Add blk_by_dev()
=== OUTPUT BEGIN ===
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into 'dtc'...
Submodule path 'dtc': checked out '65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf'
BUILD centos6
ARCHIVE qemu.tgz
ARCHIVE dtc.tgz
COPY RUNNER
RUN test-quick in centos6
=== OUTPUT END ===
Abort: command timeout (>3600 seconds)
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
^ permalink raw reply [flat|nested] 19+ messages in thread