Skip to contentSkip to conversation

multipath: don't print so many add map messages

PATCH Applied Benjamin Marzinski 2 participants 2 messages Nov 12, 2011 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

PATCH 1/1 multipath: don't print so many add map messages

Whenever a dm device gets a change uevent, multipathd prints an add map message. This can get confusing for users, so change that message to not print at the default log level, and add a new message that only prints if multipathd will actually try to add a map

---
 multipathd/main.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
multipathd/main.c +2 -1
Index: multipath-tools-111111/multipathd/main.c
===================================================================
@@ -232,7 +232,7 @@ uev_add_map (struct uevent * uev, struct
 	char *alias;
 	int major = -1, minor = -1, rc;
 
-	condlog(2, "%s: add map (uevent)", uev->kernel);
+	condlog(3, "%s: add map (uevent)", uev->kernel);
 	alias = uevent_get_dm_name(uev);
 	if (!alias) {
 		condlog(3, "%s: No DM_NAME in uevent", uev->kernel);
@@ -280,6 +280,7 @@ ev_add_map (char * dev, char * alias, st
 		}
 		return 0;
 	}
+	condlog(2, "%s: adding map", alias);
 
 	/*
 	 * now we can register the map
#1 lore raw
Quoted 5 lines · Benjamin Marzinski

Whenever a dm device gets a change uevent, multipathd prints an add map message. This can get confusing for users, so change that message to not print at the default log level, and add a new message that only prints if multipathd will actually try to add a map

Applied.

Quoted 26 lines
---
 multipathd/main.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: multipath-tools-111111/multipathd/main.c
===================================================================

multipathd/main.c +2 -1
@@ -232,7 +232,7 @@ uev_add_map (struct uevent * uev, struct
 	char *alias;
 	int major = -1, minor = -1, rc;
 
-	condlog(2, "%s: add map (uevent)", uev->kernel);
+	condlog(3, "%s: add map (uevent)", uev->kernel);
 	alias = uevent_get_dm_name(uev);
 	if (!alias) {
 		condlog(3, "%s: No DM_NAME in uevent", uev->kernel);
@@ -280,6 +280,7 @@ ev_add_map (char * dev, char * alias, st
 		}
 		return 0;
 	}
+	condlog(2, "%s: adding map", alias);
 
 	/*
 	 * now we can register the map