mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
mirror: make mirror_flush a coroutine_fn, do not use co_wrappers
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>
This commit is contained in:
parent
2f1fabdf44
commit
26bef102e3
1 changed files with 2 additions and 2 deletions
|
@ -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
|
/* Called when going out of the streaming phase to flush the bulk of the
|
||||||
* data to the medium, or just before completing.
|
* 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 (ret < 0) {
|
||||||
if (mirror_error_action(s, false, -ret) == BLOCK_ERROR_ACTION_REPORT) {
|
if (mirror_error_action(s, false, -ret) == BLOCK_ERROR_ACTION_REPORT) {
|
||||||
s->ret = ret;
|
s->ret = ret;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue