summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2021-05-28 16:16:28 +0200
committerKevin Wolf2021-06-02 14:23:20 +0200
commitbed9523471c13a44cdc15ed9ba0fb78cadf8c142 (patch)
tree1cdb56e9ad638912152cca52f0fc7e65d57e73b6 /include
parentblock-copy: fix block_copy_task_entry() progress update (diff)
downloadqemu-bed9523471c13a44cdc15ed9ba0fb78cadf8c142.tar.gz
qemu-bed9523471c13a44cdc15ed9ba0fb78cadf8c142.tar.xz
qemu-bed9523471c13a44cdc15ed9ba0fb78cadf8c142.zip
block-copy: refactor copy_range handling
Currently we update s->use_copy_range and s->copy_size in block_copy_do_copy(). It's not very good: 1. block_copy_do_copy() is intended to be a simple function, that wraps bdrv_co_<io> functions for need of block copy. That's why we don't pass BlockCopyTask into it. So, block_copy_do_copy() is bad place for manipulation with generic state of block-copy process 2. We are going to make block-copy thread-safe. So, it's good to move manipulation with state of block-copy to the places where we'll need critical sections anyway, to not introduce extra synchronization primitives in block_copy_do_copy(). Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20210528141628.44287-3-vsementsov@virtuozzo.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions