From patchwork Wed Jan 16 11:27:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao Xie X-Patchwork-Id: 1987481 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B8410DF2A2 for ; Wed, 16 Jan 2013 11:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756690Ab3APL1p (ORCPT ); Wed, 16 Jan 2013 06:27:45 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:37120 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752938Ab3APL1o (ORCPT ); Wed, 16 Jan 2013 06:27:44 -0500 X-IronPort-AV: E=Sophos;i="4.84,479,1355068800"; d="scan'208";a="6600059" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 16 Jan 2013 19:24:36 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r0GBQevD032620; Wed, 16 Jan 2013 19:26:40 +0800 Received: from [10.167.225.199] ([10.167.225.199]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013011619255632-962322 ; Wed, 16 Jan 2013 19:25:56 +0800 Message-ID: <50F68E95.6070901@cn.fujitsu.com> Date: Wed, 16 Jan 2013 19:27:17 +0800 From: Miao Xie Reply-To: miaox@cn.fujitsu.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Linux Btrfs CC: Liu Bo Subject: [PATCH 1/2] Btrfs: fix wrong max device number for single profile X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/01/16 19:25:56, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/01/16 19:25:56, Serialize complete at 2013/01/16 19:25:56 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org The max device number of single profile is 1, not 0 (0 means 'as many as possible'). Fix it. Cc: Liu Bo Signed-off-by: Miao Xie Reviewed-by: Liu Bo --- fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 86279c3..7fa9773 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -3496,7 +3496,7 @@ struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES] = { { 1, 1, 2, 2, 2, 2 /* raid1 */ }, { 1, 2, 1, 1, 1, 2 /* dup */ }, { 1, 1, 0, 2, 1, 1 /* raid0 */ }, - { 1, 1, 0, 1, 1, 1 /* single */ }, + { 1, 1, 1, 1, 1, 1 /* single */ }, }; static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,