diff options
Diffstat (limited to 'block/mirror.c')
-rw-r--r-- | block/mirror.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/mirror.c b/block/mirror.c index 71e5ad4377..b1e633ecad 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -422,7 +422,9 @@ static uint64_t coroutine_fn mirror_iteration(MirrorBlockJob *s) assert(io_sectors); sector_num += io_sectors; nb_chunks -= DIV_ROUND_UP(io_sectors, sectors_per_chunk); - delay_ns += ratelimit_calculate_delay(&s->limit, io_sectors); + if (s->common.speed) { + delay_ns = ratelimit_calculate_delay(&s->limit, io_sectors); + } } return delay_ns; } |