[dm-devel] [PATCH] multipathd: reduce log levels in cli_add_map()

Benjamin Marzinski bmarzins at redhat.com
Tue Mar 30 06:19:36 UTC 2021


On Mon, Mar 29, 2021 at 12:12:55PM +0200, mwilck at suse.com wrote:
> From: Martin Wilck <mwilck at suse.com>
> 
> Normally "add map" will be used to add a map which doesn't exist
> yet. Thus not finding this map in the first place is not a problem
> indicator and should be logged at level 3 only.
> 
Reviewed-by: Benjamin Marzinsk <bmarzins at redhat.com>

> Signed-off-by: Martin Wilck <mwilck at suse.com>
> ----
> Note: 
> 
> I've applied this patch to my "queue" branch by mistake already.
> I thought I'd posted it before. Sorry.
> 
> ---
>  multipathd/cli_handlers.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
> index 7f3e61f..1de6ad8 100644
> --- a/multipathd/cli_handlers.c
> +++ b/multipathd/cli_handlers.c
> @@ -852,14 +852,15 @@ cli_add_map (void * v, char ** reply, int * len, void * data)
>  	}
>  	do {
>  		if (dm_get_major_minor(param, &major, &minor) < 0)
> -			condlog(2, "%s: not a device mapper table", param);
> +			condlog(count ? 2 : 3,
> +				"%s: not a device mapper table", param);
>  		else {
>  			sprintf(dev_path, "dm-%d", minor);
>  			alias = dm_mapname(major, minor);
>  		}
>  		/*if there is no mapname found, we first create the device*/
>  		if (!alias && !count) {
> -			condlog(2, "%s: mapname not found for %d:%d",
> +			condlog(3, "%s: mapname not found for %d:%d",
>  				param, major, minor);
>  			get_refwwid(CMD_NONE, param, DEV_DEVMAP,
>  				    vecs->pathvec, &refwwid);
> -- 
> 2.30.1




More information about the dm-devel mailing list