]> git.proxmox.com Git - qemu.git/commitdiff
block: Fix BDRV_O_CACHE_MASK
authorKevin Wolf <kwolf@redhat.com>
Tue, 31 Aug 2010 13:08:03 +0000 (15:08 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 13 Sep 2010 12:33:58 +0000 (14:33 +0200)
BDRV_O_CACHE_MASK should have been extended when cache=unsafe introduced a new
flag BDRV_O_NO_FLUSH. There are currently no users that would change their
behaviour because of this, but let's clean it up before things break.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit ceb25e5c7554255931f7f5647d3ad9df36111f53)

block.h

diff --git a/block.h b/block.h
index db131a3438da85e38c06a7b8f0f74cd25ea39ad3..5f6438010f84c925cbf18f277cd91870f42c78b5 100644 (file)
--- a/block.h
+++ b/block.h
@@ -35,7 +35,7 @@ typedef struct QEMUSnapshotInfo {
 #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)
+#define BDRV_O_CACHE_MASK  (BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH)
 
 #define BDRV_SECTOR_BITS   9
 #define BDRV_SECTOR_SIZE   (1ULL << BDRV_SECTOR_BITS)