diff options
author | Vladimir Sementsov-Ogievskiy | 2020-10-21 16:58:44 +0200 |
---|---|---|
committer | Max Reitz | 2020-12-18 12:35:55 +0100 |
commit | d1a764d126aa9bd1b519855607f55daf266b07bf (patch) | |
tree | a38cf66506446cbde41fe5aefa6f1979ac5901f2 /include | |
parent | block: bdrv_mark_request_serialising: split non-waiting function (diff) | |
download | qemu-d1a764d126aa9bd1b519855607f55daf266b07bf.tar.gz qemu-d1a764d126aa9bd1b519855607f55daf266b07bf.tar.xz qemu-d1a764d126aa9bd1b519855607f55daf266b07bf.zip |
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')
-rw-r--r-- | include/block/block.h | 9 |
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 { |