]> git.proxmox.com Git - mirror_qemu.git/blobdiff - vl.c
qcow2: Make cache=writethrough default
[mirror_qemu.git] / vl.c
diff --git a/vl.c b/vl.c
index 7b7489c7ceb38fd6289b23b9160ee39e3d3c0545..5189ad537e939332577d3248c5eb8a38acc3e992 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2239,7 +2239,7 @@ int drive_init(struct drive_opt *arg, int snapshot, void *opaque)
     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 @@ int drive_init(struct drive_opt *arg, int snapshot, void *opaque)
         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);