Skip to content

Commit

Permalink
block: add missing coroutine_fn to bdrv_sum_allocated_file_size()
Browse files Browse the repository at this point in the history
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>
Message-Id: <20230308211435.346375-1-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
stefanhaRH authored and kevmw committed Apr 25, 2023
1 parent 04ae220 commit e95200c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block.c
Original file line number Diff line number Diff line change
Expand Up @@ -5750,7 +5750,7 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
* 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;
Expand Down

0 comments on commit e95200c

Please sign in to comment.