Btrfs: Handle checksumming errors while reading data blocks

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason
2008-04-09 16:28:12 -04:00
parent f188591e98
commit 7e38326f5b
4 changed files with 126 additions and 1 deletions

View File

@@ -1534,6 +1534,15 @@ static int end_bio_extent_readpage(struct bio *bio,
if (ret)
uptodate = 0;
}
if (!uptodate && tree->ops &&
tree->ops->readpage_io_failed_hook) {
ret = tree->ops->readpage_io_failed_hook(bio, page,
start, end, state);
if (ret == 0) {
state = NULL;
continue;
}
}
spin_lock_irqsave(&tree->lock, flags);
if (!state || state->end != end) {