Ming Lei b637108a40 blk-mq: fix filesystem I/O request allocation
submit_bio_checks() may update bio->bi_opf, so we have to initialize
blk_mq_alloc_data.cmd_flags with bio->bi_opf after submit_bio_checks()
returns when allocating new request.

In case of using cached request, fallback to allocate new request if
cached rq isn't compatible with the incoming bio, otherwise change
rq->cmd_flags with incoming bio->bi_opf.

Fixes: 900e080752025f00 ("block: move queue enter logic into blk_mq_submit_bio()")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-11-12 09:31:13 -07:00
..
2021-11-01 09:50:37 -07:00
2021-08-18 07:21:12 -06:00
2021-06-17 15:51:20 +02:00
2021-11-09 11:20:07 -08:00
2020-03-17 20:55:21 +01:00
2021-09-14 00:22:15 -04:00
2021-10-18 06:17:01 -06:00
2021-11-09 11:16:20 -08:00
2021-10-18 06:17:35 -06:00