qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v6 24/42] block: Use child access functions for


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-block] [PATCH v6 24/42] block: Use child access functions for QAPI queries
Date: Sat, 10 Aug 2019 16:57:06 +0000

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 <address@hidden>
> ---
>   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 <address@hidden>

[..]

-- 
Best regards,
Vladimir

reply via email to

[Prev in Thread] Current Thread [Next in Thread]