summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-03-04 14:28:01 +0100
committerKevin Wolf <kwolf@redhat.com>2016-03-30 12:16:02 +0200
commitbfd18d1e0b06608226fcef1982c3a439c49c3366 (patch)
tree86f43754a9f11d01c5521dee96f51660cd440bda /include
parent855a6a93a12b60b2799eb5999baabd7a85a37c99 (diff)
downloadqemu-bfd18d1e0b06608226fcef1982c3a439c49c3366.tar.gz
block: Move enable_write_cache to BB level
Whether a write cache is used or not is a decision that concerns the user (e.g. the guest device) rather than the backend. It was already logically part of the BB level as bdrv_move_feature_fields() always kept it on top of the BDS tree; with this patch, the core of it (the actual flag and the additional flushes) is also implemented there. Direct callers of bdrv_open() must pass BDRV_O_CACHE_WB now if bs doesn't have a BlockBackend attached. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/block.h1
-rw-r--r--include/block/block_int.h3
2 files changed, 1 insertions, 3 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 4fd6c050f0..ddfd50abd5 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -64,6 +64,7 @@ typedef enum {
*/
BDRV_REQ_MAY_UNMAP = 0x4,
BDRV_REQ_NO_SERIALISING = 0x8,
+ BDRV_REQ_FUA = 0x10,
} BdrvRequestFlags;
typedef struct BlockSizes {
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 1177c25aab..48846091ac 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -442,9 +442,6 @@ struct BlockDriverState {
/* Alignment requirement for offset/length of I/O requests */
unsigned int request_alignment;
- /* do we need to tell the quest if we have a volatile write cache? */
- int enable_write_cache;
-
/* the following member gives a name to every node on the bs graph. */
char node_name[32];
/* element of the list of named nodes building the graph */