summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2017-01-13 08:09:05 -0700
committerJens Axboe <axboe@fb.com>2017-01-17 10:03:59 -0700
commit4941115bef2bc891aa00a2f0edeaf06dc982325a (patch)
tree5f69e1404d076096cf0f00eac8859db627c6fcdb /block/blk-mq.h
parent2c3ad667902ef6f4b60ef0a3c6f7d8c2b007769a (diff)
downloadlinux-0-day-4941115bef2bc891aa00a2f0edeaf06dc982325a.tar.gz
linux-0-day-4941115bef2bc891aa00a2f0edeaf06dc982325a.tar.xz
blk-mq-tag: cleanup the normal/reserved tag allocation
This is in preparation for having another tag set available. Cleanup the parameters, and allow passing in of tags for blk_mq_put_tag(). Signed-off-by: Jens Axboe <axboe@fb.com> [hch: even more cleanups] Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Omar Sandoval <osandov@fb.com>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r--block/blk-mq.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h
index e59f5ca520a27..48b7771eb1922 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -118,6 +118,11 @@ static inline void blk_mq_set_alloc_data(struct blk_mq_alloc_data *data,
data->hctx = hctx;
}
+static inline struct blk_mq_tags *blk_mq_tags_from_data(struct blk_mq_alloc_data *data)
+{
+ return data->hctx->tags;
+}
+
/*
* Internal helpers for request allocation/init/free
*/