mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
blk-mq: move failure injection out of blk_mq_complete_request
Move the call to blk_should_fake_timeout out of blk_mq_complete_request and into the drivers, skipping call sites that are obvious error handlers, and remove the now superflous blk_mq_force_complete_rq helper. This ensures we don't keep injecting errors into completions that just terminate the Linux request after the hardware has been reset or the command has been aborted. Reviewed-by: Daniel Wagner <dwagner@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
d391a7a399
commit
15f73f5b3e
@@ -20,13 +20,11 @@ static int __init setup_fail_io_timeout(char *str)
|
||||
}
|
||||
__setup("fail_io_timeout=", setup_fail_io_timeout);
|
||||
|
||||
int blk_should_fake_timeout(struct request_queue *q)
|
||||
bool __blk_should_fake_timeout(struct request_queue *q)
|
||||
{
|
||||
if (!test_bit(QUEUE_FLAG_FAIL_IO, &q->queue_flags))
|
||||
return 0;
|
||||
|
||||
return should_fail(&fail_io_timeout, 1);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__blk_should_fake_timeout);
|
||||
|
||||
static int __init fail_io_timeout_debugfs(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user