From patchwork Tue Oct 13 12:52:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhaolei X-Patchwork-Id: 7384961 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2FAF39F4DD for ; Tue, 13 Oct 2015 12:54:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 581FA205F4 for ; Tue, 13 Oct 2015 12:54:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 64BA420787 for ; Tue, 13 Oct 2015 12:54:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752969AbbJMMyG (ORCPT ); Tue, 13 Oct 2015 08:54:06 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:49208 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752874AbbJMMyC (ORCPT ); Tue, 13 Oct 2015 08:54:02 -0400 X-IronPort-AV: E=Sophos;i="5.15,520,1432569600"; d="scan'208";a="101785230" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 13 Oct 2015 20:56:26 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id t9DCrVUN019612 for ; Tue, 13 Oct 2015 20:53:31 +0800 Received: from localhost.localdomain (10.167.226.114) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server id 14.3.181.6; Tue, 13 Oct 2015 20:53:58 +0800 From: Zhao Lei To: CC: Zhao Lei Subject: [PATCH 3/3] btrfs-progs: mkfs: Fix inaccurate mixed information Date: Tue, 13 Oct 2015 20:52:19 +0800 Message-ID: <5f474fe3bd4d26284ec1e01afa6355e523d7477e.1444740703.git.zhaolei@cn.fujitsu.com> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In current code, with a "BIG VOLUME" /dev/vdd2: # ./mkfs.btrfs -f -M /dev/vdd2 SMALL VOLUME: forcing mixed metadata/data groups ... This patch changed above output to: Using mixed metadata/data groups And the "SMALL VOLUME" output only when we exactly using SMALL VOLUME. Signed-off-by: Zhao Lei --- mkfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mkfs.c b/mkfs.c index 29cab13..0064a78 100644 --- a/mkfs.c +++ b/mkfs.c @@ -1505,7 +1505,10 @@ int main(int ac, char **av) ret = 0; } - if (!large_device_cnt || mixed) { + if (mixed) { + if (verbose) + printf("Using mixed metadata/data groups\n"); + } else if (!large_device_cnt) { if (verbose) printf("SMALL VOLUME: forcing mixed metadata/data groups\n"); mixed = 1;