qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/9] block: User BdrvChild callback for device n


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 2/9] block: User BdrvChild callback for device name
Date: Tue, 29 Mar 2016 19:43:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0

On 22.03.2016 20:36, Kevin Wolf wrote:
> In order to get rid of bs->blk for bdrv_get_device_name() and
> bdrv_get_device_or_node_name(), ask all parents for their name and
> simply pick the first one.
> 
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
>  block.c                   | 22 ++++++++++++++++++++--
>  block/block-backend.c     |  6 ++++++
>  include/block/block_int.h |  1 +
>  3 files changed, 27 insertions(+), 2 deletions(-)

[...]

> diff --git a/include/block/block_int.h b/include/block/block_int.h
> index f60cb7c..195abe8 100644
> --- a/include/block/block_int.h
> +++ b/include/block/block_int.h
> @@ -358,6 +358,7 @@ struct BdrvChildRole {
>  
>      void (*change_media)(BdrvChild *child, bool load);
>      void (*resize)(BdrvChild *child);
> +    const char* (*get_name)(BdrvChild *child);
>  
>      bool (*drain_queue)(BdrvChild *child);
>  };

I wouldn't mind an explanation there what this is supposed to be used
for. From the name alone I'd expect a parent BDS to return its node name.

Reviewed-by: Max Reitz <address@hidden>

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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