Skip to content

Commit

Permalink
btrfs: Moved repair code from inode.c to extent_io.c
Browse files Browse the repository at this point in the history
The raid-retry code in inode.c can be generalized so that it works for
metadata as well. Thus, this patch moves it to extent_io.c and makes the
raid-retry code a raid-repair code.

Repair works that way: Whenever a read error occurs and we have more
mirrors to try, note the failed mirror, and retry another. If we find a
good one, check if we did note a failure earlier and if so, do not allow
the read to complete until after the bad sector was written with the good
data we just fetched. As we have the extent locked while reading, no one
can change the data in between.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
  • Loading branch information
Jan Schmidt committed Sep 29, 2011
1 parent 2774b2c commit 4a54c8c
Show file tree
Hide file tree
Showing 3 changed files with 393 additions and 159 deletions.
Loading

0 comments on commit 4a54c8c

Please sign in to comment.