From: "Benjamin Marzinski" <bmarzins@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Subject: [PATCH v2 3/7] libmultipath: cleanup orphan device states
Date: Mon, 13 Feb 2017 22:06:49 -0600 [thread overview]
Message-ID: <1487045213-15776-4-git-send-email-bmarzins@redhat.com> (raw)
In-Reply-To: <1487045213-15776-1-git-send-email-bmarzins@redhat.com>
After a path device is orphaned, multipathd stops checking its state.
However, multipathd show state still shows its old state. It should
display "undef unknown" instead.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/print.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmultipath/print.c b/libmultipath/print.c
index 5b03383..00a3626 100644
--- a/libmultipath/print.c
+++ b/libmultipath/print.c
@@ -392,7 +392,7 @@ snprint_dev_t (char * buff, size_t len, struct path * pp)
static int
snprint_offline (char * buff, size_t len, struct path * pp)
{
- if (!pp)
+ if (!pp || !pp->mpp)
return snprintf(buff, len, "unknown");
else if (pp->offline)
return snprintf(buff, len, "offline");
@@ -403,7 +403,7 @@ snprint_offline (char * buff, size_t len, struct path * pp)
static int
snprint_chk_state (char * buff, size_t len, struct path * pp)
{
- if (!pp)
+ if (!pp || !pp->mpp)
return snprintf(buff, len, "undef");
switch (pp->state) {
--
1.8.3.1
next prev parent reply other threads:[~2017-02-14 4:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 4:06 [PATCH v2 0/7] misc patches Benjamin Marzinski
2017-02-14 4:06 ` [PATCH v2 1/7] kpartx: don't keep creating recursive partitions Benjamin Marzinski
2017-02-14 4:06 ` [PATCH v2 2/7] libmultipath: add detect_checker option Benjamin Marzinski
2017-02-14 15:40 ` Hannes Reinecke
2017-02-14 4:06 ` Benjamin Marzinski [this message]
2017-02-14 4:06 ` [PATCH v2 4/7] multipathd: don't update priority of failed paths Benjamin Marzinski
2017-02-14 4:06 ` [PATCH v2 5/7] multipathd: add messages on delayed path addition Benjamin Marzinski
2017-02-14 4:06 ` [PATCH v2 6/7] multipathd: allow resetting stats Benjamin Marzinski
2017-02-14 4:06 ` [PATCH v2 7/7] fix udev rules for failed multipath devices 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=1487045213-15776-4-git-send-email-bmarzins@redhat.com \
--to=bmarzins@redhat.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.