diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-07-11 18:12:37 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-02-01 14:22:07 -0500 |
commit | 4d48b96b280a76f29eb5d5f1578559932f551b2d (patch) | |
tree | c67db59d335759896fcb3c05d54f1a3232dd6471 /btrfs-map-logical.c | |
parent | 6f082141d0a608c286c3f1b42ddd558e72ea1d9f (diff) |
Add basic RAID[56] support
David Woodhouse originally contributed this code, and Chris Mason
changed it around to reflect the current design goals for raid56.
The original code expected all metadata and data writes to be full
stripes. This meant metadata block size == stripe size, and had a few
other restrictions.
This version allows metadata blocks smaller than the stripe size. It
implements both raid5 and raid6, although it does not have code to
rebuild from parity if one of the drives is missing or incorrect.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'btrfs-map-logical.c')
-rw-r--r-- | btrfs-map-logical.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c index fa4fb3f5..b9635f77 100644 --- a/btrfs-map-logical.c +++ b/btrfs-map-logical.c @@ -55,7 +55,8 @@ struct extent_buffer *debug_read_block(struct btrfs_root *root, u64 bytenr, length = blocksize; while (1) { ret = btrfs_map_block(&root->fs_info->mapping_tree, READ, - eb->start, &length, &multi, mirror_num); + eb->start, &length, &multi, + mirror_num, NULL); BUG_ON(ret); device = multi->stripes[0].dev; eb->fd = device->fd; @@ -68,7 +69,7 @@ struct extent_buffer *debug_read_block(struct btrfs_root *root, u64 bytenr, kfree(multi); if (!copy || mirror_num == copy) - ret = read_extent_from_disk(eb); + ret = read_extent_from_disk(eb, 0, eb->len); num_copies = btrfs_num_copies(&root->fs_info->mapping_tree, eb->start, eb->len); |