blk-mq: use the I/O scheduler for writes from the flush state machine
authorBart Van Assche <bvanassche@acm.org>
Fri, 19 May 2023 04:40:47 +0000 (06:40 +0200)
committerJens Axboe <axboe@kernel.dk>
Sat, 20 May 2023 01:52:29 +0000 (19:52 -0600)
commitbe4c427809b0a746aff54dbb8ef663f0184291d0
treee10ee35815db073751165e2af27b2d777084e2a4
parent360f264834e34d08530c2fb9b67e3ffa65318761
blk-mq: use the I/O scheduler for writes from the flush state machine

Send write requests issued by the flush state machine through the normal
I/O submission path including the I/O scheduler (if present) so that I/O
scheduler policies are applied to writes with the FUA flag set.

Separate the I/O scheduler members from the flush members in struct
request since now a request may pass through both an I/O scheduler
and the flush machinery.

Note that the actual flush requests, which have no bio attached to the
request still bypass the I/O schedulers.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
[hch: rebased]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20230519044050.107790-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c
include/linux/blk-mq.h