From patchwork Mon Apr 21 09:38:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Yang X-Patchwork-Id: 4023261 X-Patchwork-Delegate: dave@jikos.cz Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 84023BFF02 for ; Mon, 21 Apr 2014 09:39:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEE0E202C8 for ; Mon, 21 Apr 2014 09:39:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7AFBD201CE for ; Mon, 21 Apr 2014 09:39:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751286AbaDUJit (ORCPT ); Mon, 21 Apr 2014 05:38:49 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:34834 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751056AbaDUJio (ORCPT ); Mon, 21 Apr 2014 05:38:44 -0400 X-IronPort-AV: E=Sophos;i="4.97,895,1389715200"; d="scan'208";a="29515892" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 21 Apr 2014 17:36:15 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s3L9cfUP027011 for ; Mon, 21 Apr 2014 17:38:41 +0800 Received: from localhost.localdomain (10.167.226.47) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.146.2; Mon, 21 Apr 2014 17:38:44 +0800 From: Li Yang To: CC: Li Yang Subject: [PATCH] Btrfs-progs: mkfs: Remove 'zero_end =1' since it has been set to a value Date: Mon, 21 Apr 2014 05:38:08 -0400 Message-ID: <1398073088-40489-1-git-send-email-liyang.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-Originating-IP: [10.167.226.47] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 utils.c, zero_end is used as a parameter, should not force it to 1. In mkfs.c, zero_end is set to 1 or 0(-b) at the beginning, should not force it to 1 unconditionally. Signed-off-by: Li Yang --- mkfs.c | 1 - utils.c | 1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/mkfs.c b/mkfs.c index dbd83f5..f2b5779 100644 --- a/mkfs.c +++ b/mkfs.c @@ -1543,7 +1543,6 @@ int main(int ac, char **av) btrfs_register_one_device(file); - zero_end = 1; while (dev_cnt-- > 0) { int old_mixed = mixed; diff --git a/utils.c b/utils.c index 0bfb9d9..db5fdb3 100644 --- a/utils.c +++ b/utils.c @@ -616,7 +616,6 @@ int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret, } if (max_block_count) block_count = min(block_count, max_block_count); - zero_end = 1; if (block_count < 1024 * 1024 * 1024 && !(*mixed)) { printf("SMALL VOLUME: forcing mixed metadata/data groups\n");