]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: fix dispatch from sw queue
authorMing Lei <ming.lei@redhat.com>
Mon, 17 Dec 2018 15:44:05 +0000 (08:44 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 17 Dec 2018 18:19:54 +0000 (11:19 -0700)
commitf4c243d94853f425f5ab6ded9008e449a8f3aa8c
tree778a7ca836078f6cca15630f25b0d652320f5cb8
parent5dbd726e66bde71ebc329d729fc0378f062139b7
blk-mq: fix dispatch from sw queue

When a request is added to rq list of sw queue(ctx), the rq may be from
a different type of hctx, especially after multi queue mapping is
introduced.

So when dispach request from sw queue via blk_mq_flush_busy_ctxs() or
blk_mq_dequeue_from_ctx(), one request belonging to other queue type of
hctx can be dispatched to current hctx in case that read queue or poll
queue is enabled.

This patch fixes this issue by introducing per-queue-type list.

Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Changed by me to not use separately cacheline aligned lists, just
place them all in the same cacheline where we had just the one list
and lock before.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-debugfs.c
block/blk-mq-sched.c
block/blk-mq.c
block/blk-mq.h