]> git.baikalelectronics.ru Git - kernel.git/commit
null_blk: add option for managing IO timeouts
authorJens Axboe <axboe@kernel.dk>
Wed, 10 Jan 2018 16:06:23 +0000 (09:06 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Jan 2018 16:06:23 +0000 (09:06 -0700)
commit5f19c98f55f892324fdc65a5d8f663c2ea1df647
treed839ccb483b9697dcd12c4e89ae3f67f1d7351ad
parent091905fc1cc102bc0a24d61641ef135e10d30b60
null_blk: add option for managing IO timeouts

Use the fault injection framework to provide a way for null_blk
to configure timeouts. This only works for queue_mode 1 and 2,
since the bio mode doesn't have code for tracking timeouts.

Let's say you want to have a 10% chance of timing out every
100,000 requests, and for 5 total timeouts, you could do:

modprobe null_blk timeout="100000,10,0,5"

This is useful for adding blktests to test that IO timeouts
are handled appropriately.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/Kconfig
drivers/block/null_blk.c