multipathd: reduce log levels in cli_add_map()
PATCH 1/1 multipathd: reduce log levels in cli_add_map()
From: Martin Wilck <[email protected]>
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.
----
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(-)
multipathd/cli_handlers.c +3 -2
@@ -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);
Signature · 7 lines
2.30.1 -- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel
Quoted 6 lines · On Mon, Mar 29, 2021 at 12:12:55PM +0200, [email protected] wrote:
From: Martin Wilck <[email protected]>
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.
Quoted 35 lines
Signed-off-by Martin Wilck <[email protected]>----
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(-)multipathd/cli_handlers.c +3
-2@@ -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);Signature · 1 line
2.30.1
--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel