Blame SOURCES/0033-fs-ntfs3-Change-how-module-init-info-messages-are-di.patch

Kmods SIG 8b815c
From 2e3a51b59ea26544303e168de8a0479915f09aa3 Mon Sep 17 00:00:00 2001
Kmods SIG 8b815c
From: Kari Argillander <kari.argillander@gmail.com>
Kmods SIG 8b815c
Date: Sun, 29 Aug 2021 17:42:39 +0300
Kmods SIG 8b815c
Subject: [Backport 2e3a51b59ea2] src: Change how module init/info
Kmods SIG 8b815c
 messages are displayed
Kmods SIG 8b815c
Kmods SIG 8b815c
Usually in file system init() messages are only displayed in info level.
Kmods SIG 8b815c
Change level from notice to info, but keep CONFIG_NTFS3_64BIT_CLUSTER in
Kmods SIG 8b815c
notice level. Also this need even more attention so let's put big
Kmods SIG 8b815c
warning here so that nobody will not try accidentally use it.
Kmods SIG 8b815c
Kmods SIG 8b815c
There is also no good reason to display internal stuff like binary tree
Kmods SIG 8b815c
search. This is always on option which can only disabled for debugging
Kmods SIG 8b815c
purposes by developer. Also this message does not even check if
Kmods SIG 8b815c
developer has disabled it or not so it is useless info.
Kmods SIG 8b815c
Kmods SIG 8b815c
Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
Kmods SIG 8b815c
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Kmods SIG 8b815c
---
Kmods SIG 8b815c
 src/super.c | 27 ++++++++-------------------
Kmods SIG 8b815c
 1 file changed, 8 insertions(+), 19 deletions(-)
Kmods SIG 8b815c
Kmods SIG 8b815c
diff --git a/src/super.c b/src/super.c
Kmods SIG 8b815c
index dbecf095da59268da2fede022b71cb2b40b2d909..55bbc9200a10ebdf3011e0a517eb44afd8a35f3f 100644
Kmods SIG 8b815c
--- a/src/super.c
Kmods SIG 8b815c
+++ b/src/super.c
Kmods SIG 8b815c
@@ -1448,21 +1448,14 @@ static int __init init_ntfs_fs(void)
Kmods SIG 8b815c
 {
Kmods SIG 8b815c
 	int err;
Kmods SIG 8b815c
 
Kmods SIG 8b815c
-	pr_notice("ntfs3: Index binary search\n");
Kmods SIG 8b815c
-	pr_notice("ntfs3: Hot fix free clusters\n");
Kmods SIG 8b815c
-	pr_notice("ntfs3: Max link count %u\n", NTFS_LINK_MAX);
Kmods SIG 8b815c
+	pr_info("ntfs3: Max link count %u\n", NTFS_LINK_MAX);
Kmods SIG 8b815c
 
Kmods SIG 8b815c
-#ifdef CONFIG_NTFS3_FS_POSIX_ACL
Kmods SIG 8b815c
-	pr_notice("ntfs3: Enabled Linux POSIX ACLs support\n");
Kmods SIG 8b815c
-#endif
Kmods SIG 8b815c
-#ifdef CONFIG_NTFS3_64BIT_CLUSTER
Kmods SIG 8b815c
-	pr_notice("ntfs3: Activated 64 bits per cluster\n");
Kmods SIG 8b815c
-#else
Kmods SIG 8b815c
-	pr_notice("ntfs3: Activated 32 bits per cluster\n");
Kmods SIG 8b815c
-#endif
Kmods SIG 8b815c
-#ifdef CONFIG_NTFS3_LZX_XPRESS
Kmods SIG 8b815c
-	pr_notice("ntfs3: Read-only LZX/Xpress compression included\n");
Kmods SIG 8b815c
-#endif
Kmods SIG 8b815c
+	if (IS_ENABLED(CONFIG_NTFS3_FS_POSIX_ACL))
Kmods SIG 8b815c
+		pr_info("ntfs3: Enabled Linux POSIX ACLs support\n");
Kmods SIG 8b815c
+	if (IS_ENABLED(CONFIG_NTFS3_64BIT_CLUSTER))
Kmods SIG 8b815c
+		pr_notice("ntfs3: Warning: Activated 64 bits per cluster. Windows does not support this\n");
Kmods SIG 8b815c
+	if (IS_ENABLED(CONFIG_NTFS3_LZX_XPRESS))
Kmods SIG 8b815c
+		pr_info("ntfs3: Read-only LZX/Xpress compression included\n");
Kmods SIG 8b815c
 
Kmods SIG 8b815c
 	err = ntfs3_init_bitmap();
Kmods SIG 8b815c
 	if (err)
Kmods SIG 8b815c
@@ -1502,15 +1495,11 @@ static void __exit exit_ntfs_fs(void)
Kmods SIG 8b815c
 
Kmods SIG 8b815c
 MODULE_LICENSE("GPL");
Kmods SIG 8b815c
 MODULE_DESCRIPTION("ntfs3 read/write filesystem");
Kmods SIG 8b815c
-MODULE_INFO(behaviour, "Index binary search");
Kmods SIG 8b815c
-MODULE_INFO(behaviour, "Hot fix free clusters");
Kmods SIG 8b815c
 #ifdef CONFIG_NTFS3_FS_POSIX_ACL
Kmods SIG 8b815c
 MODULE_INFO(behaviour, "Enabled Linux POSIX ACLs support");
Kmods SIG 8b815c
 #endif
Kmods SIG 8b815c
 #ifdef CONFIG_NTFS3_64BIT_CLUSTER
Kmods SIG 8b815c
-MODULE_INFO(cluster, "Activated 64 bits per cluster");
Kmods SIG 8b815c
-#else
Kmods SIG 8b815c
-MODULE_INFO(cluster, "Activated 32 bits per cluster");
Kmods SIG 8b815c
+MODULE_INFO(cluster, "Warning: Activated 64 bits per cluster. Windows does not support this");
Kmods SIG 8b815c
 #endif
Kmods SIG 8b815c
 #ifdef CONFIG_NTFS3_LZX_XPRESS
Kmods SIG 8b815c
 MODULE_INFO(compression, "Read-only lzx/xpress compression included");
Kmods SIG 8b815c
-- 
Kmods SIG 8b815c
2.31.1
Kmods SIG 8b815c