From a46e70123d9ec35c678cd79e1715721072c756b7 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Wed, 15 Apr 2026 13:49:03 -0700 Subject: [PATCH] Warn on block read bio completion timeout Replace the unbounded wait_event() in block_read() with a 120 second timeout that issues a WARN if the bio completion never arrives. A lost completion would otherwise hang silently. Signed-off-by: Auke Kok --- kmod/src/block.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kmod/src/block.c b/kmod/src/block.c index 5999681d..64712b47 100644 --- a/kmod/src/block.c +++ b/kmod/src/block.c @@ -630,7 +630,9 @@ static struct block_private *block_read(struct super_block *sb, u64 blkno) } } - wait_event(binf->waitq, uptodate_or_error(bp)); + while (!wait_event_timeout(binf->waitq, uptodate_or_error(bp), 120 * HZ)) + WARN(1, "block read blkno %llu waiting for bio completion\n", + bp->bl.blkno); if (test_bit(BLOCK_BIT_ERROR, &bp->bits)) ret = -EIO; else