mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-26 00:00:31 +00:00
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 <auke.kok@versity.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user