qcow2: Make cache=writethrough default
The performance of qcow2 has improved meanwhile, so we don't need to
special-case it any more. Switch the default to write-through caching
like all other block drivers.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/vl.c b/vl.c
index 7b7489c..5189ad5 100644
--- a/vl.c
+++ b/vl.c
@@ -2239,7 +2239,7 @@
unit_id = -1;
translation = BIOS_ATA_TRANSLATION_AUTO;
index = -1;
- cache = 3;
+ cache = 1;
if (machine->use_scsi) {
type = IF_SCSI;
@@ -2557,8 +2557,6 @@
bdrv_flags |= BDRV_O_NOCACHE;
else if (cache == 2) /* write-back */
bdrv_flags |= BDRV_O_CACHE_WB;
- else if (cache == 3) /* not specified */
- bdrv_flags |= BDRV_O_CACHE_DEF;
if (bdrv_open2(bdrv, file, bdrv_flags, drv) < 0) {
fprintf(stderr, "qemu: could not open disk image %s\n",
file);