diff mbox series

[5/5] multipathd: decrease log level of uevent messages

Message ID 20180914125103.1154-5-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series [1/5] libmultipath: nvme: fix path detection for kernel 4.16 | expand

Commit Message

Martin Wilck Sept. 14, 2018, 12:51 p.m. UTC
The messages "multipathd: add path (uevent)" etc. are displayed
frequently, and often for devices that don't matter for multipathd.
If real action needs to be taken, such as adding or removing paths
or maps from the internal structures, multipathd emits other log
messages at level 2 later on.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 multipathd/main.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Benjamin Marzinski Sept. 21, 2018, 11 p.m. UTC | #1
On Fri, Sep 14, 2018 at 02:51:03PM +0200, Martin Wilck wrote:

I agree that these messages are largely useless for users, but I often
find them helpful to figure out what multipath was doing when things go
badly.  I'm not against this patch going in. I just wish that log there
was a log level between 2 and 3 that just included notifications about
what was happening, instead of having to go to level 3 to get the
information, which adds a lot of debugging noise. Any way

Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>

> The messages "multipathd: add path (uevent)" etc. are displayed
> frequently, and often for devices that don't matter for multipathd.
> If real action needs to be taken, such as adding or removing paths
> or maps from the internal structures, multipathd emits other log
> messages at level 2 later on.
> 
> Signed-off-by: Martin Wilck <mwilck@suse.com>
> ---
>  multipathd/main.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/multipathd/main.c b/multipathd/main.c
> index cc493c18..bc95c65f 100644
> --- a/multipathd/main.c
> +++ b/multipathd/main.c
> @@ -743,7 +743,7 @@ uev_remove_map (struct uevent * uev, struct vectors * vecs)
>  	int minor;
>  	struct multipath *mpp;
>  
> -	condlog(2, "%s: remove map (uevent)", uev->kernel);
> +	condlog(3, "%s: remove map (uevent)", uev->kernel);
>  	alias = uevent_get_dm_name(uev);
>  	if (!alias) {
>  		condlog(3, "%s: No DM_NAME in uevent, ignoring", uev->kernel);
> @@ -803,7 +803,7 @@ uev_add_path (struct uevent *uev, struct vectors * vecs, int need_do_map)
>  	int ret = 0, i;
>  	struct config *conf;
>  
> -	condlog(2, "%s: add path (uevent)", uev->kernel);
> +	condlog(3, "%s: add path (uevent)", uev->kernel);
>  	if (strstr(uev->kernel, "..") != NULL) {
>  		/*
>  		 * Don't allow relative device names in the pathvec
> @@ -911,7 +911,8 @@ ev_add_path (struct path * pp, struct vectors * vecs, int need_do_map)
>  	     (pathcount(mpp, PATH_GHOST) > 0 && pp->tpgs != TPGS_IMPLICIT &&
>  	      mpp->ghost_delay_tick <= 0))) {
>  		/* if wait_for_udev is set and valid paths exist */
> -		condlog(2, "%s: delaying path addition until %s is fully initialized", pp->dev, mpp->alias);
> +		condlog(3, "%s: delaying path addition until %s is fully initialized",
> +			pp->dev, mpp->alias);
>  		mpp->wait_for_udev = 2;
>  		orphan_path(pp, "waiting for create to complete");
>  		return 0;
> @@ -1038,7 +1039,7 @@ uev_remove_path (struct uevent *uev, struct vectors * vecs, int need_do_map)
>  	struct path *pp;
>  	int ret;
>  
> -	condlog(2, "%s: remove path (uevent)", uev->kernel);
> +	condlog(3, "%s: remove path (uevent)", uev->kernel);
>  	delete_foreign(uev->udev);
>  
>  	pthread_cleanup_push(cleanup_lock, &vecs->lock);
> -- 
> 2.18.0

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox series

Patch

diff --git a/multipathd/main.c b/multipathd/main.c
index cc493c18..bc95c65f 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -743,7 +743,7 @@  uev_remove_map (struct uevent * uev, struct vectors * vecs)
 	int minor;
 	struct multipath *mpp;
 
-	condlog(2, "%s: remove map (uevent)", uev->kernel);
+	condlog(3, "%s: remove map (uevent)", uev->kernel);
 	alias = uevent_get_dm_name(uev);
 	if (!alias) {
 		condlog(3, "%s: No DM_NAME in uevent, ignoring", uev->kernel);
@@ -803,7 +803,7 @@  uev_add_path (struct uevent *uev, struct vectors * vecs, int need_do_map)
 	int ret = 0, i;
 	struct config *conf;
 
-	condlog(2, "%s: add path (uevent)", uev->kernel);
+	condlog(3, "%s: add path (uevent)", uev->kernel);
 	if (strstr(uev->kernel, "..") != NULL) {
 		/*
 		 * Don't allow relative device names in the pathvec
@@ -911,7 +911,8 @@  ev_add_path (struct path * pp, struct vectors * vecs, int need_do_map)
 	     (pathcount(mpp, PATH_GHOST) > 0 && pp->tpgs != TPGS_IMPLICIT &&
 	      mpp->ghost_delay_tick <= 0))) {
 		/* if wait_for_udev is set and valid paths exist */
-		condlog(2, "%s: delaying path addition until %s is fully initialized", pp->dev, mpp->alias);
+		condlog(3, "%s: delaying path addition until %s is fully initialized",
+			pp->dev, mpp->alias);
 		mpp->wait_for_udev = 2;
 		orphan_path(pp, "waiting for create to complete");
 		return 0;
@@ -1038,7 +1039,7 @@  uev_remove_path (struct uevent *uev, struct vectors * vecs, int need_do_map)
 	struct path *pp;
 	int ret;
 
-	condlog(2, "%s: remove path (uevent)", uev->kernel);
+	condlog(3, "%s: remove path (uevent)", uev->kernel);
 	delete_foreign(uev->udev);
 
 	pthread_cleanup_push(cleanup_lock, &vecs->lock);