[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/25] block: add missing coroutine_fn to bdrv_sum_allocated_file_
From: |
Kevin Wolf |
Subject: |
[PULL 11/25] block: add missing coroutine_fn to bdrv_sum_allocated_file_size() |
Date: |
Tue, 25 Apr 2023 15:13:45 +0200 |
From: Stefan Hajnoczi <stefanha@redhat.com>
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block.c b/block.c
index d79a52ca74..5ec1a3897e 100644
--- 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;
--
2.40.0
- [PULL 00/25] Block layer patches, Kevin Wolf, 2023/04/25
- [PULL 01/25] block: make BlockBackend->quiesce_counter atomic, Kevin Wolf, 2023/04/25
- [PULL 03/25] block: protect BlockBackend->queued_requests with a lock, Kevin Wolf, 2023/04/25
- [PULL 04/25] block: don't acquire AioContext lock in bdrv_drain_all(), Kevin Wolf, 2023/04/25
- [PULL 08/25] hmp: convert handle_hmp_command() to AIO_WAIT_WHILE_UNLOCKED(), Kevin Wolf, 2023/04/25
- [PULL 09/25] monitor: convert monitor_cleanup() to AIO_WAIT_WHILE_UNLOCKED(), Kevin Wolf, 2023/04/25
- [PULL 02/25] block: make BlockBackend->disable_request_queuing atomic, Kevin Wolf, 2023/04/25
- [PULL 06/25] block: convert bdrv_graph_wrlock() to AIO_WAIT_WHILE_UNLOCKED(), Kevin Wolf, 2023/04/25
- [PULL 10/25] include/block: fixup typos, Kevin Wolf, 2023/04/25
- [PULL 07/25] block: convert bdrv_drain_all_begin() to AIO_WAIT_WHILE_UNLOCKED(), Kevin Wolf, 2023/04/25
- [PULL 11/25] block: add missing coroutine_fn to bdrv_sum_allocated_file_size(),
Kevin Wolf <=
- [PULL 22/25] tests: mark more coroutine_fns, Kevin Wolf, 2023/04/25
- [PULL 15/25] thread-pool: avoid passing the pool parameter every time, Kevin Wolf, 2023/04/25
- [PULL 16/25] vvfat: mark various functions as coroutine_fn, Kevin Wolf, 2023/04/25
- [PULL 05/25] block: convert blk_exp_close_all_type() to AIO_WAIT_WHILE_UNLOCKED(), Kevin Wolf, 2023/04/25
- [PULL 18/25] mirror: make mirror_flush a coroutine_fn, do not use co_wrappers, Kevin Wolf, 2023/04/25
- [PULL 21/25] qemu-pr-helper: mark more coroutine_fns, Kevin Wolf, 2023/04/25
- [PULL 19/25] nbd: mark more coroutine_fns, do not use co_wrappers, Kevin Wolf, 2023/04/25
- [PULL 23/25] qcow2: mark various functions as coroutine_fn and GRAPH_RDLOCK, Kevin Wolf, 2023/04/25
- [PULL 25/25] block/monitor/block-hmp-cmds.c: Fix crash when execute hmp_commit, Kevin Wolf, 2023/04/25
- [PULL 14/25] thread-pool: use ThreadPool from the running thread, Kevin Wolf, 2023/04/25