All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: dm-devel@redhat.com
Subject: [PATCH for multipath-tools] Handle SCSI device states "quiesce" and "transport-offline" properly
Date: Thu, 14 Feb 2013 15:17:28 +0100	[thread overview]
Message-ID: <511CF1F8.4040100@acm.org> (raw)

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 libmultipath/discovery.c |    5 +++--
 libmultipath/structs.h   |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 3fbc181..0b5fd1d 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -797,12 +797,13 @@ path_offline (struct path * pp)
 
 	condlog(3, "%s: path state = %s", pp->dev, buff);
 
-	if (!strncmp(buff, "offline", 7)) {
+	if (!strncmp(buff, "offline", 7) ||
+	    !strncmp(buff, "transport-offline", 17)) {
 		pp->offline = 1;
 		return PATH_DOWN;
 	}
 	pp->offline = 0;
-	if (!strncmp(buff, "blocked", 7))
+	if (!strncmp(buff, "blocked", 7) || !strncmp(buff, "quiesce", 7))
 		return PATH_PENDING;
 	else if (!strncmp(buff, "running", 7))
 		return PATH_UP;
diff --git a/libmultipath/structs.h b/libmultipath/structs.h
index ab05a78..b9ace36 100644
--- a/libmultipath/structs.h
+++ b/libmultipath/structs.h
@@ -20,7 +20,7 @@
 #define SCSI_VENDOR_SIZE	9
 #define SCSI_PRODUCT_SIZE	17
 #define SCSI_REV_SIZE		5
-#define SCSI_STATE_SIZE		9
+#define SCSI_STATE_SIZE		19
 
 #define NO_PATH_RETRY_UNDEF	0
 #define NO_PATH_RETRY_FAIL	-1
-- 
1.7.10.4

             reply	other threads:[~2013-02-14 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14 14:17 Bart Van Assche [this message]
2013-02-14 16:03 ` [PATCH for multipath-tools] Handle SCSI device states "quiesce" and "transport-offline" properly Mike Christie
2013-02-14 18:02 ` 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=511CF1F8.4040100@acm.org \
    --to=bvanassche@acm.org \
    --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.