From 97d9e17cec0b7d43a8b5f669f5c3aa84699e1aa1 Mon Sep 17 00:00:00 2001 From: Anand Jain Date: Tue, 17 Dec 2024 02:13:17 +0800 Subject: [PATCH] btrfs: modload to print RAID1 balancing status Modified the Btrfs loading message to include the RAID1 balancing status if the experimental feature is enabled. Signed-off-by: Anand Jain Signed-off-by: David Sterba --- fs/btrfs/super.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 97d1ef70708eed..df69d9f63d6bc7 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -2469,7 +2469,17 @@ static int __init btrfs_print_mod_info(void) ", fsverity=no" #endif ; + +#ifdef CONFIG_BTRFS_EXPERIMENTAL + if (btrfs_get_raid1_balancing() == NULL) + pr_info("Btrfs loaded%s\n", options); + else + pr_info("Btrfs loaded%s, raid1_balancing=%s\n", + options, btrfs_get_raid1_balancing()); +#else pr_info("Btrfs loaded%s\n", options); +#endif + return 0; }