diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2019-10-01 16:14:07 +0300 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2019-10-10 10:56:18 +0200 |
commit | 0f4b02b73e71cb761bfedcef180c5f10812f2953 (patch) | |
tree | c89335a3fb9e016dbf09591c1c0bcdbf2bb37bce /include | |
parent | 843670f30f35935cfd7781b6a49c258f22261b1d (diff) | |
download | qemu-0f4b02b73e71cb761bfedcef180c5f10812f2953.zip qemu-0f4b02b73e71cb761bfedcef180c5f10812f2953.tar.gz qemu-0f4b02b73e71cb761bfedcef180c5f10812f2953.tar.bz2 |
block/block-copy: split block_copy_set_callbacks function
Split block_copy_set_callbacks out of block_copy_state_new. It's needed
for further commit: block-copy will use BdrvChildren of backup-top
filter, so it will be created from backup-top filter creation function.
But callbacks will still belong to backup job and will be set in
separate.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20191001131409.14202-4-vsementsov@virtuozzo.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block-copy.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/block/block-copy.h b/include/block/block-copy.h index 962f910..340d856 100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h @@ -66,12 +66,17 @@ typedef struct BlockCopyState { void *progress_opaque; } BlockCopyState; -BlockCopyState *block_copy_state_new( - BlockDriverState *source, BlockDriverState *target, - int64_t cluster_size, BdrvRequestFlags write_flags, +BlockCopyState *block_copy_state_new(BlockDriverState *source, + BlockDriverState *target, + int64_t cluster_size, + BdrvRequestFlags write_flags, + Error **errp); + +void block_copy_set_callbacks( + BlockCopyState *s, ProgressBytesCallbackFunc progress_bytes_callback, ProgressResetCallbackFunc progress_reset_callback, - void *progress_opaque, Error **errp); + void *progress_opaque); void block_copy_state_free(BlockCopyState *s); |