diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2012-03-27 10:09:16 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2012-03-27 10:09:16 -0400 |
commit | e3176ca2769e420f64eba4b093bbddea6d7a89c3 (patch) | |
tree | efed61bf174579bdbef9dd8f0a88942286ca57ac /fs | |
parent | ea466794084f55d8fcc100711cf17923bf57e962 (diff) |
Btrfs: stop silently switching single chunks to raid0 on balance
This has been causing a lot of confusion for quite a while now and a lot
of users were surprised by this (some of them were even stuck in a
ENOSPC situation which they couldn't easily get out of). The addition
of restriper gives users a clear choice between raid0 and drive concat
setup so there's absolutely no excuse for us to keep doing this.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/extent-tree.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 1b831ac4c079..4269777f185e 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -6941,7 +6941,6 @@ static u64 update_block_group_flags(struct btrfs_root *root, u64 flags) | |||
6941 | if (flags & (BTRFS_BLOCK_GROUP_RAID1 | | 6941 | if (flags & (BTRFS_BLOCK_GROUP_RAID1 | |
6942 | BTRFS_BLOCK_GROUP_RAID10)) | 6942 | BTRFS_BLOCK_GROUP_RAID10)) |
6943 | return stripped | BTRFS_BLOCK_GROUP_DUP; | 6943 | return stripped | BTRFS_BLOCK_GROUP_DUP; |
6944 | return flags; | ||
6945 | } else { | 6944 | } else { |
6946 | /* they already had raid on here, just return */ | 6945 | /* they already had raid on here, just return */ |
6947 | if (flags & stripped) | 6946 | if (flags & stripped) |
@@ -6954,9 +6953,9 @@ static u64 update_block_group_flags(struct btrfs_root *root, u64 flags) | |||
6954 | if (flags & BTRFS_BLOCK_GROUP_DUP) | 6953 | if (flags & BTRFS_BLOCK_GROUP_DUP) |
6955 | return stripped | BTRFS_BLOCK_GROUP_RAID1; | 6954 | return stripped | BTRFS_BLOCK_GROUP_RAID1; |
6956 | 6955 | ||
6957 | /* turn single device chunks into raid0 */ | 6956 | /* this is drive concat, leave it alone */ |
6958 | return stripped | BTRFS_BLOCK_GROUP_RAID0; | ||
6959 | } | 6957 | } |
6958 | |||
6960 | return flags; | 6959 | return flags; |
6961 | } | 6960 | } |
6962 | 6961 | ||