From 4dc822d726376fd4369089f04eb8605d2f94b74f Mon Sep 17 00:00:00 2001 From: aliguori Date: Thu, 4 Dec 2008 21:39:21 +0000 Subject: Use writeback caching by default with qcow2 qcow2 writes a cluster reference count on every cluster update. This causes performance to crater when using anything but cache=writeback. This is most noticeable when using savevm. Right now, qcow2 isn't a reliable format regardless of the type of cache your using because metadata is not updated in the correct order. Considering this, I think it's somewhat reasonable to use writeback caching by default with qcow2 files. It at least avoids the massive performance regression for users until we sort out the issues in qcow2. Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5879 c046a42c-6fe2-441c-8c8c-71466251a162 --- block.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'block.h') diff --git a/block.h b/block.h index 99d3a1e..c3314a1 100644 --- a/block.h +++ b/block.h @@ -49,8 +49,9 @@ typedef struct QEMUSnapshotInfo { bdrv_file_open()) */ #define BDRV_O_NOCACHE 0x0020 /* do not use the host page cache */ #define BDRV_O_CACHE_WB 0x0040 /* use write-back caching */ +#define BDRV_O_CACHE_DEF 0x0080 /* use default caching */ -#define BDRV_O_CACHE_MASK (BDRV_O_NOCACHE | BDRV_O_CACHE_WB) +#define BDRV_O_CACHE_MASK (BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_CACHE_DEF) void bdrv_info(void); void bdrv_info_stats(void); -- cgit v1.1