09.08.2019 19:13, Max Reitz wrote:
> 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 <[email protected]>
> ---
> block/qapi.c | 39 +++++++++++++++++++++++---------------
> tests/qemu-iotests/184.out | 7 ++++++-
> 2 files changed, 30 insertions(+), 16 deletions(-)
>
> diff --git a/block/qapi.c b/block/qapi.c
> index 9a185cba48..4f59ac1c0f 100644
> --- a/block/qapi.c
> +++ b/block/qapi.c
[..]
> @@ -354,9 +357,9 @@ static void bdrv_query_info(BlockBackend *blk, BlockInfo
> **p_info,
> BlockDriverState *bs = blk_bs(blk);
> char *qdev;
>
> - /* Skip automatically inserted nodes that the user isn't aware of */
> - while (bs && bs->drv && bs->implicit) {
> - bs = backing_bs(bs);
> + if (bs) {
> + /* Skip automatically inserted nodes that the user isn't aware of */
> + bs = bdrv_skip_implicit_filters(bs);
> }
bdrv_skip_implicit_filters supports NULL, so it may be written without "if"
Anyway:
Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
[..]
--
Best regards,
Vladimir