qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v3 12/33] block: Unify bdrv_child_cb_detach()


From: Kevin Wolf
Subject: Re: [PATCH v3 12/33] block: Unify bdrv_child_cb_detach()
Date: Wed, 6 May 2020 14:41:38 +0200

Am 18.02.2020 um 13:42 hat Max Reitz geschrieben:
> Make bdrv_child_cb_detach() call bdrv_backing_detach() for children with
> a COW role (and drop the reverse call from bdrv_backing_detach()), so it
> can be used for any child (with a proper role set).
> 
> Because so far no child has a proper role set, we need a temporary new
> callback for child_backing.detach that ensures bdrv_backing_detach() is
> called for all COW children that do not have their role set yet.
> 
> Signed-off-by: Max Reitz <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---
>  block.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/block.c b/block.c
> index 3cf1293a7b..0f24546863 100644
> --- a/block.c
> +++ b/block.c
> @@ -943,6 +943,7 @@ static void bdrv_child_cb_drained_end(BdrvChild *child,
>  }
>  
>  static void bdrv_backing_attach(BdrvChild *c);
> +static void bdrv_backing_detach(BdrvChild *c);

This series leaves a few static forward declarations behind, and even
in the middle of the code rather than at the top.

Does anything stop us from adding bdrv_inherited_options() after all the
old functions instead? This will require a temporary forward
declaration, too, but it can go away at the end of the series when there
is only child_of_bds left.

Kevin




reply via email to

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