diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2016-08-03 15:56:44 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-08-08 13:05:43 +0200 |
commit | dbaa7b57ec84e39e581890c1d814a8ac0f56e7c4 (patch) | |
tree | 8a6d36a725dc4609dc6cabfb93536363b1ba155b | |
parent | 9ef8112a24d13c9d054c26105b24a3e12e1cb430 (diff) |
mirror: finish earlier on error
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>
-rw-r--r-- | block/mirror.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/mirror.c b/block/mirror.c index d6034f5b70..e0b3f4180f 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -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: |