diff mbox

btrfs-progs: mkfs: allow DUP on multidev fs, only warn

Message ID 1458834973-3199-1-git-send-email-dsterba@suse.com (mailing list archive)
State Accepted
Headers show

Commit Message

David Sterba March 24, 2016, 3:56 p.m. UTC
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 <dsterba@suse.com>
---
 utils.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Duncan March 25, 2016, 1:59 a.m. UTC | #1
David Sterba posted on Thu, 24 Mar 2016 16:56:13 +0100 as excerpted:

> 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 <dsterba@suse.com>
> ---

I like the change, but typo in the commit comment... What filesystems 
other than btrfs allow DUP? =:^)  It's correct in the posting subject.
Hugo Mills March 25, 2016, 3:58 a.m. UTC | #2
On Fri, Mar 25, 2016 at 01:59:20AM +0000, Duncan wrote:
> David Sterba posted on Thu, 24 Mar 2016 16:56:13 +0100 as excerpted:
> 
> > 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 <dsterba@suse.com>
> > ---
> 
> I like the change, but typo in the commit comment... What filesystems 
> other than btrfs allow DUP? =:^)  It's correct in the posting subject.

   Class/instance problem. :)

   Is that class of filesystems, btrfs, or instance of a btrfs
filesystem? "Filesystem" covers both cases.

   Hugo, Ontologist(*).

(*) Yes, that's actually my job title these days.
diff mbox

Patch

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,