blk-mq: make sure elevator callbacks aren't called for passthrough request
authorChristoph Hellwig <hch@lst.de>
Thu, 18 May 2023 05:31:01 +0000 (07:31 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 19 May 2023 01:42:54 +0000 (19:42 -0600)
commitdd6216bb16e83e349d5d987227328031b0b0d30d
treea0f848cac75d999c7fa488d387cfecbc67f3f5b1
parentfdcab6cddef24a26b86d798814b3c25057e53c21
blk-mq: make sure elevator callbacks aren't called for passthrough request

In case of q->elevator, passthrough request can still be marked as
RQF_ELV, so some elevator callbacks will be called for them.

Fix this by splitting RQF_SCHED_TAGS, which is set for all requests that
are issued on a queue that uses an I/O scheduler, and RQF_USE_SCHED for
non-flush, non-passthrough requests on such a queue.

Roughly based on two different patches from
Ming Lei <ming.lei@redhat.com>.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230518053101.760632-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-debugfs.c
block/blk-mq-sched.h
block/blk-mq.c
block/blk-mq.h
include/linux/blk-mq.h