diff mbox series

btrfs-progs: add a warning label for RAID5/6

Message ID bf9594ea55ce40af80548888070427ad97daf78a.1598374255.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: add a warning label for RAID5/6 | expand

Commit Message

Josef Bacik Aug. 25, 2020, 4:51 p.m. UTC
We all know there's some dark and scary corners with RAID5/6, but users
may not know.  Add a warning message in mkfs so anybody trying to use
this will know things can go very wrong.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 mkfs/main.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Johannes Thumshirn Aug. 31, 2020, 11:13 a.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Neal Gompa Sept. 2, 2020, 3:41 a.m. UTC | #2
On Tue, Aug 25, 2020 at 12:51 PM Josef Bacik <josef@toxicpanda.com> wrote:
>
> We all know there's some dark and scary corners with RAID5/6, but users
> may not know.  Add a warning message in mkfs so anybody trying to use
> this will know things can go very wrong.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
>  mkfs/main.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/mkfs/main.c b/mkfs/main.c
> index 0a4de617..0db24ad4 100644
> --- a/mkfs/main.c
> +++ b/mkfs/main.c
> @@ -1183,6 +1183,8 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
>         if ((data_profile | metadata_profile) &
>             (BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6)) {
>                 features |= BTRFS_FEATURE_INCOMPAT_RAID56;
> +               warning("RAID5/6 support is still experimental and has known "
> +                       "issues, do not rely on this for data you care about.\n");
>         }
>
>         if ((data_profile | metadata_profile) &
> --
> 2.24.1
>

This looks good to me. It's unfortunate that we need this, though...

Reviewed-by: Neal Gompa <ngompa13@gmail.com>
David Sterba March 3, 2021, 2:41 p.m. UTC | #3
On Tue, Aug 25, 2020 at 12:51:02PM -0400, Josef Bacik wrote:
> We all know there's some dark and scary corners with RAID5/6, but users
> may not know.  Add a warning message in mkfs so anybody trying to use
> this will know things can go very wrong.
> 
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
>  mkfs/main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mkfs/main.c b/mkfs/main.c
> index 0a4de617..0db24ad4 100644
> --- a/mkfs/main.c
> +++ b/mkfs/main.c
> @@ -1183,6 +1183,8 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
>  	if ((data_profile | metadata_profile) &
>  	    (BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6)) {
>  		features |= BTRFS_FEATURE_INCOMPAT_RAID56;
> +		warning("RAID5/6 support is still experimental and has known "
> +			"issues, do not rely on this for data you care about.\n");

I've reworded the message, calling it experimental after so many years
is a bit kappa. Also we'll need something in the docs for reference,
I'll write something.

>  	}
>  
>  	if ((data_profile | metadata_profile) &
> -- 
> 2.24.1
diff mbox series

Patch

diff --git a/mkfs/main.c b/mkfs/main.c
index 0a4de617..0db24ad4 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -1183,6 +1183,8 @@  int BOX_MAIN(mkfs)(int argc, char **argv)
 	if ((data_profile | metadata_profile) &
 	    (BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6)) {
 		features |= BTRFS_FEATURE_INCOMPAT_RAID56;
+		warning("RAID5/6 support is still experimental and has known "
+			"issues, do not rely on this for data you care about.\n");
 	}
 
 	if ((data_profile | metadata_profile) &