From 23e2efcc44a3782f792cbcd6c624cc2b8235879d Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sep 01 2021 23:32:05 +0000 Subject: Refresh patch for disabling raid56 mode with fixes from Omar Sandoval --- diff --git a/SOURCES/1001-balance-mkfs-Disable-raid56-modes.patch b/SOURCES/1001-balance-mkfs-Disable-raid56-modes.patch index c601c6c..eb86c2b 100644 --- a/SOURCES/1001-balance-mkfs-Disable-raid56-modes.patch +++ b/SOURCES/1001-balance-mkfs-Disable-raid56-modes.patch @@ -1,6 +1,6 @@ -From da8af64d371e314acb2fec2052f1e1312822fb51 Mon Sep 17 00:00:00 2001 +From 9a260cc0355661947dbba6929412662ed6d71d31 Mon Sep 17 00:00:00 2001 From: Neal Gompa -Date: Fri, 14 May 2021 18:14:37 -0400 +Date: Wed, 1 Sep 2021 19:25:55 -0400 Subject: [PATCH] balance, mkfs: Disable raid56 modes The RAID 5/6 modes in Btrfs are not yet suitable for production use, @@ -8,12 +8,12 @@ so it is disabled. Signed-off-by: Neal Gompa --- - cmds/balance.c | 33 ++++----------------------------- + cmds/balance.c | 37 +++++-------------------------------- mkfs/main.c | 4 ++-- - 2 files changed, 6 insertions(+), 31 deletions(-) + 2 files changed, 7 insertions(+), 34 deletions(-) diff --git a/cmds/balance.c b/cmds/balance.c -index 33cbb91c..2e6c3b2d 100644 +index 33cbb91c..43ce19e8 100644 --- a/cmds/balance.c +++ b/cmds/balance.c @@ -503,8 +503,7 @@ static const char * const cmd_balance_start_usage[] = { @@ -34,10 +34,20 @@ index 33cbb91c..2e6c3b2d 100644 int i; memset(&args, 0, sizeof(args)); -@@ -646,33 +644,10 @@ static int cmd_balance_start(const struct cmd_struct *cmd, +@@ -634,8 +632,6 @@ static int cmd_balance_start(const struct cmd_struct *cmd, + + /* soft makes sense only when convert for corresponding type is set */ + for (i = 0; ptrs[i]; i++) { +- int delay = 10; +- + if ((ptrs[i]->flags & BTRFS_BALANCE_ARGS_SOFT) && + !(ptrs[i]->flags & BTRFS_BALANCE_ARGS_CONVERT)) { + error("'soft' option can be used only when converting profiles"); +@@ -645,34 +641,11 @@ static int cmd_balance_start(const struct cmd_struct *cmd, + if (!(ptrs[i]->flags & BTRFS_BALANCE_ARGS_CONVERT)) continue; - if (!(ptrs[i]->target & (BTRFS_BLOCK_GROUP_RAID6 | +- if (!(ptrs[i]->target & (BTRFS_BLOCK_GROUP_RAID6 | - BTRFS_BLOCK_GROUP_RAID5))) - continue; - @@ -63,8 +73,9 @@ index 33cbb91c..2e6c3b2d 100644 - printf("%2d", delay--); - fflush(stdout); - sleep(1); -+ BTRFS_BLOCK_GROUP_RAID5))) { -+ error("\tRAID5/6 support has known problems and is disabled.\n"); ++ if (ptrs[i]->target & (BTRFS_BLOCK_GROUP_RAID6 | ++ BTRFS_BLOCK_GROUP_RAID5)) { ++ error("RAID5/6 support has known problems and is disabled."); + return 1; } - printf("\nStarting conversion to RAID5/6.\n"); @@ -72,7 +83,7 @@ index 33cbb91c..2e6c3b2d 100644 if (!(start_flags & BALANCE_START_FILTERS) && !(start_flags & BALANCE_START_NOWARN)) { diff --git a/mkfs/main.c b/mkfs/main.c -index d2322faf..81519c6a 100644 +index eab93eb3..72cb8dc6 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -1190,8 +1190,8 @@ int BOX_MAIN(mkfs)(int argc, char **argv) @@ -81,7 +92,7 @@ index d2322faf..81519c6a 100644 features |= BTRFS_FEATURE_INCOMPAT_RAID56; - warning("RAID5/6 support has known problems is strongly discouraged\n" - "\t to be used besides testing or evaluation.\n"); -+ error("RAID5/6 support has known problems and is disabled.\n"); ++ error("RAID5/6 support has known problems and is disabled."); + exit(1); } diff --git a/SPECS/btrfs-progs.spec b/SPECS/btrfs-progs.spec index d249dba..8a66076 100644 --- a/SPECS/btrfs-progs.spec +++ b/SPECS/btrfs-progs.spec @@ -1,6 +1,6 @@ Name: btrfs-progs Version: 5.13.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Userspace programs for btrfs License: GPLv2 @@ -148,6 +148,9 @@ popd %{python3_sitearch}/btrfsutil-*.egg-info/ %changelog +* Wed Sep 01 2021 Neal Gompa - 5.13.1-2 +- Refresh patch for disabling raid56 mode with fixes from Omar Sandoval + * Tue Aug 10 2021 Omar Sandoval - 5.13.1-1 - Update to 5.13.1 for CentOS Hyperscale - Add Facebook-only patch to require extra flag for quota enable