From b807e73c960ad4f4f8a3a901a1f61bf1c18c2531 Mon Sep 17 00:00:00 2001 From: Zhao Lei Date: Thu, 25 Mar 2010 12:32:59 +0000 Subject: [PATCH] --- yaml --- r: 189464 b: refs/heads/master c: f3eae7e8a5ed124bbc781e18ea10c21856017322 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/btrfs/volumes.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index b53e3bd60062..43c851a7c5e3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ab59381ea43f81c977cbd09add26950aaf6cb9fe +refs/heads/master: f3eae7e8a5ed124bbc781e18ea10c21856017322 diff --git a/trunk/fs/btrfs/volumes.c b/trunk/fs/btrfs/volumes.c index c6c80093eac0..bf3bec3e4130 100644 --- a/trunk/fs/btrfs/volumes.c +++ b/trunk/fs/btrfs/volumes.c @@ -2198,9 +2198,9 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, min_stripes = 2; } if (type & (BTRFS_BLOCK_GROUP_RAID1)) { - num_stripes = min_t(u64, 2, fs_devices->rw_devices); - if (num_stripes < 2) + if (fs_devices->rw_devices < 2) return -ENOSPC; + num_stripes = 2; min_stripes = 2; } if (type & (BTRFS_BLOCK_GROUP_RAID10)) {