On Tue, Jun 14, 2022 at 10:57:25AM -0700, Bart Van Assche wrote: > Since the introduction of blk_mq_get_hctx_type() the operation type in > the second argument of blk_mq_get_hctx_type() matters. Make sure that > a hardware queue of type HCTX_TYPE_DEFAULT is selected instead of a > hardware queue of type HCTX_TYPE_READ. > > Cc: Ming Lei <ming.lei@xxxxxxxxxx> > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> > --- > block/blk-mq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/blk-mq.c b/block/blk-mq.c > index e9bf950983c7..9b1518ef1aa1 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -2168,7 +2168,7 @@ static struct blk_mq_hw_ctx *blk_mq_get_sq_hctx(struct request_queue *q) > * just causes lock contention inside the scheduler and pointless cache > * bouncing. > */ > - struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, 0, ctx); > + struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, REQ_OP_WRITE, ctx); The change itself doesn't make a difference, since both results in choosing HCTX_TYPE_DEFAULT, but passing REQ_OP_WRITE is a bit misleading. Thanks, Ming