summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason2008-04-04 21:40:00 +0200
committerChris Mason2008-09-25 17:04:01 +0200
commitd18a2c447524751137a12cc8ccaf9d1e0b7fa1b3 (patch)
treef331995fdac5f2550c8c3fccf74a94a66d642893 /fs/btrfs/disk-io.c
parentBtrfs: Don't allow written blocks from this transaction to be reallocated (diff)
downloadkernel-qcow2-linux-d18a2c447524751137a12cc8ccaf9d1e0b7fa1b3.tar.gz
kernel-qcow2-linux-d18a2c447524751137a12cc8ccaf9d1e0b7fa1b3.tar.xz
kernel-qcow2-linux-d18a2c447524751137a12cc8ccaf9d1e0b7fa1b3.zip
Btrfs: Fix allocation profile init
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 42522232fde4..bc5bd5abb28a 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -912,13 +912,10 @@ struct btrfs_root *open_ctree(struct super_block *sb,
btrfs_read_block_groups(extent_root);
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 |
- 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;
- }
+ fs_info->data_alloc_profile = (u64)-1;
+ fs_info->metadata_alloc_profile = (u64)-1;
+ fs_info->system_alloc_profile = fs_info->metadata_alloc_profile;
+
mutex_unlock(&fs_info->fs_mutex);
return tree_root;