block: don't inject fake timeouts on quiesced queues
PATCH 1/1 block: don't inject fake timeouts on quiesced queues
Injecting a fake block timeout error when the queue is QUIESCED, a hang can occur. The fix is to ingnore the request to fake a timeout id the queue is QUIESCED.
Signed-off-by Alan Adamson <[email protected]>
Reviewed-by Himanshu Madhani <[email protected]>
--- block/blk-timeout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
block/blk-timeout.c +4 -4
@@ -22,10 +22,10 @@ static int __init setup_fail_io_timeout(char *str)int 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 ); +if (test_bit (QUEUE_FLAG_FAIL_IO , &q->queue_flags) && + !blk_queue_quiesced (q)) +return should_fail (&fail_io_timeout,1 ); +return 0 ; }static int __init fail_io_timeout_debugfs (void )
Signature · 1 line
1.8.3.1