diff options
Diffstat (limited to 'block/mirror.c')
-rw-r--r-- | block/mirror.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/block/mirror.c b/block/mirror.c index 94c8661777..301a04de8e 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -118,7 +118,7 @@ static void mirror_write_complete(void *opaque, int ret) bdrv_set_dirty(source, op->sector_num, op->nb_sectors); action = mirror_error_action(s, false, -ret); - if (action == BDRV_ACTION_REPORT && s->ret >= 0) { + if (action == BLOCK_ERROR_ACTION_REPORT && s->ret >= 0) { s->ret = ret; } } @@ -135,7 +135,7 @@ static void mirror_read_complete(void *opaque, int ret) bdrv_set_dirty(source, op->sector_num, op->nb_sectors); action = mirror_error_action(s, true, -ret); - if (action == BDRV_ACTION_REPORT && s->ret >= 0) { + if (action == BLOCK_ERROR_ACTION_REPORT && s->ret >= 0) { s->ret = ret; } @@ -415,7 +415,8 @@ static void coroutine_fn mirror_run(void *opaque) trace_mirror_before_flush(s); ret = bdrv_flush(s->target); if (ret < 0) { - if (mirror_error_action(s, false, -ret) == BDRV_ACTION_REPORT) { + if (mirror_error_action(s, false, -ret) == + BLOCK_ERROR_ACTION_REPORT) { goto immediate_exit; } } else { @@ -426,7 +427,7 @@ static void coroutine_fn mirror_run(void *opaque) */ s->common.offset = end * BDRV_SECTOR_SIZE; if (!s->synced) { - block_job_ready(&s->common); + block_job_event_ready(&s->common); s->synced = true; } |