aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/qcow2.c')
-rw-r--r--block/qcow2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow2.c b/block/qcow2.c
index 8fc8f8cc37..8c220ecdc5 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -998,7 +998,7 @@ exit:
if (prealloc) {
BlockDriverState *bs;
bs = bdrv_new("");
- bdrv_open(bs, filename, BDRV_O_CACHE_WB);
+ bdrv_open(bs, filename, BDRV_O_CACHE_WB | BDRV_O_RDWR);
preallocate(bs);
bdrv_close(bs);
}