Btrfs: Add support for duplicate blocks on a single spindle

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason 2008-04-03 16:29:03 -04:00
parent 8790d502e4
commit 611f0e00a2
4 changed files with 37 additions and 9 deletions

View file

@ -913,9 +913,11 @@ struct btrfs_root *open_ctree(struct super_block *sb,
fs_info->generation = btrfs_super_generation(disk_super) + 1;
if (btrfs_super_num_devices(disk_super) > 0) {
fs_info->data_alloc_profile = BTRFS_BLOCK_GROUP_RAID0;
fs_info->metadata_alloc_profile = BTRFS_BLOCK_GROUP_RAID1;
fs_info->system_alloc_profile = BTRFS_BLOCK_GROUP_RAID0;
fs_info->data_alloc_profile = BTRFS_BLOCK_GROUP_RAID0 |
BTRFS_BLOCK_GROUP_RAID1;
fs_info->metadata_alloc_profile = BTRFS_BLOCK_GROUP_RAID1 |
BTRFS_BLOCK_GROUP_DUP;
fs_info->system_alloc_profile = fs_info->metadata_alloc_profile;
}
mutex_unlock(&fs_info->fs_mutex);
return tree_root;