qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v2] block: add missing coroutine_fn to bdrv_sum_allocated_fil


From: Stefan Hajnoczi
Subject: Re: [PATCH v2] block: add missing coroutine_fn to bdrv_sum_allocated_file_size()
Date: Wed, 8 Mar 2023 17:18:47 -0500

v2 is the same as v1. I sent it by accident, sorry :).

Stefan

On Wed, 8 Mar 2023 at 17:18, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> Not a coroutine_fn, you say?
>
>   static int64_t bdrv_sum_allocated_file_size(BlockDriverState *bs)
>   {
>       BdrvChild *child;
>       int64_t child_size, sum = 0;
>
>       QLIST_FOREACH(child, &bs->children, next) {
>           if (child->role & (BDRV_CHILD_DATA | BDRV_CHILD_METADATA |
>                              BDRV_CHILD_FILTERED))
>           {
>               child_size = bdrv_co_get_allocated_file_size(child->bs);
>                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Well what do we have here?!
>
> I rest my case, your honor.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  block.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block.c b/block.c
> index 0dd604d0f6..a79297f99b 100644
> --- a/block.c
> +++ b/block.c
> @@ -5749,7 +5749,7 @@ exit:
>   * sums the size of all data-bearing children.  (This excludes backing
>   * children.)
>   */
> -static int64_t bdrv_sum_allocated_file_size(BlockDriverState *bs)
> +static int64_t coroutine_fn bdrv_sum_allocated_file_size(BlockDriverState 
> *bs)
>  {
>      BdrvChild *child;
>      int64_t child_size, sum = 0;
> --
> 2.39.2
>
>



reply via email to

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