]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block: add missing coroutine_fn to bdrv_sum_allocated_file_size()
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 8 Mar 2023 21:14:35 +0000 (16:14 -0500)
committerKevin Wolf <kwolf@redhat.com>
Tue, 25 Apr 2023 11:17:28 +0000 (13:17 +0200)
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>
block.c

diff --git a/block.c b/block.c
index d79a52ca7499547669ada8442e33aa2014fb6ac4..5ec1a3897e08f24a6f6c28938c3adfeb16188ef6 100644 (file)
--- a/block.c
+++ b/block.c
@@ -5750,7 +5750,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;