Re: [PATCH] multipathd: reduce log levels in cli_add_map()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 29, 2021 at 12:12:55PM +0200, mwilck@xxxxxxxx wrote:
> From: Martin Wilck <mwilck@xxxxxxxx>
> 
> 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@xxxxxxxxxx>

> Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
> ----
> 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

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux