linux-stable/drivers/block/null_blk
Damien Le Moal 63f8865970 block: null_blk: Fix handling of fake timeout request
When injecting a fake timeout into the null_blk driver using
fail_io_timeout, the request timeout handler does not execute
blk_mq_complete_request(), so the complete callback is never executed
for a timedout request.

The null_blk driver also has a driver-specific fake timeout mechanism
which does not have this problem. Fix the problem with fail_io_timeout
by using the same meachanism as null_blk internal timeout feature, using
the fake_timeout field of null_blk commands.

Reported-by: Akinobu Mita <akinobu.mita@gmail.com>
Fixes: de3510e52b ("null_blk: fix command timeout completion handling")
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20230314041106.19173-2-damien.lemoal@opensource.wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-03-15 06:50:23 -06:00
..
Kconfig null_blk: Move driver into its own directory 2020-12-07 17:36:04 -07:00
main.c block: null_blk: Fix handling of fake timeout request 2023-03-15 06:50:23 -06:00
Makefile null_blk: Move driver into its own directory 2020-12-07 17:36:04 -07:00
null_blk.h null_blk: support read-only and offline zone conditions 2022-12-01 14:49:48 -07:00
trace.c null_blk: Move driver into its own directory 2020-12-07 17:36:04 -07:00
trace.h treewide: Rename enum req_opf into enum req_op 2022-07-14 12:14:30 -06:00
zoned.c null_blk: support read-only and offline zone conditions 2022-12-01 14:49:48 -07:00