diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-12-03 16:48:53 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-12-16 18:49:17 +0300 |
commit | 3c67d44de787dff288d7f2a51c372b22f7356db6 (patch) | |
tree | 98a6604327a08c080282c6ca40d5e12783a8eb7d /include/linux/blk-mq.h | |
parent | fcade2ce06ffebee5c2f6629ddbf2086c0f5ba5a (diff) | |
download | linux-3c67d44de787dff288d7f2a51c372b22f7356db6.tar.xz |
block: add mq_ops->queue_rqs hook
If we have a list of requests in our plug list, send it to the driver in
one go, if possible. The driver must set mq_ops->queue_rqs() to support
this, if not the usual one-by-one path is used.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blk-mq.h')
-rw-r--r-- | include/linux/blk-mq.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 772f8f921526..550996cf419c 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -493,6 +493,14 @@ struct blk_mq_ops { void (*commit_rqs)(struct blk_mq_hw_ctx *); /** + * @queue_rqs: Queue a list of new requests. Driver is guaranteed + * that each request belongs to the same queue. If the driver doesn't + * empty the @rqlist completely, then the rest will be queued + * individually by the block layer upon return. + */ + void (*queue_rqs)(struct request **rqlist); + + /** * @get_budget: Reserve budget before queue request, once .queue_rq is * run, it is driver's responsibility to release the * reserved budget. Also we have to handle failure case |