block: Use child access functions for QAPI queries

query-block, query-named-block-nodes, and query-blockstats now return
any filtered child under "backing", not just bs->backing or COW
children.  This is so that filters do not interrupt the reported backing
chain.  This changes the output for iotest 184, as the throttled node
now appears as a backing child.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Max Reitz 2019-06-12 18:23:25 +02:00 committed by Kevin Wolf
parent 3f26191c73
commit 0a7585dbba
2 changed files with 27 additions and 14 deletions

View file

@ -27,6 +27,12 @@ Testing:
"iops_rd": 0,
"detect_zeroes": "off",
"image": {
"backing-image": {
"virtual-size": 1073741824,
"filename": "null-co://",
"format": "null-co",
"actual-size": 0
},
"virtual-size": 1073741824,
"filename": "json:{\"throttle-group\": \"group0\", \"driver\": \"throttle\", \"file\": {\"driver\": \"null-co\"}}",
"format": "throttle",
@ -35,7 +41,7 @@ Testing:
"iops_wr": 0,
"ro": false,
"node-name": "throttle0",
"backing_file_depth": 0,
"backing_file_depth": 1,
"drv": "throttle",
"iops": 0,
"bps_wr": 0,