Skip to contentSkip to conversation

noise in target_core_register_fabric

DISCUSSION Olaf Hering 2 participants 4 messages Mar 4, 2015 – Mar 20, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Is there a need to fill dmesg with noise like shown below whenever targetcli-3.0 runs a command? I think the pr_err calls in those functions should be converted to pr_debug.

Olaf

.....

[ 1240.045518] target_core_register_fabric() trying autoload for fc
[ 1240.045520] target_core_get_fabric() failed for fc
[ 1240.045926] target_core_register_fabric() trying autoload for usb_gadget
[ 1240.045928] target_core_get_fabric() failed for usb_gadget
[ 1240.046236] target_core_register_fabric() trying autoload for vhost
[ 1240.046238] target_core_get_fabric() failed for vhost
[ 1240.062569] target_core_register_fabric() trying autoload for srpt
[ 1240.062571] target_core_get_fabric() failed for srpt
[ 1240.069610] target_core_register_fabric() trying autoload for qla2xxx
[ 1240.069613] target_core_get_fabric() failed for qla2xxx
[ 1240.076049] target_core_register_fabric() trying autoload for fc
[ 1240.076051] target_core_get_fabric() failed for fc
[ 1240.076465] target_core_register_fabric() trying autoload for usb_gadget
[ 1240.076467] target_core_get_fabric() failed for usb_gadget
[ 1240.076770] target_core_register_fabric() trying autoload for vhost
[ 1240.076772] target_core_get_fabric() failed for vhost
[ 1240.088177] target_core_register_fabric() trying autoload for srpt
[ 1240.088179] target_core_get_fabric() failed for srpt
[ 1240.097338] target_core_register_fabric() trying autoload for qla2xxx
[ 1240.097340] target_core_get_fabric() failed for qla2xxx
[ 1240.104335] target_core_register_fabric() trying autoload for fc
[ 1240.104338] target_core_get_fabric() failed for fc
[ 1240.104801] target_core_register_fabric() trying autoload for usb_gadget
[ 1240.104803] target_core_get_fabric() failed for usb_gadget
[ 1240.105182] target_core_register_fabric() trying autoload for vhost
[ 1240.105184] target_core_get_fabric() failed for vhost
[ 1240.237564] target_core_register_fabric() trying autoload for srpt
[ 1240.237567] target_core_get_fabric() failed for srpt
[ 1240.246394] target_core_register_fabric() trying autoload for qla2xxx
[ 1240.246396] target_core_get_fabric() failed for qla2xxx
[ 1240.252862] target_core_register_fabric() trying autoload for fc
[ 1240.252864] target_core_get_fabric() failed for fc
[ 1240.253303] target_core_register_fabric() trying autoload for usb_gadget
[ 1240.253305] target_core_get_fabric() failed for usb_gadget
[ 1240.253597] target_core_register_fabric() trying autoload for vhost
[ 1240.253599] target_core_get_fabric() failed for vhost
[ 1240.270028] target_core_register_fabric() trying autoload for srpt
[ 1240.270030] target_core_get_fabric() failed for srpt
[ 1240.277044] target_core_register_fabric() trying autoload for qla2xxx
[ 1240.277046] target_core_get_fabric() failed for qla2xxx
[ 1240.283666] target_core_register_fabric() trying autoload for fc
[ 1240.283669] target_core_get_fabric() failed for fc
[ 1240.284102] target_core_register_fabric() trying autoload for usb_gadget
[ 1240.284104] target_core_get_fabric() failed for usb_gadget

....

#1 lore raw
Quoted 4 lines · Olaf Hering

Is there a need to fill dmesg with noise like shown below whenever targetcli-3.0 runs a command? I think the pr_err calls in those functions should be converted to pr_debug.

Fair enough. Care to send out a patch for this..? ;)

--nab

#2 lore raw
In reply to Olaf Hering
Quoted 3 lines · Olaf Hering

Is there a need to fill dmesg with noise like shown below whenever targetcli-3.0 runs a command? I think the pr_err calls in those functions should be converted to pr_debug.

Any update on this?

Quoted 2 lines
[ 1240.045518] target_core_register_fabric() trying autoload for fc
[ 1240.045520] target_core_get_fabric() failed for fc

Olaf

#3 lore raw
Quoted 11 lines · Olaf Hering
Quoted 3 lines · Olaf Hering

Is there a need to fill dmesg with noise like shown below whenever targetcli-3.0 runs a command? I think the pr_err calls in those functions should be converted to pr_debug.

Any update on this?

Quoted 2 lines
[ 1240.045518] target_core_register_fabric() trying autoload for fc
[ 1240.045520] target_core_get_fabric() failed for fc

Hi Olaf,

Applying the following patch to target-pending/for-next.

Thank you,

--nab

Quoted 1 line

From 62554910a94a62f7b9b79cee3ca6bac95abe3c29 Mon Sep 17 00:00:00 2001

From: Nicholas Bellinger <[email protected]>
Date: Fri, 20 Mar 2015 11:36:50 -0700
Subject: [PATCH] target: Convert fabric module autoload failures to pr_debug

This patch converts the fabric module autoload failures from pr_err to pr_debug in target_core_register_fabric() code, to reduce the amount of noise during normal operation.

---
 drivers/target/target_core_configfs.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/target/target_core_configfs.c +8 -8
index 75d89ad..69baf1c 100644
@@ -142,8 +142,8 @@ static struct config_group *target_core_register_fabric(
 
 	tf = target_core_get_fabric(name);
 	if (!tf) {
-		pr_err("target_core_register_fabric() trying autoload for %s\n",
-			name);
+		pr_debug("target_core_register_fabric() trying autoload for %s\n",
+			 name);
 
 		/*
 		 * Below are some hardcoded request_module() calls to automatically
@@ -165,8 +165,8 @@ static struct config_group *target_core_register_fabric(
 			 */
 			ret = request_module("iscsi_target_mod");
 			if (ret < 0) {
-				pr_err("request_module() failed for"
-				       " iscsi_target_mod.ko: %d\n", ret);
+				pr_debug("request_module() failed for"
+				         " iscsi_target_mod.ko: %d\n", ret);
 				return ERR_PTR(-EINVAL);
 			}
 		} else if (!strncmp(name, "loopback", 8)) {
@@ -178,8 +178,8 @@ static struct config_group *target_core_register_fabric(
 			 */
 			ret = request_module("tcm_loop");
 			if (ret < 0) {
-				pr_err("request_module() failed for"
-				       " tcm_loop.ko: %d\n", ret);
+				pr_debug("request_module() failed for"
+				         " tcm_loop.ko: %d\n", ret);
 				return ERR_PTR(-EINVAL);
 			}
 		}
@@ -188,8 +188,8 @@ static struct config_group *target_core_register_fabric(
 	}
 
 	if (!tf) {
-		pr_err("target_core_get_fabric() failed for %s\n",
-		       name);
+		pr_debug("target_core_get_fabric() failed for %s\n",
+		         name);
 		return ERR_PTR(-EINVAL);
 	}
 	pr_debug("Target_Core_ConfigFS: REGISTER -> Located fabric:"