summaryrefslogtreecommitdiffstats
path: root/include/block/block.h
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2019-07-25 12:05:48 +0200
committerEric Blake2019-08-15 20:22:13 +0200
commit3299e5ecf7e1c9443189e50c949d97e536022c59 (patch)
tree52a4758697875f4e52730b680a826a5a210ad931 /include/block/block.h
parentqapi: Add InetSocketAddress member keep-alive (diff)
downloadqemu-3299e5ecf7e1c9443189e50c949d97e536022c59.tar.gz
qemu-3299e5ecf7e1c9443189e50c949d97e536022c59.tar.xz
qemu-3299e5ecf7e1c9443189e50c949d97e536022c59.zip
block: implement BDRV_REQ_PREFETCH
Do effective copy-on-read request when we don't need data actually. It will be used for block-stream and NBD_CMD_CACHE. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20190725100550.33801-2-vsementsov@virtuozzo.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> [eblake: comment grammar fix] Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r--include/block/block.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 50a07c1c33..a9df34ff94 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -88,8 +88,14 @@ typedef enum {
* fallback. */
BDRV_REQ_NO_FALLBACK = 0x100,
+ /*
+ * BDRV_REQ_PREFETCH may be used only together with BDRV_REQ_COPY_ON_READ
+ * on read request and means that caller doesn't really need data to be
+ * written to qiov parameter which may be NULL.
+ */
+ BDRV_REQ_PREFETCH = 0x200,
/* Mask of valid flags */
- BDRV_REQ_MASK = 0x1ff,
+ BDRV_REQ_MASK = 0x3ff,
} BdrvRequestFlags;
typedef struct BlockSizes {