Lines Matching refs:hctx_idx
445 unsigned int op, blk_mq_req_flags_t flags, unsigned int hctx_idx) in blk_mq_alloc_request_hctx() argument
470 if (hctx_idx >= q->nr_hw_queues) in blk_mq_alloc_request_hctx()
482 data.hctx = q->queue_hw_ctx[hctx_idx]; in blk_mq_alloc_request_hctx()
2300 struct blk_mq_tags *tags, unsigned int hctx_idx) in blk_mq_clear_rq_mapping() argument
2302 struct blk_mq_tags *drv_tags = set->tags[hctx_idx]; in blk_mq_clear_rq_mapping()
2333 unsigned int hctx_idx) in blk_mq_free_rqs() argument
2345 set->ops->exit_request(set, rq, hctx_idx); in blk_mq_free_rqs()
2350 blk_mq_clear_rq_mapping(set, tags, hctx_idx); in blk_mq_free_rqs()
2375 unsigned int hctx_idx, in blk_mq_alloc_rq_map() argument
2383 node = blk_mq_hw_queue_to_node(&set->map[HCTX_TYPE_DEFAULT], hctx_idx); in blk_mq_alloc_rq_map()
2412 unsigned int hctx_idx, int node) in blk_mq_init_request() argument
2417 ret = set->ops->init_request(set, rq, hctx_idx, node); in blk_mq_init_request()
2427 unsigned int hctx_idx, unsigned int depth) in blk_mq_alloc_rqs() argument
2433 node = blk_mq_hw_queue_to_node(&set->map[HCTX_TYPE_DEFAULT], hctx_idx); in blk_mq_alloc_rqs()
2487 if (blk_mq_init_request(set, rq, hctx_idx, node)) { in blk_mq_alloc_rqs()
2499 blk_mq_free_rqs(set, tags, hctx_idx); in blk_mq_alloc_rqs()
2661 struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx) in blk_mq_exit_hctx() argument
2668 blk_mq_clear_flush_rq_mapping(set->tags[hctx_idx], in blk_mq_exit_hctx()
2671 set->ops->exit_request(set, flush_rq, hctx_idx); in blk_mq_exit_hctx()
2674 set->ops->exit_hctx(hctx, hctx_idx); in blk_mq_exit_hctx()
2713 struct blk_mq_hw_ctx *hctx, unsigned hctx_idx) in blk_mq_init_hctx() argument
2715 hctx->queue_num = hctx_idx; in blk_mq_init_hctx()
2722 hctx->tags = set->tags[hctx_idx]; in blk_mq_init_hctx()
2725 set->ops->init_hctx(hctx, set->driver_data, hctx_idx)) in blk_mq_init_hctx()
2728 if (blk_mq_init_request(set, hctx->fq->flush_rq, hctx_idx, in blk_mq_init_hctx()
2735 set->ops->exit_hctx(hctx, hctx_idx); in blk_mq_init_hctx()
2840 int hctx_idx) in __blk_mq_alloc_map_and_request() argument
2845 set->tags[hctx_idx] = blk_mq_alloc_rq_map(set, hctx_idx, in __blk_mq_alloc_map_and_request()
2847 if (!set->tags[hctx_idx]) in __blk_mq_alloc_map_and_request()
2850 ret = blk_mq_alloc_rqs(set, set->tags[hctx_idx], hctx_idx, in __blk_mq_alloc_map_and_request()
2855 blk_mq_free_rq_map(set->tags[hctx_idx], flags); in __blk_mq_alloc_map_and_request()
2856 set->tags[hctx_idx] = NULL; in __blk_mq_alloc_map_and_request()
2861 unsigned int hctx_idx) in blk_mq_free_map_and_requests() argument
2865 if (set->tags && set->tags[hctx_idx]) { in blk_mq_free_map_and_requests()
2866 blk_mq_free_rqs(set, set->tags[hctx_idx], hctx_idx); in blk_mq_free_map_and_requests()
2867 blk_mq_free_rq_map(set->tags[hctx_idx], flags); in blk_mq_free_map_and_requests()
2868 set->tags[hctx_idx] = NULL; in blk_mq_free_map_and_requests()
2874 unsigned int i, j, hctx_idx; in blk_mq_map_swqueue() local
2899 hctx_idx = set->map[j].mq_map[i]; in blk_mq_map_swqueue()
2901 if (!set->tags[hctx_idx] && in blk_mq_map_swqueue()
2902 !__blk_mq_alloc_map_and_request(set, hctx_idx)) { in blk_mq_map_swqueue()
3165 int hctx_idx, int node) in blk_mq_alloc_and_init_hctx() argument
3186 if (blk_mq_init_hctx(q, set, hctx, hctx_idx)) in blk_mq_alloc_and_init_hctx()