Merge tag 'nvme-5.13-2021-05-13' of git://git.infradead.org/nvme into block-5.13
[linux-2.6-microblaze.git] / block / kyber-iosched.c
index 33d34d6..81e3279 100644 (file)
@@ -478,7 +478,8 @@ static int kyber_init_hctx(struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx)
 
        for (i = 0; i < KYBER_NUM_DOMAINS; i++) {
                if (sbitmap_init_node(&khd->kcq_map[i], hctx->nr_ctx,
-                                     ilog2(8), GFP_KERNEL, hctx->numa_node)) {
+                                     ilog2(8), GFP_KERNEL, hctx->numa_node,
+                                     false, false)) {
                        while (--i >= 0)
                                sbitmap_free(&khd->kcq_map[i]);
                        goto err_kcqs;
@@ -560,11 +561,12 @@ static void kyber_limit_depth(unsigned int op, struct blk_mq_alloc_data *data)
        }
 }
 
-static bool kyber_bio_merge(struct blk_mq_hw_ctx *hctx, struct bio *bio,
+static bool kyber_bio_merge(struct request_queue *q, struct bio *bio,
                unsigned int nr_segs)
 {
+       struct blk_mq_ctx *ctx = blk_mq_get_ctx(q);
+       struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, bio->bi_opf, ctx);
        struct kyber_hctx_data *khd = hctx->sched_data;
-       struct blk_mq_ctx *ctx = blk_mq_get_ctx(hctx->queue);
        struct kyber_ctx_queue *kcq = &khd->kcqs[ctx->index_hw[hctx->type]];
        unsigned int sched_domain = kyber_sched_domain(bio->bi_opf);
        struct list_head *rq_list = &kcq->rq_list[sched_domain];