diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2019-10-22 14:18:02 +0300 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2019-10-28 11:22:31 +0100 |
commit | e332a726da322c5c68bc34ffb59384e31e36d0ff (patch) | |
tree | e2c07f677aaed53024a6c1e4a8d241cf2597ee62 /block/replication.c | |
parent | b3b7036afbf564268ad7edc10fb28501af0709e9 (diff) | |
download | qemu-e332a726da322c5c68bc34ffb59384e31e36d0ff.zip qemu-e332a726da322c5c68bc34ffb59384e31e36d0ff.tar.gz qemu-e332a726da322c5c68bc34ffb59384e31e36d0ff.tar.bz2 |
block/block-copy: refactor copying
Merge copying code into one function block_copy_do_copy, which only
calls bdrv_ io functions and don't do any synchronization (like dirty
bitmap set/reset).
Refactor block_copy() function so that it takes full decision about
size of chunk to be copied and does all the synchronization (checking
intersecting requests, set/reset dirty bitmaps).
It will help:
- introduce parallel processing of block_copy iterations: we need to
calculate chunk size, start async chunk copying and go to the next
iteration
- simplify synchronization improvement (like memory limiting in
further commit and reducing critical section (now we lock the whole
requested range, when actually we need to lock only dirty region
which we handle at the moment))
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20191022111805.3432-4-vsementsov@virtuozzo.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/replication.c')
0 files changed, 0 insertions, 0 deletions