Skip to content

Commit

Permalink
mirror: finish earlier on error
Browse files Browse the repository at this point in the history
Stop to produce new async copy requests from mirror_iteration if
critical error (error action = BLOCK_ERROR_ACTION_REPORT) detected.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
Vladimir Sementsov-Ogievskiy authored and kevmw committed Aug 8, 2016
1 parent 9ef8112 commit dbaa7b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions block/mirror.c
Expand Up @@ -419,6 +419,10 @@ static uint64_t coroutine_fn mirror_iteration(MirrorBlockJob *s)
mirror_wait_for_io(s);
}

if (s->ret < 0) {
return 0;
}

mirror_clip_sectors(s, sector_num, &io_sectors);
switch (mirror_method) {
case MIRROR_METHOD_COPY:
Expand Down

0 comments on commit dbaa7b5

Please sign in to comment.