summaryrefslogtreecommitdiffstats
path: root/include/block/block.h
diff options
context:
space:
mode:
authorMax Reitz2018-04-21 15:29:23 +0200
committerMax Reitz2018-05-15 16:15:21 +0200
commitc6035964f8316b504060618d05b5dd434f18595b (patch)
treed6b2279cf0ce77c58d2d41cb1014d265c1380c3d /include/block/block.h
parentblock: BLK_PERM_WRITE includes ..._UNCHANGED (diff)
downloadqemu-c6035964f8316b504060618d05b5dd434f18595b.tar.gz
qemu-c6035964f8316b504060618d05b5dd434f18595b.tar.xz
qemu-c6035964f8316b504060618d05b5dd434f18595b.zip
block: Add BDRV_REQ_WRITE_UNCHANGED flag
This flag signifies that a write request will not change the visible disk content. With this flag set, it is sufficient to have the BLK_PERM_WRITE_UNCHANGED permission instead of BLK_PERM_WRITE. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-id: 20180421132929.21610-4-mreitz@redhat.com Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r--include/block/block.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 397b5e8d44..3894edda9d 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -54,8 +54,12 @@ typedef enum {
BDRV_REQ_FUA = 0x10,
BDRV_REQ_WRITE_COMPRESSED = 0x20,
+ /* Signifies that this write request will not change the visible disk
+ * content. */
+ BDRV_REQ_WRITE_UNCHANGED = 0x40,
+
/* Mask of valid flags */
- BDRV_REQ_MASK = 0x3f,
+ BDRV_REQ_MASK = 0x7f,
} BdrvRequestFlags;
typedef struct BlockSizes {