diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-02-01 20:27:02 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-02-01 20:27:02 -0700 |
commit | 3c15f3f545afa320c5e3822825a9a53c664776b6 (patch) | |
tree | c6e0a7d7299e8012c2bf77e396aae40455d77d13 /include/linux/blk_types.h | |
parent | 4bf772b14675411a69b3c807f73006de0fe4b649 (diff) | |
parent | bea99a500773fdfdb16b7dbfbaa00af7a6f0dc3b (diff) |
Merge branch 'for-linus' into test
* for-linus:
blk-mq-sched: Enable merging discard bio into request
blk-mq: fix discard merge with scheduler attached
blk-mq: introduce BLK_STS_DEV_RESOURCE
Diffstat (limited to 'include/linux/blk_types.h')
-rw-r--r-- | include/linux/blk_types.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index c5d3db0d83f8..bf18b95ed92d 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -39,6 +39,24 @@ typedef u8 __bitwise blk_status_t; #define BLK_STS_AGAIN ((__force blk_status_t)12) +/* + * BLK_STS_DEV_RESOURCE is returned from the driver to the block layer if + * device related resources are unavailable, but the driver can guarantee + * that the queue will be rerun in the future once resources become + * available again. This is typically the case for device specific + * resources that are consumed for IO. If the driver fails allocating these + * resources, we know that inflight (or pending) IO will free these + * resource upon completion. + * + * This is different from BLK_STS_RESOURCE in that it explicitly references + * a device specific resource. For resources of wider scope, allocation + * failure can happen without having pending IO. This means that we can't + * rely on request completions freeing these resources, as IO may not be in + * flight. Examples of that are kernel memory allocations, DMA mappings, or + * any other system wide resources. + */ +#define BLK_STS_DEV_RESOURCE ((__force blk_status_t)13) + /** * blk_path_error - returns true if error may be path related * @error: status the request was completed with |