qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 1/1] block: add cache mode with direct IO and withou


From: Denis V. Lunev
Subject: [Qemu-devel] [PATCH 1/1] block: add cache mode with direct IO and without flushes
Date: Thu, 15 Sep 2016 16:19:52 +0300

This mode could be very useful for flush bottlenecks evaluation and for
running non-persistent VMs, when host crash is considered not fatal.

Signed-off-by: Denis V. Lunev <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
---
 block.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/block.c b/block.c
index 30d64e6..877165c 100644
--- a/block.c
+++ b/block.c
@@ -641,6 +641,9 @@ int bdrv_parse_cache_mode(const char *mode, int *flags, 
bool *writethrough)
     if (!strcmp(mode, "off") || !strcmp(mode, "none")) {
         *writethrough = false;
         *flags |= BDRV_O_NOCACHE;
+    } else if (!strcmp(mode, "none-unsafe") || !strcmp(mode, "off-unsafe")) {
+        *writethrough = false;
+        *flags |= BDRV_O_NOCACHE | BDRV_O_NO_FLUSH;
     } else if (!strcmp(mode, "directsync")) {
         *writethrough = true;
         *flags |= BDRV_O_NOCACHE;
-- 
2.5.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]