From: Hannes Reinecke <hare@suse.de>
To: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: dm-devel@redhat.com
Subject: [PATCH 01/13] Improve logging for orphan_path()
Date: Fri, 15 Nov 2013 11:29:32 +0100 [thread overview]
Message-ID: <1384511384-27642-2-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1384511384-27642-1-git-send-email-hare@suse.de>
orphan_path() is called from various sections, so add a
description to the call to aid debugging.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
libmultipath/configure.c | 4 ++--
libmultipath/structs_vec.c | 6 +++---
libmultipath/structs_vec.h | 2 +-
multipathd/main.c | 5 +++--
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 7f5e065..aad3c9f 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -518,7 +518,7 @@ coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, int force_r
/* 1. if path has no unique id or wwid blacklisted */
if (memcmp(empty_buff, pp1->wwid, WWID_SIZE) == 0 ||
filter_path(conf, pp1) > 0) {
- orphan_path(pp1);
+ orphan_path(pp1, "wwid blacklisted");
continue;
}
@@ -528,7 +528,7 @@ coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, int force_r
/* 3. if path has disappeared */
if (!pp1->size) {
- orphan_path(pp1);
+ orphan_path(pp1, "invalid size");
continue;
}
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index 993d3e0..14ea1c7 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -77,8 +77,9 @@ adopt_paths (vector pathvec, struct multipath * mpp, int get_info)
}
extern void
-orphan_path (struct path * pp)
+orphan_path (struct path * pp, const char *reason)
{
+ condlog(3, "%s: orphan path, %s", pp->dev, reason);
pp->mpp = NULL;
pp->dmstate = PSTATE_UNDEF;
pp->uid_attribute = NULL;
@@ -98,8 +99,7 @@ orphan_paths (vector pathvec, struct multipath * mpp)
vector_foreach_slot (pathvec, pp, i) {
if (pp->mpp == mpp) {
- condlog(4, "%s: orphaned", pp->dev);
- orphan_path(pp);
+ orphan_path(pp, "map flushed");
}
}
}
diff --git a/libmultipath/structs_vec.h b/libmultipath/structs_vec.h
index a907e85..c6278ac 100644
--- a/libmultipath/structs_vec.h
+++ b/libmultipath/structs_vec.h
@@ -17,7 +17,7 @@ void set_no_path_retry(struct multipath *mpp);
int adopt_paths (vector pathvec, struct multipath * mpp, int get_info);
void orphan_paths (vector pathvec, struct multipath * mpp);
-void orphan_path (struct path * pp);
+void orphan_path (struct path * pp, const char *reason);
int verify_paths(struct multipath * mpp, struct vectors * vecs, vector rpvec);
int update_mpp_paths(struct multipath * mpp, vector pathvec);
diff --git a/multipathd/main.c b/multipathd/main.c
index 8681aa2..91d7bfc 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -139,6 +139,7 @@ coalesce_maps(struct vectors *vecs, vector nmpv)
int j;
vector_foreach_slot (ompv, ompp, i) {
+ condlog(3, "%s: coalesce map", ompp->alias);
if (!find_mp_by_wwid(nmpv, ompp->wwid)) {
/*
* remove all current maps not allowed by the
@@ -229,7 +230,7 @@ flush_map(struct multipath * mpp, struct vectors * vecs)
}
else {
dm_lib_release();
- condlog(2, "%s: devmap removed", mpp->alias);
+ condlog(2, "%s: map flushed", mpp->alias);
}
orphan_paths(vecs->pathvec, mpp);
@@ -561,7 +562,7 @@ rescan:
fail_map:
remove_map(mpp, vecs, 1);
fail:
- orphan_path(pp);
+ orphan_path(pp, "failed to add path");
return 1;
}
--
1.8.1.4
next prev parent reply other threads:[~2013-11-15 10:29 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 10:29 [PATCH 00/13] systemd integraion Hannes Reinecke
2013-11-15 10:29 ` Hannes Reinecke [this message]
2013-11-15 10:29 ` [PATCH 02/13] Set priority to '0' for PATH_BLOCKED or PATH_DOWN Hannes Reinecke
2013-11-15 10:29 ` [PATCH 03/13] libmultipath: fixup strlcpy Hannes Reinecke
2013-11-15 10:29 ` [PATCH 04/13] libmultipath: return error numbers from sysfs_get_XXX Hannes Reinecke
2013-11-17 17:34 ` Christophe Varoqui
2013-11-18 6:51 ` Hannes Reinecke
2013-11-15 10:29 ` [PATCH 05/13] libmultipath: do not stall on recv_packet() Hannes Reinecke
2013-11-15 10:29 ` [PATCH 06/13] multipathd: switch to socket activation for systemd Hannes Reinecke
2013-11-15 10:29 ` [PATCH 07/13] multipathd: use sd_notify() to inform systemd Hannes Reinecke
2013-11-15 10:29 ` [PATCH 08/13] multipathd: Add option '-s' to suppress timestamps Hannes Reinecke
2013-11-15 10:29 ` [PATCH 09/13] multipathd: Implement systemd watchdog integration Hannes Reinecke
2013-11-22 22:17 ` Benjamin Marzinski
2013-11-25 7:50 ` Hannes Reinecke
2013-11-25 16:21 ` Hannes Reinecke
2013-11-15 10:29 ` [PATCH 10/13] multipathd: enable core dumps for systemd Hannes Reinecke
2013-11-15 10:29 ` [PATCH 11/13] multipathd: Read environment variables from systemd Hannes Reinecke
2013-11-15 10:29 ` [PATCH 12/13] multipathd: measure path check time Hannes Reinecke
2013-11-15 10:29 ` [PATCH 13/13] multipathd: no_map_shutdown option Hannes Reinecke
2013-11-21 23:17 ` Benjamin Marzinski
2013-11-22 9:12 ` Hannes Reinecke
2013-11-22 9:30 ` Christophe Varoqui
2013-11-22 10:04 ` Hannes Reinecke
2013-11-22 10:11 ` Christophe Varoqui
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=1384511384-27642-2-git-send-email-hare@suse.de \
--to=hare@suse.de \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.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.