summaryrefslogtreecommitdiff
path: root/block/qcow.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-03-04 14:53:50 +0100
committerKevin Wolf <kwolf@redhat.com>2016-03-14 16:46:43 +0100
commit6340472c54529c5b703deec3ab0d6bdfe644f11e (patch)
tree510ecb67b21864f7fb2d761d7dc724e976e9669c /block/qcow.c
parent2073d410ce3f2b1507bccd6aba68e8808647f9a9 (diff)
downloadqemu-6340472c54529c5b703deec3ab0d6bdfe644f11e.tar.gz
qemu-6340472c54529c5b703deec3ab0d6bdfe644f11e.tar.bz2
qemu-6340472c54529c5b703deec3ab0d6bdfe644f11e.zip
block: Use writeback in .bdrv_create() implementations
There's no reason to use a writethrough cache mode while creating an image. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow.c')
-rw-r--r--block/qcow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/qcow.c b/block/qcow.c
index 251910cc9d..c46810c56b 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -798,7 +798,8 @@ static int qcow_create(const char *filename, QemuOpts *opts, Error **errp)
qcow_bs = NULL;
ret = bdrv_open(&qcow_bs, filename, NULL, NULL,
- BDRV_O_RDWR | BDRV_O_PROTOCOL, &local_err);
+ BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_PROTOCOL,
+ &local_err);
if (ret < 0) {
error_propagate(errp, local_err);
goto cleanup;