From patchwork Thu Mar 24 15:56:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 8662321 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7AB84C0553 for ; Thu, 24 Mar 2016 15:56:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ABB30203B5 for ; Thu, 24 Mar 2016 15:56:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ACBCF203A1 for ; Thu, 24 Mar 2016 15:56:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751468AbcCXP4r (ORCPT ); Thu, 24 Mar 2016 11:56:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:51321 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750943AbcCXP4p (ORCPT ); Thu, 24 Mar 2016 11:56:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BCA37AB9D for ; Thu, 24 Mar 2016 15:56:43 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 75CB7DAB45; Thu, 24 Mar 2016 16:56:14 +0100 (CET) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH] btrfs-progs: mkfs: allow DUP on multidev fs, only warn Date: Thu, 24 Mar 2016 16:56:13 +0100 Message-Id: <1458834973-3199-1-git-send-email-dsterba@suse.com> X-Mailer: git-send-email 2.7.1 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 The DUP profile can work on multiple filesystems, the limitation is rather artificial. Let the user make the decision and print a warning. Signed-off-by: David Sterba --- utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils.c b/utils.c index eabc36dca7a1..9bc18d4508fc 100644 --- a/utils.c +++ b/utils.c @@ -2484,9 +2484,7 @@ int test_num_disk_vs_raid(u64 metadata_profile, u64 data_profile, if (dev_cnt > 1 && ((metadata_profile | data_profile) & BTRFS_BLOCK_GROUP_DUP)) { - fprintf(stderr, - "ERROR: DUP is not allowed when FS has multiple devices\n"); - return 1; + warning("DUP is not recommended on filesystem with multiple devices"); } if (metadata_profile & ~allowed) { fprintf(stderr,