On Wed, Jun 15, 2022 at 08:31:21AM +0800, Ming Lei wrote: > > - 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. Well, the argument is an operationm so we better pass in a correct operation (at some point we should look into a __bitwise annotation or similar to make it clean). And as 0 is REQ_OP_READ, we will end up with the HCTX_TYPE_READ hctx IFF someone configures read queues and uses an sq only schedule. Which is a completely stupid but possible setup.