qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 07/54] block: Use BlockBackend for image probing


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 07/54] block: Use BlockBackend for image probing
Date: Wed, 22 Feb 2017 13:56:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 21.02.2017 15:58, Kevin Wolf wrote:
> This fixes the use of a parent-less BdrvChild in bdrv_open_inherit() by
> converting it into a BlockBackend. Which is exactly what it should be,
> image probing is an external, standalone user of a node. The requests
> can't be considered to originate from the format driver node because
> that one isn't even opened yet.
> 
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
>  block.c | 34 +++++++++++++++++++---------------
>  1 file changed, 19 insertions(+), 15 deletions(-)
> 
> diff --git a/block.c b/block.c
> index e9d90aa..0f17576 100644
> --- a/block.c
> +++ b/block.c

[...]

> @@ -1922,7 +1926,7 @@ static BlockDriverState *bdrv_open_inherit(const char 
> *filename,
>  
>  fail:
>      if (file != NULL) {
> -        bdrv_unref_child(bs, file);
> +        blk_unref(file);
>      }

You could drop the now superfluous condition around it, but anyway:

Reviewed-by: Max Reitz <address@hidden>

(Also, you could revert the change to bdrv_unref_child() done in patch 5.)

Max

>      if (bs->file != NULL) {
>          bdrv_unref_child(bs, bs->file);
> 


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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