diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/mirror.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/mirror.c b/block/mirror.c index 36f4f8e8bd..95366adb3a 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -329,7 +329,7 @@ static void coroutine_fn mirror_run(void *opaque) return; } - length = (bdrv_getlength(bs) + s->granularity - 1) / s->granularity; + length = DIV_ROUND_UP(s->common.len, s->granularity); s->in_flight_bitmap = bitmap_new(length); /* If we have no backing file yet in the destination, we cannot let |