From 49577723d40f56f7ac3d2f880423ae6652a2922d Mon Sep 17 00:00:00 2001 From: Vladimir Sementsov-Ogievskiy Date: Tue, 24 Aug 2021 11:38:28 +0300 Subject: block-copy: move detecting fleecing scheme to block-copy We want to simplify initialization interface of copy-before-write filter as we are going to make it public. So, let's detect fleecing scheme exactly in block-copy code, to not pass this information through extra levels. Why not just set BDRV_REQ_SERIALISING unconditionally: because we are going to implement new more efficient fleecing scheme which will not rely on backing feature. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20210824083856.17408-7-vsementsov@virtuozzo.com> Signed-off-by: Hanna Reitz --- block/copy-before-write.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'block/copy-before-write.c') diff --git a/block/copy-before-write.c b/block/copy-before-write.c index 0dc5a10..4337076 100644 --- a/block/copy-before-write.c +++ b/block/copy-before-write.c @@ -171,7 +171,7 @@ BlockDriverState *bdrv_cbw_append(BlockDriverState *source, const char *filter_node_name, uint64_t cluster_size, BackupPerf *perf, - BdrvRequestFlags write_flags, + bool compress, BlockCopyState **bcs, Error **errp) { @@ -218,7 +218,7 @@ BlockDriverState *bdrv_cbw_append(BlockDriverState *source, state->cluster_size = cluster_size; state->bcs = block_copy_state_new(top->backing, state->target, cluster_size, perf->use_copy_range, - write_flags, errp); + compress, errp); if (!state->bcs) { error_prepend(errp, "Cannot create block-copy-state: "); goto fail; -- cgit v1.1