mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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>
This commit is contained in:
committed by
Jens Axboe
parent
360f264834
commit
be4c427809
@@ -169,25 +169,20 @@ struct request {
|
||||
void *completion_data;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Three pointers are available for the IO schedulers, if they need
|
||||
* more they have to dynamically allocate it. Flush requests are
|
||||
* never put on the IO scheduler. So let the flush fields share
|
||||
* space with the elevator data.
|
||||
* more they have to dynamically allocate it.
|
||||
*/
|
||||
union {
|
||||
struct {
|
||||
struct io_cq *icq;
|
||||
void *priv[2];
|
||||
} elv;
|
||||
struct {
|
||||
struct io_cq *icq;
|
||||
void *priv[2];
|
||||
} elv;
|
||||
|
||||
struct {
|
||||
unsigned int seq;
|
||||
struct list_head list;
|
||||
rq_end_io_fn *saved_end_io;
|
||||
} flush;
|
||||
};
|
||||
struct {
|
||||
unsigned int seq;
|
||||
struct list_head list;
|
||||
rq_end_io_fn *saved_end_io;
|
||||
} flush;
|
||||
|
||||
union {
|
||||
struct __call_single_data csd;
|
||||
|
Reference in New Issue
Block a user