aboutsummaryrefslogtreecommitdiff
path: root/include/block/block.h
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2020-10-21 17:58:44 +0300
committerMax Reitz <mreitz@redhat.com>2020-12-18 12:35:55 +0100
commitd1a764d126aa9bd1b519855607f55daf266b07bf (patch)
treea38cf66506446cbde41fe5aefa6f1979ac5901f2 /include/block/block.h
parent8ac5aab255d5c55d21bb33f4f6dd6dc58319e512 (diff)
block: introduce BDRV_REQ_NO_WAIT flag
Add flag to make serialising request no wait: if there are conflicting requests, just return error immediately. It's will be used in upcoming preallocate filter. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20201021145859.11201-7-vsementsov@virtuozzo.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r--include/block/block.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h
index a3f3dcc88f..a193545b6a 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -77,8 +77,15 @@ typedef enum {
* written to qiov parameter which may be NULL.
*/
BDRV_REQ_PREFETCH = 0x200,
+
+ /*
+ * If we need to wait for other requests, just fail immediately. Used
+ * only together with BDRV_REQ_SERIALISING.
+ */
+ BDRV_REQ_NO_WAIT = 0x400,
+
/* Mask of valid flags */
- BDRV_REQ_MASK = 0x3ff,
+ BDRV_REQ_MASK = 0x7ff,
} BdrvRequestFlags;
typedef struct BlockSizes {