aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/blockdev.c b/blockdev.c
index f5857d0187..97062e33c3 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3254,6 +3254,9 @@ void do_blockdev_backup(BlockdevBackup *backup, BlockJobTxn *txn, Error **errp)
if (!backup->has_job_id) {
backup->job_id = NULL;
}
+ if (!backup->has_compress) {
+ backup->compress = false;
+ }
bs = qmp_get_root_bs(backup->device, errp);
if (!bs) {
@@ -3280,8 +3283,8 @@ void do_blockdev_backup(BlockdevBackup *backup, BlockJobTxn *txn, Error **errp)
}
}
backup_start(backup->job_id, bs, target_bs, backup->speed, backup->sync,
- NULL, false, backup->on_source_error, backup->on_target_error,
- block_job_cb, bs, txn, &local_err);
+ NULL, backup->compress, backup->on_source_error,
+ backup->on_target_error, block_job_cb, bs, txn, &local_err);
if (local_err != NULL) {
error_propagate(errp, local_err);
}