aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-05-26 21:04:32 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-05-27 00:08:09 +0200
commitc317728872ee9de44a1514bbe1f1fc8d5f8a7aeb (patch)
treefa826b48118bd11b8dae986a351abbe376de05bd /vl.c
parentd63baf92e3e968626e0899ec6070e747a9bf51bf (diff)
downloadqemu-c317728872ee9de44a1514bbe1f1fc8d5f8a7aeb.zip
qemu-c317728872ee9de44a1514bbe1f1fc8d5f8a7aeb.tar.gz
qemu-c317728872ee9de44a1514bbe1f1fc8d5f8a7aeb.tar.bz2
Make cache=unsafe the default for -snapshot
When using -snapshot we don't care about data integrity of the cow file at all, so let's disable flushing there and squeeze out the last drop of performance we could possibly get. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index bc15dd7..417554f 100644
--- a/vl.c
+++ b/vl.c
@@ -1105,9 +1105,9 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque,
return NULL;
}
if (snapshot) {
- /* always use write-back with snapshot */
+ /* always use cache=unsafe with snapshot */
bdrv_flags &= ~BDRV_O_CACHE_MASK;
- bdrv_flags |= (BDRV_O_SNAPSHOT|BDRV_O_CACHE_WB);
+ bdrv_flags |= (BDRV_O_SNAPSHOT|BDRV_O_CACHE_WB|BDRV_O_NO_FLUSH);
}
if (media == MEDIA_CDROM) {