diff options
author | Jens Axboe <axboe@fb.com> | 2017-01-11 14:29:56 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-17 10:04:04 -0700 |
commit | cc71a6f43886a8af57dbbce2a45b4b2aaf570fe6 (patch) | |
tree | 5b30ee132c63f90ec3cf1efb21e90f66524b3317 /block/blk-mq.h | |
parent | 4941115bef2bc891aa00a2f0edeaf06dc982325a (diff) | |
download | linux-cc71a6f43886a8af57dbbce2a45b4b2aaf570fe6.tar.gz linux-cc71a6f43886a8af57dbbce2a45b4b2aaf570fe6.tar.bz2 linux-cc71a6f43886a8af57dbbce2a45b4b2aaf570fe6.zip |
blk-mq: abstract out helpers for allocating/freeing tag maps
Prep patch for adding an extra tag map for scheduler requests.
Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r-- | block/blk-mq.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h index 48b7771eb192..1b279b02d0f6 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -37,17 +37,21 @@ void blk_mq_flush_busy_ctxs(struct blk_mq_hw_ctx *hctx, struct list_head *list); /* * Internal helpers for allocating/freeing the request map */ -void blk_mq_free_rq_map(struct blk_mq_tag_set *set, struct blk_mq_tags *tags, - unsigned int hctx_idx); -struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set, - unsigned int hctx_idx); +void blk_mq_free_rqs(struct blk_mq_tag_set *set, struct blk_mq_tags *tags, + unsigned int hctx_idx); +void blk_mq_free_rq_map(struct blk_mq_tags *tags); +struct blk_mq_tags *blk_mq_alloc_rq_map(struct blk_mq_tag_set *set, + unsigned int hctx_idx, + unsigned int nr_tags, + unsigned int reserved_tags); +int blk_mq_alloc_rqs(struct blk_mq_tag_set *set, struct blk_mq_tags *tags, + unsigned int hctx_idx, unsigned int depth); /* * Internal helpers for request insertion into sw queues */ void __blk_mq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq, bool at_head); - /* * CPU hotplug helpers */ |