From 0f4b02b73e71cb761bfedcef180c5f10812f2953 Mon Sep 17 00:00:00 2001 From: Vladimir Sementsov-Ogievskiy Date: Tue, 1 Oct 2019 16:14:07 +0300 Subject: 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 Message-id: 20191001131409.14202-4-vsementsov@virtuozzo.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- include/block/block-copy.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/block/block-copy.h b/include/block/block-copy.h index 962f91056a..340d856246 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); -- cgit v1.2.3-55-g7522