[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>
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/9] block: Remove BlockDriverState.blk, Kevin Wolf, 2016/03/22
- [Qemu-devel] [PATCH 2/9] block: User BdrvChild callback for device name, Kevin Wolf, 2016/03/22
- Re: [Qemu-devel] [PATCH 2/9] block: User BdrvChild callback for device name,
Max Reitz <=
- [Qemu-devel] [PATCH 1/9] block: Use BdrvChild callbacks for change_media/resize, Kevin Wolf, 2016/03/22
- [Qemu-devel] [PATCH 5/9] block: Avoid BDS.blk in bdrv_next(), Kevin Wolf, 2016/03/22
- [Qemu-devel] [PATCH 6/9] block: Remove bdrv_move_feature_fields(), Kevin Wolf, 2016/03/22
- [Qemu-devel] [PATCH 3/9] block jobs: Use BdrvChild callbacks for iostatus operations, Kevin Wolf, 2016/03/22
- [Qemu-devel] [PATCH 8/9] block: Don't return throttling info in query-named-block-nodes, Kevin Wolf, 2016/03/22