aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/qcow2.c3
-rw-r--r--block/vmdk.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/block/qcow2.c b/block/qcow2.c
index 2fe37ed..8e2b6c7 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1588,7 +1588,8 @@ static int qcow2_create2(const char *filename, int64_t total_size,
/* Reopen the image without BDRV_O_NO_FLUSH to flush it before returning */
ret = bdrv_open(bs, filename, NULL,
- BDRV_O_RDWR | BDRV_O_CACHE_WB, drv, &local_err);
+ BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_BACKING,
+ drv, &local_err);
if (error_is_set(&local_err)) {
error_propagate(errp, local_err);
goto out;
diff --git a/block/vmdk.c b/block/vmdk.c
index 6555663..5fb6c81 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1690,7 +1690,7 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options,
}
if (backing_file) {
BlockDriverState *bs = bdrv_new("");
- ret = bdrv_open(bs, backing_file, NULL, 0, NULL, errp);
+ ret = bdrv_open(bs, backing_file, NULL, BDRV_O_NO_BACKING, NULL, errp);
if (ret != 0) {
bdrv_unref(bs);
return ret;