btrfs: print read policy on module load
authorAnand Jain <anand.jain@oracle.com>
Wed, 1 Jan 2025 18:06:39 +0000 (02:06 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:21 +0000 (14:53 +0100)
Print the read read policy if set as module parameter (with
CONFIG_BTRFS_EXPERIMENTAL).

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c

index f310cfa0b5b45b85c64408303fc10a4c43af4aac..f809c3200c212f2acb40ec427c30a5e7b2c795e4 100644 (file)
@@ -2469,7 +2469,17 @@ static int __init btrfs_print_mod_info(void)
                        ", fsverity=no"
 #endif
                        ;
+
+#ifdef CONFIG_BTRFS_EXPERIMENTAL
+       if (btrfs_get_mod_read_policy() == NULL)
+               pr_info("Btrfs loaded%s\n", options);
+       else
+               pr_info("Btrfs loaded%s, read_policy=%s\n",
+                        options, btrfs_get_mod_read_policy());
+#else
        pr_info("Btrfs loaded%s\n", options);
+#endif
+
        return 0;
 }