qemu/block
Anton Nefedov 90ab48eb07 mirror: do not increase offset during initial zero_or_discard phase
If explicit zeroing out before mirroring is required for the target image,
it moves the block job offset counter to EOF, then offset and len counters
count the image size twice. There is no harm but stats are confusing,
specifically the progress of the operation is always reported as 99% by
management tools.

The patch skips offset increase for the first "technical" pass over the
image. This should not cause any further harm.

Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1486045515-8009-1-git-send-email-den@openvz.org
CC: Jeff Cody <jcody@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
CC: Eric Blake <eblake@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
2017-02-21 10:38:00 -05:00
..
Makefile.objs block/iscsi: statically link qemu_iscsi_opts 2017-01-27 18:07:58 +01:00
accounting.c
archipelago.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
backup.c coroutine-lock: add mutex argument to CoQueue APIs 2017-02-21 11:39:40 +00:00
blkdebug.c blkdebug: reschedule coroutine on the AioContext it is running on 2017-02-21 11:14:08 +00:00
blkreplay.c block: explicitly acquire aiocontext in bottom halves that need it 2017-02-21 11:39:39 +00:00
blkverify.c
block-backend.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
bochs.c
cloop.c
commit.c
crypto.c
curl.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
dirty-bitmap.c
dmg-bz2.c
dmg.c
dmg.h
file-posix.c block: get max_transfer limit for char (scsi-generic) devices 2017-01-27 18:07:31 +01:00
file-win32.c
gluster.c block: explicitly acquire aiocontext in bottom halves that need it 2017-02-21 11:39:39 +00:00
io.c coroutine-lock: add mutex argument to CoQueue APIs 2017-02-21 11:39:40 +00:00
iscsi-opts.c block/iscsi: statically link qemu_iscsi_opts 2017-01-27 18:07:58 +01:00
iscsi.c iscsi: Add blockdev-add support 2017-02-21 10:37:34 -05:00
linux-aio.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
mirror.c mirror: do not increase offset during initial zero_or_discard phase 2017-02-21 10:38:00 -05:00
nbd-client.c coroutine-lock: add mutex argument to CoQueue APIs 2017-02-21 11:39:40 +00:00
nbd-client.h nbd: convert to use qio_channel_yield 2017-02-21 11:14:08 +00:00
nbd.c
nfs.c block: explicitly acquire aiocontext in bottom halves that need it 2017-02-21 11:39:39 +00:00
null.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
parallels.c
qapi.c block/qapi: reduce the execution time of qmp_query_blockstats 2017-02-12 00:47:42 +01:00
qcow.c migration: disallow migrate_add_blocker during migration 2017-01-24 18:00:30 +00:00
qcow2-cache.c
qcow2-cluster.c coroutine-lock: add mutex argument to CoQueue APIs 2017-02-21 11:39:40 +00:00
qcow2-refcount.c qcow2: Optimize the refcount-block overlap check 2017-02-12 00:47:43 +01:00
qcow2-snapshot.c
qcow2.c qcow2: Optimize the refcount-block overlap check 2017-02-12 00:47:43 +01:00
qcow2.h qcow2: Optimize the refcount-block overlap check 2017-02-12 00:47:43 +01:00
qed-check.c
qed-cluster.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
qed-gencb.c
qed-l2-cache.c
qed-table.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
qed.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
qed.h block: explicitly acquire aiocontext in timers that need it 2017-02-21 11:14:08 +00:00
quorum.c
raw-format.c
rbd.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
replication.c
sheepdog.c coroutine-lock: add mutex argument to CoQueue APIs 2017-02-21 11:39:40 +00:00
snapshot.c
ssh.c block: explicitly acquire aiocontext in callbacks that need it 2017-02-21 11:39:36 +00:00
stream.c
throttle-groups.c coroutine-lock: add mutex argument to CoQueue APIs 2017-02-21 11:39:40 +00:00
trace-events trace: clean up trace-events files 2017-01-31 17:12:15 +00:00
vdi.c migration: disallow migrate_add_blocker during migration 2017-01-24 18:00:30 +00:00
vhdx-endian.c
vhdx-log.c
vhdx.c migration: disallow migrate_add_blocker during migration 2017-01-24 18:00:30 +00:00
vhdx.h
vmdk.c block/vmdk: Fix the endian problem of buf_len and lba 2017-02-12 00:47:42 +01:00
vpc.c migration: disallow migrate_add_blocker during migration 2017-01-24 18:00:30 +00:00
vvfat.c migration: disallow migrate_add_blocker during migration 2017-01-24 18:00:30 +00:00
win32-aio.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
write-threshold.c