All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@suse.com>
To: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: dm-devel@redhat.com, Xose Vazquez Perez <xose.vazquez@gmail.com>,
	Martin Wilck <mwilck@suse.com>
Subject: [PATCH 11/28] libmultipath: add debug messages to hwentry lookup/merging code
Date: Fri,  8 Jun 2018 12:20:24 +0200	[thread overview]
Message-ID: <20180608102041.22904-12-mwilck@suse.com> (raw)
In-Reply-To: <20180608102041.22904-1-mwilck@suse.com>

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/config.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/libmultipath/config.c b/libmultipath/config.c
index d2812e4a..9e2f166f 100644
--- a/libmultipath/config.c
+++ b/libmultipath/config.c
@@ -103,6 +103,16 @@ out:
 	return retval;
 }
 
+static void _log_match(const char *fn, const struct hwentry *h,
+		       const char *vendor, const char *product,
+		       const char *revision)
+{
+	condlog(4, "%s: found match /%s:%s:%s/ for '%s:%s:%s'", fn,
+		h->vendor, h->product, h->revision,
+		vendor, product, revision);
+}
+#define log_match(h, v, p, r) _log_match(__func__, (h), (v), (p), (r))
+
 struct hwentry *
 find_hwe (const struct _vector *hwtable,
 	  const char * vendor, const char * product, const char * revision)
@@ -120,6 +130,7 @@ find_hwe (const struct _vector *hwtable,
 		if (hwe_regmatch(tmp, vendor, product, revision))
 			continue;
 		ret = tmp;
+		log_match(tmp, vendor, product, revision);
 		break;
 	}
 	return ret;
@@ -457,8 +468,13 @@ restart:
 					 hwe2->product, hwe2->revision))
 				continue;
 			/* dup */
+			log_match(hwe1, hwe2->vendor,
+				  hwe2->product, hwe2->revision);
 			merge_hwe(hwe2, hwe1);
 			if (hwe_strmatch(hwe2, hwe1) == 0) {
+				condlog(4, "%s: removing hwentry %s:%s:%s",
+					__func__, hwe1->vendor, hwe1->product,
+					hwe1->revision);
 				vector_del_slot(hw, i);
 				free_hwe(hwe1);
 				n -= 1;
-- 
2.17.0

  parent reply	other threads:[~2018-06-08 10:20 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 10:20 [PATCH 00/28] multipath-tools: improve config file handling Martin Wilck
2018-06-08 10:20 ` [PATCH 01/28] kpartx: no need to use FREE_CONST Martin Wilck
2018-06-08 10:20 ` [PATCH 02/28] libmultipath: fix memory leak in process_config_dir() Martin Wilck
2018-06-08 10:20 ` [PATCH 03/28] libmultipath: remove superfluous conditionals in load_config() Martin Wilck
2018-06-08 10:20 ` [PATCH 04/28] libmultipath/structs.c: constify some functions Martin Wilck
2018-06-08 10:20 ` [PATCH 05/28] libmultipath: some const usage in hwentry handling Martin Wilck
2018-06-08 10:20 ` [PATCH 06/28] libmultipath: change prototypes of hwe_regmatch() and find_hwe() Martin Wilck
2018-06-08 10:20 ` [PATCH 07/28] libmultipath/prio: constify simple getters Martin Wilck
2018-06-08 10:20 ` [PATCH 08/28] tests/Makefile: autogenerate list of symbols to be wrapped Martin Wilck
2018-06-08 10:20 ` [PATCH 09/28] tests/test-lib: cmocka helpers to simulate path and map discovery Martin Wilck
2018-06-08 10:20 ` [PATCH 10/28] tests/hwtable: tests for config file handling and hwentry merging Martin Wilck
2018-06-08 10:20 ` Martin Wilck [this message]
2018-06-08 10:20 ` [PATCH 12/28] libmultipath: use vector for for pp->hwe and mp->hwe Martin Wilck
2018-06-08 10:20 ` [PATCH 13/28] libmultipath: allow more than one hwentry Martin Wilck
2018-06-08 10:20 ` [PATCH 14/28] libmultipath: don't merge hwentries by regex Martin Wilck
2018-06-08 10:20 ` [PATCH 15/28] libmultipath: merge hwentries inside a conf file Martin Wilck
2018-06-15 18:03   ` Benjamin Marzinski
2018-06-18  9:33     ` Martin Wilck
2018-06-18  9:54     ` [PATCH 29/30] tests/hwtable: add test for broken hwentry filtering Martin Wilck
2018-06-18  9:54       ` [PATCH 30/30] fixup "libmultipath: merge hwentries inside a conf file" Martin Wilck
2018-06-08 10:20 ` [PATCH 16/28] libmultipath/hwtable: remove inherited props from ONTAP NVMe Martin Wilck
2018-06-08 10:20 ` [PATCH 17/28] libmultipath: don't merge by regex in setup_default_blist() Martin Wilck
2018-06-08 10:20 ` [PATCH 18/28] multipath, multipathd: consolidate config dumping Martin Wilck
2018-06-08 10:20 ` [PATCH 19/28] tests/hwtable: implement configuration dump + reload test Martin Wilck
2018-06-08 10:20 ` [PATCH 20/28] libmultipath: allow dumping only "local" hwtable in snprint_config Martin Wilck
2018-06-08 10:20 ` [PATCH 21/28] tests/hwtable: add test for local configuration dump Martin Wilck
2018-06-08 10:20 ` [PATCH 22/28] libmultipath: allow printing local maps in snprint_config Martin Wilck
2018-06-08 10:20 ` [PATCH 23/28] multipathd: implement "show config local" Martin Wilck
2018-06-08 10:20 ` [PATCH 24/28] multipath: implement "multipath -T" Martin Wilck
2018-06-08 10:20 ` [PATCH 25/28] libmultipath: merge "multipath" config sections by wwid Martin Wilck
2018-06-08 10:20 ` [PATCH 26/28] libmultipath: implement and use blacklist merging Martin Wilck
2018-06-08 10:20 ` [PATCH 27/28] libmultipath: escape '"' chars while dumping config Martin Wilck
2018-06-08 10:20 ` [PATCH 28/28] multipath.conf(5): various corrections and clarifications Martin Wilck
2018-06-18 21:20 ` [PATCH 00/28] multipath-tools: improve config file handling Benjamin Marzinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180608102041.22904-12-mwilck@suse.com \
    --to=mwilck@suse.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@redhat.com \
    --cc=xose.vazquez@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.