mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-18 12:35:03 +00:00
Set BLOCK_BIT_ERROR on bio submit failure.
When block_submit_bio() fails, set BLOCK_BIT_ERROR so that waiters in wait_event(uptodate_or_error) will wake up rather than waiting indefinitely for a completion. Signed-off-by: Auke Kok <auke.kok@versity.com>
This commit is contained in:
@@ -624,8 +624,10 @@ static struct block_private *block_read(struct super_block *sb, u64 blkno)
|
||||
if (!test_bit(BLOCK_BIT_UPTODATE, &bp->bits) &&
|
||||
test_and_clear_bit(BLOCK_BIT_NEW, &bp->bits)) {
|
||||
ret = block_submit_bio(sb, bp, REQ_OP_READ);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
set_bit(BLOCK_BIT_ERROR, &bp->bits);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
wait_event(binf->waitq, uptodate_or_error(bp));
|
||||
|
||||
Reference in New Issue
Block a user