aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/qcow2.c')
-rw-r--r--block/qcow2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/qcow2.c b/block/qcow2.c
index 7391b497f7..0f44780465 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -2802,7 +2802,7 @@ static int qcow2_create2(const char *filename, int64_t total_size,
}
/* Okay, now that we have a valid image, let's give it the right size */
- ret = blk_truncate(blk, total_size, errp);
+ ret = blk_truncate(blk, total_size, PREALLOC_MODE_OFF, errp);
if (ret < 0) {
error_prepend(errp, "Could not resize image: ");
goto out;
@@ -3995,7 +3995,7 @@ static int qcow2_amend_options(BlockDriverState *bs, QemuOpts *opts,
return ret;
}
- ret = blk_truncate(blk, new_size, &local_err);
+ ret = blk_truncate(blk, new_size, PREALLOC_MODE_OFF, &local_err);
blk_unref(blk);
if (ret < 0) {
error_report_err(local_err);