|
|
4728c8 |
---
|
|
|
4728c8 |
libmultipath/structs_vec.c | 24 +++++++++++++++++-------
|
|
|
4728c8 |
multipathd/main.c | 2 ++
|
|
|
4728c8 |
2 files changed, 19 insertions(+), 7 deletions(-)
|
|
|
4728c8 |
|
|
|
4728c8 |
Index: multipath-tools-130222/libmultipath/structs_vec.c
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/libmultipath/structs_vec.c
|
|
|
4728c8 |
+++ multipath-tools-130222/libmultipath/structs_vec.c
|
|
|
4728c8 |
@@ -312,24 +312,33 @@ update_multipath_strings (struct multipa
|
|
|
4728c8 |
extern void
|
|
|
4728c8 |
set_no_path_retry(struct multipath *mpp)
|
|
|
4728c8 |
{
|
|
|
4728c8 |
- mpp->retry_tick = 0;
|
|
|
4728c8 |
+ char is_queueing = 0;
|
|
|
4728c8 |
+
|
|
|
4728c8 |
mpp->nr_active = pathcount(mpp, PATH_UP) + pathcount(mpp, PATH_GHOST);
|
|
|
4728c8 |
- select_no_path_retry(mpp);
|
|
|
4728c8 |
+ if (mpp->features && strstr(mpp->features, "queue_if_no_path"))
|
|
|
4728c8 |
+ is_queueing = 1;
|
|
|
4728c8 |
|
|
|
4728c8 |
switch (mpp->no_path_retry) {
|
|
|
4728c8 |
case NO_PATH_RETRY_UNDEF:
|
|
|
4728c8 |
break;
|
|
|
4728c8 |
case NO_PATH_RETRY_FAIL:
|
|
|
4728c8 |
- dm_queue_if_no_path(mpp->alias, 0);
|
|
|
4728c8 |
+ if (is_queueing)
|
|
|
4728c8 |
+ dm_queue_if_no_path(mpp->alias, 0);
|
|
|
4728c8 |
break;
|
|
|
4728c8 |
case NO_PATH_RETRY_QUEUE:
|
|
|
4728c8 |
- dm_queue_if_no_path(mpp->alias, 1);
|
|
|
4728c8 |
+ if (!is_queueing)
|
|
|
4728c8 |
+ dm_queue_if_no_path(mpp->alias, 1);
|
|
|
4728c8 |
break;
|
|
|
4728c8 |
default:
|
|
|
4728c8 |
- dm_queue_if_no_path(mpp->alias, 1);
|
|
|
4728c8 |
- if (mpp->nr_active == 0) {
|
|
|
4728c8 |
+ if (mpp->nr_active > 0) {
|
|
|
4728c8 |
+ mpp->retry_tick = 0;
|
|
|
4728c8 |
+ if (!is_queueing)
|
|
|
4728c8 |
+ dm_queue_if_no_path(mpp->alias, 1);
|
|
|
4728c8 |
+ } else if (is_queueing && mpp->retry_tick == 0) {
|
|
|
4728c8 |
/* Enter retry mode */
|
|
|
4728c8 |
- mpp->retry_tick = mpp->no_path_retry * conf->checkint;
|
|
|
4728c8 |
+ mpp->stat_queueing_timeouts++;
|
|
|
4728c8 |
+ mpp->retry_tick = mpp->no_path_retry *
|
|
|
4728c8 |
+ conf->checkint + 1;
|
|
|
4728c8 |
condlog(1, "%s: Entering recovery mode: max_retries=%d",
|
|
|
4728c8 |
mpp->alias, mpp->no_path_retry);
|
|
|
4728c8 |
}
|
|
|
4728c8 |
@@ -360,6 +369,7 @@ __setup_multipath (struct vectors * vecs
|
|
|
4728c8 |
if (reset) {
|
|
|
4728c8 |
select_rr_weight(mpp);
|
|
|
4728c8 |
select_pgfailback(mpp);
|
|
|
4728c8 |
+ select_no_path_retry(mpp);
|
|
|
4728c8 |
set_no_path_retry(mpp);
|
|
|
4728c8 |
select_pg_timeout(mpp);
|
|
|
4728c8 |
select_flush_on_last_del(mpp);
|
|
|
4728c8 |
Index: multipath-tools-130222/multipathd/main.c
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/multipathd/main.c
|
|
|
4728c8 |
+++ multipath-tools-130222/multipathd/main.c
|
|
|
4728c8 |
@@ -1464,6 +1464,8 @@ check_path (struct vectors * vecs, struc
|
|
|
4728c8 |
if (!pp->mpp)
|
|
|
4728c8 |
return 0;
|
|
|
4728c8 |
|
|
|
4728c8 |
+ set_no_path_retry(pp->mpp);
|
|
|
4728c8 |
+
|
|
|
4728c8 |
if ((newstate == PATH_UP || newstate == PATH_GHOST) &&
|
|
|
4728c8 |
pp->io_err_disable_reinstate && need_io_err_check(pp)) {
|
|
|
4728c8 |
pp->state = PATH_SHAKY;
|