aboutsummaryrefslogtreecommitdiff
path: root/block/copy-before-write.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2021-08-24 11:38:28 +0300
committerHanna Reitz <hreitz@redhat.com>2021-09-01 12:57:31 +0200
commit49577723d40f56f7ac3d2f880423ae6652a2922d (patch)
tree24edb6cca1e166358bf78be39ffe1cee0f2e8c37 /block/copy-before-write.c
parentd003e0aeced533074341c88fe6b58f97f8136397 (diff)
downloadqemu-49577723d40f56f7ac3d2f880423ae6652a2922d.zip
qemu-49577723d40f56f7ac3d2f880423ae6652a2922d.tar.gz
qemu-49577723d40f56f7ac3d2f880423ae6652a2922d.tar.bz2
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 <vsementsov@virtuozzo.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20210824083856.17408-7-vsementsov@virtuozzo.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'block/copy-before-write.c')
-rw-r--r--block/copy-before-write.c4
1 files changed, 2 insertions, 2 deletions
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;