From 319a4830bb9c8b1be052ed1bcdec61d825eac351 Mon Sep 17 00:00:00 2001 From: Juan Quintela <quintela@redhat.com> Date: Tue, 21 Jul 2009 22:27:15 +0200 Subject: [PATCH 10/16] change qcow2 default cache mode to none Signed-off-by: Juan Quintela <quintela@redhat.com> Message-Id: <2fde8ebf99cd62c084c378d287fe3324e83de12c.1248207932.git.quintela@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Bugzilla: 512837 Message-Id: <31a92212c1ecff51ba68bb4442b588b8ef756753.1248095798.git.quintela@redhat.com> Acked-by: "Daniel P. Berrange" <berrange@redhat.com> Acked-by: Dor Laor <dlaor@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com> --- qemu/block-qcow2.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/qemu/block-qcow2.c b/qemu/block-qcow2.c index 3e111ad..3e57ddf 100644 --- a/qemu/block-qcow2.c +++ b/qemu/block-qcow2.c @@ -274,12 +274,9 @@ static int qcow_open(BlockDriverState *bs, const char *filename, int flags) QCowHeader header; uint64_t ext_end; - /* Performance is terrible right now with cache=writethrough due mainly - * to reference count updates. If the user does not explicitly specify - * a caching type, force to writeback caching. - */ + /* We default to NO CACHE if nothing is defined */ if ((flags & BDRV_O_CACHE_DEF)) { - flags |= BDRV_O_CACHE_WB; + flags |= BDRV_O_NOCACHE; flags &= ~BDRV_O_CACHE_DEF; } ret = bdrv_file_open(&s->hd, filename, flags); -- 1.6.3.rc4.29.g8146