diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-01-17 00:46:46 +0300 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2021-01-26 14:36:37 +0100 |
commit | 26be9d62dd5f5268b814da24fd8e8b5c5b999ebe (patch) | |
tree | ef5f3e5e0f64753915c83bbf84a34a3e940cba21 /include | |
parent | de4641b46b020c5b332175f80e8bfe3d352888e8 (diff) |
block/block-copy: add max_chunk and max_workers parameters
They will be used for backup.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-5-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block-copy.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/block/block-copy.h b/include/block/block-copy.h index 8c225ebf81..22372aa375 100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h @@ -49,9 +49,15 @@ int coroutine_fn block_copy(BlockCopyState *s, int64_t offset, int64_t bytes, * * Caller is responsible to call block_copy_call_free() to free * BlockCopyCallState object. + * + * @max_workers means maximum of parallel coroutines to execute sub-requests, + * must be > 0. + * + * @max_chunk means maximum length for one IO operation. Zero means unlimited. */ BlockCopyCallState *block_copy_async(BlockCopyState *s, int64_t offset, int64_t bytes, + int max_workers, int64_t max_chunk, BlockCopyAsyncCallbackFunc cb, void *cb_opaque); |