[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/25] mirror: make mirror_flush a coroutine_fn, do not use co_wra
From: |
Kevin Wolf |
Subject: |
[PULL 18/25] mirror: make mirror_flush a coroutine_fn, do not use co_wrappers |
Date: |
Tue, 25 Apr 2023 15:13:52 +0200 |
From: Paolo Bonzini <pbonzini@redhat.com>
mirror_flush calls a mixed function blk_flush but it is only called
from mirror_run; so call the coroutine version and make mirror_flush
a coroutine_fn too.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20230309084456.304669-4-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/mirror.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index 663e2b7002..af9bbd23d4 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -886,9 +886,9 @@ static int coroutine_fn mirror_dirty_init(MirrorBlockJob *s)
/* Called when going out of the streaming phase to flush the bulk of the
* data to the medium, or just before completing.
*/
-static int mirror_flush(MirrorBlockJob *s)
+static int coroutine_fn mirror_flush(MirrorBlockJob *s)
{
- int ret = blk_flush(s->target);
+ int ret = blk_co_flush(s->target);
if (ret < 0) {
if (mirror_error_action(s, false, -ret) == BLOCK_ERROR_ACTION_REPORT) {
s->ret = ret;
--
2.40.0
- [PULL 09/25] monitor: convert monitor_cleanup() to AIO_WAIT_WHILE_UNLOCKED(), (continued)
- [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, 2023/04/25
- [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 <=
- [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
- [PULL 20/25] 9pfs: mark more coroutine_fns, Kevin Wolf, 2023/04/25
- [PULL 12/25] linux-aio: use LinuxAioState from the running thread, Kevin Wolf, 2023/04/25
- [PULL 24/25] vmdk: make vmdk_is_cid_valid a coroutine_fn, Kevin Wolf, 2023/04/25
- [PULL 13/25] io_uring: use LuringState from the running thread, Kevin Wolf, 2023/04/25
- [PULL 17/25] blkdebug: add missing coroutine_fn annotation, Kevin Wolf, 2023/04/25