diff options
author | Alexander Graf <agraf@suse.de> | 2010-05-26 17:51:49 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-05-26 20:05:14 +0200 |
commit | dcbedf4128fdb0f38d477e6a87e89c2744eca663 (patch) | |
tree | cc50fdca4d1b3742bc655cefaeef5795fe730e62 /block.h | |
parent | 0f36b5d0c5cbc983f3b18f6921da4d94feff430a (diff) | |
download | qemu-dcbedf4128fdb0f38d477e6a87e89c2744eca663.tar.gz qemu-dcbedf4128fdb0f38d477e6a87e89c2744eca663.tar.bz2 qemu-dcbedf4128fdb0f38d477e6a87e89c2744eca663.zip |
Add cache=unsafe parameter to -drive
Usually the guest can tell the host to flush data to disk. In some cases we
don't want to flush though, but try to keep everything in cache.
So let's add a new cache value to -drive that allows us to set the cache
policy to most aggressive, disabling flushes. We call this mode "unsafe",
as guest data is not guaranteed to survive host crashes anymore.
This patch also adds a noop function for aio, so we can do nothing in AIO
fashion.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'block.h')
-rw-r--r-- | block.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -33,6 +33,7 @@ typedef struct QEMUSnapshotInfo { #define BDRV_O_CACHE_WB 0x0040 /* use write-back caching */ #define BDRV_O_NATIVE_AIO 0x0080 /* use native AIO instead of the thread pool */ #define BDRV_O_NO_BACKING 0x0100 /* don't open the backing file */ +#define BDRV_O_NO_FLUSH 0x0200 /* disable flushing on this disk */ #define BDRV_O_CACHE_MASK (BDRV_O_NOCACHE | BDRV_O_CACHE_WB) |