diff options
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/blockdev.c b/blockdev.c index 64d06d1f67..2e536dde3e 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3615,7 +3615,7 @@ static BlockJob *do_drive_backup(DriveBackup *backup, JobTxn *txn, BlockDriverState *source = NULL; BlockJob *job = NULL; AioContext *aio_context; - QDict *options = NULL; + QDict *options; Error *local_err = NULL; int flags; int64_t size; @@ -3688,10 +3688,10 @@ static BlockJob *do_drive_backup(DriveBackup *backup, JobTxn *txn, goto out; } + options = qdict_new(); + qdict_put_str(options, "discard", "unmap"); + qdict_put_str(options, "detect-zeroes", "unmap"); if (backup->format) { - if (!options) { - options = qdict_new(); - } qdict_put_str(options, "driver", backup->format); } |