[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 07/34] block: Move flag inheritance
From: |
Wen Congyang |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 07/34] block: Move flag inheritance to bdrv_open_inherited() |
Date: |
Thu, 28 May 2015 19:10:47 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 05/09/2015 01:21 AM, Kevin Wolf wrote:
> Instead of letting every caller of bdrv_open() determine the right flags
> for its child node manually and pass them to the function, pass the
> parent node and the role of the newly opened child (like backing file,
> protocol layer, etc.).
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block.c | 74
> ++++++++++++++++++++++++++++++++++++++---------
> block/blkdebug.c | 2 +-
> block/blkverify.c | 4 +--
> block/quorum.c | 4 +--
> block/vmdk.c | 5 ++--
> include/block/block.h | 4 ++-
> include/block/block_int.h | 7 +++++
> 7 files changed, 78 insertions(+), 22 deletions(-)
>
> diff --git a/block.c b/block.c
> index cea022f..c4f0fb4 100644
> --- a/block.c
> +++ b/block.c
> @@ -79,6 +79,12 @@ static QTAILQ_HEAD(, BlockDriverState) graph_bdrv_states =
> static QLIST_HEAD(, BlockDriver) bdrv_drivers =
> QLIST_HEAD_INITIALIZER(bdrv_drivers);
>
> +static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
> + const char *reference, QDict *options, int
> flags,
> + BlockDriverState* parent,
> + const BdrvChildRole *child_role,
> + BlockDriver *drv, Error **errp);
The function name in patch title is wrong.
Thanks
Wen Congyang
- Re: [Qemu-block] [PATCH 05/34] block: Use macro for cache option names, (continued)
- [Qemu-block] [PATCH 06/34] block: Use QemuOpts in bdrv_open_common(), Kevin Wolf, 2015/05/08
- [Qemu-block] [PATCH 07/34] block: Move flag inheritance to bdrv_open_inherited(), Kevin Wolf, 2015/05/08
- [Qemu-block] [PATCH 09/34] block: Add BlockDriverState.inherits_from, Kevin Wolf, 2015/05/08
- [Qemu-block] [PATCH 10/34] block: Fix reopen flag inheritance, Kevin Wolf, 2015/05/08
- [Qemu-block] [PATCH 08/34] block: Add list of children to BlockDriverState, Kevin Wolf, 2015/05/08