diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/volumes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index c6c80093eac0..bf3bec3e4130 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -2198,9 +2198,9 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, | |||
2198 | min_stripes = 2; | 2198 | min_stripes = 2; |
2199 | } | 2199 | } |
2200 | if (type & (BTRFS_BLOCK_GROUP_RAID1)) { | 2200 | if (type & (BTRFS_BLOCK_GROUP_RAID1)) { |
2201 | num_stripes = min_t(u64, 2, fs_devices->rw_devices); | 2201 | if (fs_devices->rw_devices < 2) |
2202 | if (num_stripes < 2) | ||
2203 | return -ENOSPC; | 2202 | return -ENOSPC; |
2203 | num_stripes = 2; | ||
2204 | min_stripes = 2; | 2204 | min_stripes = 2; |
2205 | } | 2205 | } |
2206 | if (type & (BTRFS_BLOCK_GROUP_RAID10)) { | 2206 | if (type & (BTRFS_BLOCK_GROUP_RAID10)) { |