Skip to content

Commit

Permalink
blk-mq: provide dummy blk_mq_map_queue_type() helper
Browse files Browse the repository at this point in the history
Doesn't do anything right now, but it's needed as a prep patch
to get the interfaces right.

While in there, correct the blk_mq_map_queue() CPU type to an unsigned
int.

Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Jens Axboe committed Nov 7, 2018
1 parent ed76e32 commit ff2c566
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion block/blk-mq.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,20 @@ void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
extern int blk_mq_hw_queue_to_node(struct blk_mq_queue_map *qmap, unsigned int);

static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
int cpu)
unsigned int cpu)
{
struct blk_mq_tag_set *set = q->tag_set;

return q->queue_hw_ctx[set->map[0].mq_map[cpu]];
}

static inline struct blk_mq_hw_ctx *blk_mq_map_queue_type(struct request_queue *q,
unsigned int hctx_type,
unsigned int cpu)
{
return blk_mq_map_queue(q, cpu);
}

/*
* sysfs helpers
*/
Expand Down

0 comments on commit ff2c566

Please sign in to comment.