Skip to contentSkip to conversation

block: don't inject fake timeouts on quiesced queues

PATCH New Alan Adamson 1 participant 1 message May 8, 2020 Block layer

lore
Share & tools
lore
#0 lore raw

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.

---
 block/blk-timeout.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
block/blk-timeout.c +4 -4
index 8aa68fae96ad..482a777295ba 100644
@@ -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