diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/backup.c | 2 | ||||
-rw-r--r-- | block/mirror.c | 7 | ||||
-rw-r--r-- | block/stream.c | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/block/backup.c b/block/backup.c index 15a2e55e8e..7978ae2e50 100644 --- a/block/backup.c +++ b/block/backup.c @@ -325,7 +325,7 @@ static void coroutine_fn backup_run(void *opaque) /* Depending on error action, fail now or retry cluster */ BlockErrorAction action = backup_error_action(job, error_is_read, -ret); - if (action == BDRV_ACTION_REPORT) { + if (action == BLOCK_ERROR_ACTION_REPORT) { break; } else { start--; diff --git a/block/mirror.c b/block/mirror.c index 94c8661777..df58aea730 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 { diff --git a/block/stream.c b/block/stream.c index 91d18a2db7..043340994d 100644 --- a/block/stream.c +++ b/block/stream.c @@ -159,14 +159,14 @@ wait: BlockErrorAction action = block_job_error_action(&s->common, s->common.bs, s->on_error, true, -ret); - if (action == BDRV_ACTION_STOP) { + if (action == BLOCK_ERROR_ACTION_STOP) { n = 0; continue; } if (error == 0) { error = ret; } - if (action == BDRV_ACTION_REPORT) { + if (action == BLOCK_ERROR_ACTION_REPORT) { break; } } |