From 6340472c54529c5b703deec3ab0d6bdfe644f11e Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 4 Mar 2016 14:53:50 +0100 Subject: 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 --- block/qcow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'block/qcow.c') 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; -- cgit v1.2.3