block/backup: disable copy_range for compressed backup

Enabled by default copy_range ignores compress option. It's definitely
unexpected for user.

It's broken since introduction of copy_range usage in backup in
9ded4a0114.

Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Message-id: [email protected]
Reviewed-by: John Snow <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Cc: [email protected]
Signed-off-by: Max Reitz <[email protected]>
This commit is contained in:
Vladimir Sementsov-Ogievskiy authored and Max Reitz committed 2019-08-06 13:17:27 +02:00
1 parent 19ba4651fe
commit 110571be4e
1 file changed
+1 -1
+1 -1
View File
@@ -657,7 +657,7 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs,
job->cluster_size = cluster_size;
job->copy_bitmap = copy_bitmap;
copy_bitmap = NULL;
job->use_copy_range = true;
job->use_copy_range = !compress; /* compression isn't supported for it */
job->copy_range_size = MIN_NON_ZERO(blk_get_max_transfer(job->common.blk),
blk_get_max_transfer(job->target));
job->copy_range_size = MAX(job->cluster_size,