summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-07-21 22:27:15 +0200
committerEduardo Habkost <ehabkost@redhat.com>2009-07-29 11:43:31 -0300
commit319a4830bb9c8b1be052ed1bcdec61d825eac351 (patch)
tree5568f41911e921761c463bee0c2269a75230d2e9
parent170f3c74102daa13fcc157e59b8f2a81b6a59764 (diff)
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>
-rw-r--r--qemu/block-qcow2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/qemu/block-qcow2.c b/qemu/block-qcow2.c
index 3e111ad2..3e57ddf2 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);