mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
block/qapi: Introduce BlockGraphInfo
Introduce a new QAPI type BlockGraphInfo and an associated bdrv_query_block_graph_info() function that recursively gathers BlockNodeInfo objects through a block graph. A follow-up patch is going to make "qemu-img info" use this to print information about all nodes that are (usually implicitly) opened for a given image file. Signed-off-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220620162704.80987-8-hreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
@@ -307,6 +307,41 @@
|
||||
'*backing-image': 'ImageInfo'
|
||||
} }
|
||||
|
||||
##
|
||||
# @BlockChildInfo:
|
||||
#
|
||||
# Information about all nodes in the block graph starting at some node,
|
||||
# annotated with information about that node in relation to its parent.
|
||||
#
|
||||
# @name: Child name of the root node in the BlockGraphInfo struct, in its role
|
||||
# as the child of some undescribed parent node
|
||||
#
|
||||
# @info: Block graph information starting at this node
|
||||
#
|
||||
# Since: 8.0
|
||||
##
|
||||
{ 'struct': 'BlockChildInfo',
|
||||
'data': {
|
||||
'name': 'str',
|
||||
'info': 'BlockGraphInfo'
|
||||
} }
|
||||
|
||||
##
|
||||
# @BlockGraphInfo:
|
||||
#
|
||||
# Information about all nodes in a block (sub)graph in the form of BlockNodeInfo
|
||||
# data.
|
||||
# The base BlockNodeInfo struct contains the information for the (sub)graph's
|
||||
# root node.
|
||||
#
|
||||
# @children: Array of links to this node's child nodes' information
|
||||
#
|
||||
# Since: 8.0
|
||||
##
|
||||
{ 'struct': 'BlockGraphInfo',
|
||||
'base': 'BlockNodeInfo',
|
||||
'data': { 'children': ['BlockChildInfo'] } }
|
||||
|
||||
##
|
||||
# @ImageCheck:
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user