borisb / rpms / btrfs-progs

Forked from rpms/btrfs-progs 2 years ago
Clone
cec386
From 5e76619fcda3d792b2cb188fc2d950c61d7ebf09 Mon Sep 17 00:00:00 2001
cec386
From: David Sterba <dsterba@suse.com>
cec386
Date: Tue, 21 Jul 2020 12:28:05 +0200
cec386
Subject: [PATCH 2/2] btrfs-progs: mkfs: switch to single as default profile
cec386
 for multiple-devices
cec386
cec386
The single profile is better suited as default for data on multiple
cec386
devices. Switch from RAID0 because:
cec386
cec386
- it's easier to convert to other profiles, as single consumes some
cec386
  chunks per device, but RAID0 has chunks on all devices regardless of
cec386
  the used space
cec386
cec386
- RAID0 has no redundancy and compared one disk failure affects many
cec386
  files due to striping, while with single the chances are a bit higher
cec386
  that complete files are stored on one device
cec386
cec386
- when the device sizes are not equal and not even close to equal, the
cec386
  maximum achievable size with RAID0 is size of the smallest device due
cec386
  to striping, with single it's the sum of all device sizes
cec386
cec386
The changed defaults could affect scripts and deployments that rely on
cec386
the old values, but given the number of possible profiles for multiple
cec386
devices let's hope that they're specified explicitly in majority of
cec386
cases.
cec386
cec386
Issue: #270
cec386
Signed-off-by: David Sterba <dsterba@suse.com>
cec386
(cherry picked from commit f1507716c67e2d6012f1e7a0f1538d4f669faa23)
cec386
---
cec386
 mkfs/common.h | 2 +-
cec386
 1 file changed, 1 insertion(+), 1 deletion(-)
cec386
cec386
diff --git a/mkfs/common.h b/mkfs/common.h
cec386
index 61969dcc..cc88db71 100644
cec386
--- a/mkfs/common.h
cec386
+++ b/mkfs/common.h
cec386
@@ -35,7 +35,7 @@
cec386
 #define BTRFS_MKFS_DEFAULT_META_ONE_DEVICE	BTRFS_BLOCK_GROUP_DUP
cec386
 #define BTRFS_MKFS_DEFAULT_META_ONE_DEVICE_SSD	0	/* SINGLE */
cec386
 
cec386
-#define BTRFS_MKFS_DEFAULT_DATA_MULTI_DEVICE	BTRFS_BLOCK_GROUP_RAID0
cec386
+#define BTRFS_MKFS_DEFAULT_DATA_MULTI_DEVICE	0	/* SINGLE */
cec386
 #define BTRFS_MKFS_DEFAULT_META_MULTI_DEVICE	BTRFS_BLOCK_GROUP_RAID1
cec386
 
cec386
 /*
cec386
-- 
cec386
2.26.2
cec386