aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2019-03-22 13:38:43 +0100
committerKevin Wolf <kwolf@redhat.com>2019-03-26 11:37:51 +0100
commitfe0480d6294270ff0d6fb60e66bb725a6aad2043 (patch)
tree86c0e0d0d3582b8cce53b18b0b3ecc7f942bf84b /include
parent48ce986096bb70354b12f0becb253a06bcf9c434 (diff)
downloadqemu-fe0480d6294270ff0d6fb60e66bb725a6aad2043.zip
qemu-fe0480d6294270ff0d6fb60e66bb725a6aad2043.tar.gz
qemu-fe0480d6294270ff0d6fb60e66bb725a6aad2043.tar.bz2
block: Add BDRV_REQ_NO_FALLBACK
For qemu-img convert, we want an operation that zeroes out the whole image if this can be done efficiently, but that returns an error otherwise so we don't write explicit zeroes and immediately overwrite them with the real data, potentially doubling the amount of data to be written. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Acked-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/block.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h
index e452988..c7a2619 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -83,8 +83,13 @@ typedef enum {
*/
BDRV_REQ_SERIALISING = 0x80,
+ /* Execute the request only if the operation can be offloaded or otherwise
+ * be executed efficiently, but return an error instead of using a slow
+ * fallback. */
+ BDRV_REQ_NO_FALLBACK = 0x100,
+
/* Mask of valid flags */
- BDRV_REQ_MASK = 0xff,
+ BDRV_REQ_MASK = 0x1ff,
} BdrvRequestFlags;
typedef struct BlockSizes {