diff options
author | Chris Mason <chris.mason@oracle.com> | 2010-12-15 16:00:23 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-04-22 14:52:40 -0400 |
commit | 7cd060deeac7828c8d0d7468d9c246d6c7ef77b2 (patch) | |
tree | 2ceb9339f21074be3cfacf840bc36496695dc284 /disk-io.c | |
parent | 375714fe1181d1cca400dcfbcdb4fc29c6dfa5d6 (diff) |
Fill missing devices so degraded filesystems can be read
When a device is missing, the btrfs tools need to be able to read alternate
copies from the remaining devices. This creates placeholder devices
that always return -EIO so the tools can limp along.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'disk-io.c')
-rw-r--r-- | disk-io.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -204,6 +204,7 @@ struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr, eb->dev_bytenr = multi->stripes[0].physical; kfree(multi); ret = read_extent_from_disk(eb); + if (ret == 0 && check_tree_block(root, eb) == 0 && csum_tree_block(root, eb, 1) == 0 && verify_parent_transid(eb->tree, eb, parent_transid) == 0) { |