aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-04-03 16:29:03 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:01 -0400
commit611f0e00a27fe0e5a571194a12443ecdc99a43ef (patch)
treed030bb63cca2aa1cb38c205bfe9fcef29cecb175 /fs/btrfs/disk-io.c
parent8790d502e4401a4a3a4175b83a3a47e8d595c771 (diff)
Btrfs: Add support for duplicate blocks on a single spindle
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index ff75ad58676..42522232fde 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -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;