From: Hannes Reinecke <hare@suse.de>
To: Christophe Varoqui <christophe.varoqui@gmail.com>
Cc: dm-devel@redhat.com
Subject: [PATCH 06/29] libmultipath: Implement PATH_TIMEOUT
Date: Mon, 15 Jul 2013 15:00:07 +0200 [thread overview]
Message-ID: <1373893230-26077-7-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1373893230-26077-1-git-send-email-hare@suse.de>
The tur checker might run into a timeout, eg when a command is
sent but the checker hasn't been able to receive a reply in time.
Use a specific 'PATH_TIMEOUT' state for these cases.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
libmultipath/checkers.c | 3 ++-
libmultipath/checkers.h | 5 +++++
libmultipath/checkers/tur.c | 2 +-
libmultipath/discovery.c | 2 ++
libmultipath/print.c | 4 ++++
5 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c
index 01dafdd..47f5c68 100644
--- a/libmultipath/checkers.c
+++ b/libmultipath/checkers.c
@@ -16,7 +16,8 @@ char *checker_state_names[] = {
"up",
"shaky",
"ghost",
- "pending"
+ "pending",
+ "timeout",
};
static LIST_HEAD(checkers);
diff --git a/libmultipath/checkers.h b/libmultipath/checkers.h
index 5a96165..1b6c22d 100644
--- a/libmultipath/checkers.h
+++ b/libmultipath/checkers.h
@@ -46,6 +46,10 @@
* PATH_PENDING:
* - Use: All async checkers
* - Description: Indicates a check IO is in flight.
+ *
+ * PATH_TIMEOUT:
+ * - Use: Only tur checker
+ * - Description: Command timed out
*/
enum path_check_state {
PATH_WILD,
@@ -55,6 +59,7 @@ enum path_check_state {
PATH_SHAKY,
PATH_GHOST,
PATH_PENDING,
+ PATH_TIMEOUT,
PATH_MAX_STATE
};
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
index 9c141aa..6f5d4d9 100644
--- a/libmultipath/checkers/tur.c
+++ b/libmultipath/checkers/tur.c
@@ -297,7 +297,7 @@ libcheck_check (struct checker * c)
pthread_cancel(ct->thread);
ct->running = 0;
MSG(c, MSG_TUR_TIMEOUT);
- tur_status = PATH_DOWN;
+ tur_status = PATH_TIMEOUT;
ct->state = PATH_UNCHECKED;
} else {
condlog(3, "%d:%d: tur checker not finished",
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 04c6029..6af5083 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -1065,6 +1065,8 @@ pathinfo (struct path *pp, vector hwtable, int mask)
if (pp->state == PATH_UNCHECKED ||
pp->state == PATH_WILD)
goto blank;
+ if (pp->state == PATH_TIMEOUT)
+ pp->state = PATH_DOWN;
} else {
condlog(3, "%s: path inaccessible", pp->dev);
pp->chkrstate = pp->state = path_state;
diff --git a/libmultipath/print.c b/libmultipath/print.c
index 274f5e7..b6d08b7 100644
--- a/libmultipath/print.c
+++ b/libmultipath/print.c
@@ -335,6 +335,10 @@ snprint_chk_state (char * buff, size_t len, struct path * pp)
return snprintf(buff, len, "shaky");
case PATH_GHOST:
return snprintf(buff, len, "ghost");
+ case PATH_PENDING:
+ return snprintf(buff, len, "i/o pending");
+ case PATH_TIMEOUT:
+ return snprintf(buff, len, "i/o timeout");
default:
return snprintf(buff, len, "undef");
}
--
1.7.10.4
next prev parent reply other threads:[~2013-07-15 13:00 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-15 13:00 [PATCH 00/29] SLES resync Hannes Reinecke
2013-07-15 13:00 ` [PATCH 01/29] multipath: bind lifetime of udev context to main thread Hannes Reinecke
2013-07-15 13:00 ` [PATCH 02/29] Document 'infinity' as possible value for dev_loss_tmo Hannes Reinecke
2013-07-15 13:00 ` [PATCH 03/29] alua: Do not add preferred path priority for active/optimized Hannes Reinecke
2013-07-15 13:00 ` [PATCH 04/29] multipath: Increase dev_loss_tmo prior to fast_io_fail Hannes Reinecke
2013-07-15 13:00 ` [PATCH 05/29] libmultipath: return PATH_DOWN for quiesced paths Hannes Reinecke
2013-07-15 13:00 ` Hannes Reinecke [this message]
2013-07-15 13:00 ` [PATCH 07/29] Deprecate pg_timeout Hannes Reinecke
2013-07-15 13:00 ` [PATCH 08/29] kpartx: create correct symlinks for PATH_FAILED events Hannes Reinecke
2013-07-15 13:00 ` [PATCH 09/29] multipath: Deprecate 'getuid' configuration variable Hannes Reinecke
2013-07-15 13:00 ` [PATCH 10/29] kpartx: support disk with non-512B sectors Hannes Reinecke
2013-07-15 13:00 ` [PATCH 11/29] multipath: Add 'Datacore Virtual Disk' to internal hardware table Hannes Reinecke
2013-07-15 13:00 ` [PATCH 12/29] Minor fixes for priority handling Hannes Reinecke
2013-07-15 13:00 ` [PATCH 13/29] Check return value from pathinfo() Hannes Reinecke
2013-07-15 13:00 ` [PATCH 14/29] Read directly from sysfs when checking the device size Hannes Reinecke
2013-07-15 13:00 ` [PATCH 15/29] multipath.conf.annotated: Document rr_min_io_rq Hannes Reinecke
2013-07-15 13:00 ` [PATCH 16/29] Correctly print out 'max' for max_fds Hannes Reinecke
2013-07-15 13:00 ` [PATCH 17/29] Correctly set max_fds in case of failure Hannes Reinecke
2013-07-15 13:00 ` [PATCH 18/29] Update multipath.conf.defaults Hannes Reinecke
2013-07-15 13:00 ` [PATCH 19/29] Correctly set pgfailback Hannes Reinecke
2013-07-15 13:00 ` [PATCH 20/29] multipath.conf.5: clarify 'no_path_retry' default setting Hannes Reinecke
2013-07-15 13:00 ` [PATCH 21/29] multipath.conf.annotated: remove 'udev_dir' Hannes Reinecke
2013-07-15 13:00 ` [PATCH 22/29] multipath: Implement 'property' blacklist Hannes Reinecke
2013-07-15 13:00 ` [PATCH 23/29] Do not print error when rport is blocked Hannes Reinecke
2013-07-15 13:00 ` [PATCH 24/29] multipath: reference the udev context when starting event queue Hannes Reinecke
2013-07-15 13:00 ` [PATCH 25/29] multipathd: valgrind fixes Hannes Reinecke
2013-07-15 13:00 ` [PATCH 26/29] multipathd: increase stacksize for uevent listener Hannes Reinecke
2013-07-15 13:00 ` [PATCH 27/29] Specify checker_timeout in seconds Hannes Reinecke
2013-07-15 13:00 ` [PATCH 28/29] multipath: fix setting of fast_io_fail_tmo Hannes Reinecke
2013-07-15 13:00 ` [PATCH 29/29] multipath: reset queue_if_no_path if flush failed Hannes Reinecke
2013-07-15 13:53 ` [PATCH 00/29] SLES resync Sebastian Riemer
2013-07-15 14:12 ` Hannes Reinecke
2013-07-16 7:10 ` Hannes Reinecke
2013-07-16 9:20 ` Sebastian Riemer
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=1373893230-26077-7-git-send-email-hare@suse.de \
--to=hare@suse.de \
--cc=christophe.varoqui@gmail.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.