On 07/12/2017 07:57 AM, Kevin Wolf wrote: > With -blockdev/-device, users can indirectly create anonymous > BlockBackends, in the state of which they are still interested. As a Reads awkwardly. Maybe: BlockBackends, although it is still of interest to learn the state of such backends. > preparation for making such BBs visible in query-block, make sure that > they can be identified even without a name by adding the ID/QOM path of > their qdev device to BlockInfo. > > Signed-off-by: Kevin Wolf > --- > +++ b/qapi/block-core.json > @@ -433,6 +433,9 @@ > # > # @device: The device name associated with the virtual device. > # > +# @qdev: The qdev ID, or if no ID is assigned the QOM path, of the block s/assigned the QOM path, of/assigned, the QOM path of/ > +# device. Missing a (since 2.10) tag. > +# > # @type: This field is returned only for compatibility reasons, it should > # not be used (always returns 'unknown') > # > @@ -458,7 +461,7 @@ > # Since: 0.14.0 > ## > { 'struct': 'BlockInfo', > - 'data': {'device': 'str', 'type': 'str', 'removable': 'bool', > + 'data': {'device': 'str', '*qdev': 'str', 'type': 'str', 'removable': 'bool', > 'locked': 'bool', '*inserted': 'BlockDeviceInfo', > '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus', > '*dirty-bitmaps': ['BlockDirtyInfo'] } } Besides the testsuite, are there any example outputs that need to be adjusted? > diff --git a/tests/qemu-iotests/067.out b/tests/qemu-iotests/067.out > index 782eae2..e3c4496 100644 > --- a/tests/qemu-iotests/067.out > +++ b/tests/qemu-iotests/067.out > @@ -57,6 +57,7 @@ Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,if=none,id=disk -device virti > "file": "TEST_DIR/t.qcow2", > "encryption_key_missing": false > }, > + "qdev": "/machine/peripheral/virtio0/virtio-backend", > "type": "unknown" > } > ] > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org