]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: deal with read errors on extent buffers differently
authorJosef Bacik <josef@redhat.com>
Tue, 27 Mar 2012 01:57:36 +0000 (21:57 -0400)
committerChris Mason <chris.mason@oracle.com>
Tue, 27 Mar 2012 01:57:36 +0000 (21:57 -0400)
commit171b51b7900dbc9fbfee81c83816b6202c992821
tree9905d556655ff0f036936ea51f9aa214bd2cbce8
parent8feac39c65bdf821f0e9d39b4357c7d5aa4aae3f
Btrfs: deal with read errors on extent buffers differently

Since we need to read and write extent buffers in their entirety we can't use
the normal bio_readpage_error stuff since it only works on a per page basis.  So
instead make it so that if we see an io error in endio we just mark the eb as
having an IO error and then in btree_read_extent_buffer_pages we will manually
try other mirrors and then overwrite the bad mirror if we find a good copy.
This works with larger than page size blocks.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h