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

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