All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Marzinski <bmarzins@redhat.com>
To: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>,
	Martin Wilck <mwilck@suse.com>
Subject: [PATCH v3 03/17] multipathd: cleanup marginal paths checking timers
Date: Sat, 30 Mar 2019 01:05:52 -0500	[thread overview]
Message-ID: <1553925966-20958-4-git-send-email-bmarzins@redhat.com> (raw)
In-Reply-To: <1553925966-20958-1-git-send-email-bmarzins@redhat.com>

When a path gets recovered in hit_io_err_recheck_time(), it will
continue running in check_path(), so there is no reason to schedule
another path check as soon as possible (since one is currently
happening).

Also, there isn't much point in restarting the io err stat checking when
the path is down, so hit_io_err_recheck_time() should only be run when
the path is up. Downed marginal paths can be treated just like any other
downed path.

Finally, there is no reason to set reset pp->io_err_dis_reinstate_time
when we decide to enqueue a path. Either th enqueue will fail and the
path will get recovered, or it will succeed, and we won't check the
reinstate time again until poll_io_err_stat() marks the path as needing
a requeue.

Reviewed-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 libmultipath/io_err_stat.c | 8 --------
 multipathd/main.c          | 3 ++-
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/libmultipath/io_err_stat.c b/libmultipath/io_err_stat.c
index 1cb3ffe..416e13a 100644
--- a/libmultipath/io_err_stat.c
+++ b/libmultipath/io_err_stat.c
@@ -400,13 +400,6 @@ int hit_io_err_recheck_time(struct path *pp)
 		io_err_stat_log(4, "%s: reschedule checking after %d seconds",
 				pp->dev,
 				pp->mpp->marginal_path_err_recheck_gap_time);
-		/*
-		 * to reschedule io error checking again
-		 * if the path is good enough, we claim it is good
-		 * and can be reinsated as soon as possible in the
-		 * check_path routine.
-		 */
-		pp->io_err_dis_reinstate_time = curr_time.tv_sec;
 		r = enqueue_io_err_stat_by_path(pp);
 		/*
 		 * Enqueue fails because of internal error.
@@ -426,7 +419,6 @@ int hit_io_err_recheck_time(struct path *pp)
 recover:
 	pp->io_err_pathfail_cnt = 0;
 	pp->io_err_disable_reinstate = 0;
-	pp->tick = 1;
 	return 0;
 }
 
diff --git a/multipathd/main.c b/multipathd/main.c
index fb520b6..fe6d8ef 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -2079,7 +2079,8 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)
 		return 1;
 	}
 
-	if (pp->io_err_disable_reinstate && hit_io_err_recheck_time(pp)) {
+	if ((newstate == PATH_UP || newstate == PATH_GHOST) &&
+	    pp->io_err_disable_reinstate && hit_io_err_recheck_time(pp)) {
 		pp->state = PATH_SHAKY;
 		/*
 		 * to reschedule as soon as possible,so that this path can
-- 
2.17.2

  parent reply	other threads:[~2019-03-30  6:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30  6:05 [PATCH v3 00/17] Misc Multipath patches Benjamin Marzinski
2019-03-30  6:05 ` [PATCH v3 01/17] BZ 1668693: disable user_friendly_names for NetApp Benjamin Marzinski
2019-03-30  6:05 ` [PATCH v3 02/17] libmultipath: handle existing paths in marginal_path enqueue Benjamin Marzinski
2019-03-30  6:05 ` Benjamin Marzinski [this message]
2019-03-30  6:05 ` [PATCH v3 04/17] libmultipath: fix marginal paths queueing errors Benjamin Marzinski
2019-03-30  6:05 ` [PATCH v3 05/17] libmultipath: fix marginal_paths nr_active check Benjamin Marzinski
2019-03-30  6:05 ` [PATCH v3 06/17] multipathd: Fix miscounting active paths Benjamin Marzinski
2019-03-30  6:05 ` [PATCH v3 07/17] multipathd: ignore failed wwid recheck Benjamin Marzinski
2019-04-01 14:32   ` Martin Wilck
2019-03-30  6:05 ` [PATCH v3 08/17] libmutipath: continue to use old state on PATH_PENDING Benjamin Marzinski
2019-03-30  6:05 ` [PATCH v3 09/17] multipathd: use update_path_groups instead of reload_map Benjamin Marzinski
2019-03-30  6:05 ` [PATCH v3 10/17] multipath.conf: add missing options to man page Benjamin Marzinski
2019-04-01 13:11   ` Martin Wilck
2019-03-30  6:06 ` [PATCH v3 11/17] libmultipath: add get_uid fallback code for NVMe devices Benjamin Marzinski
2019-03-30  6:06 ` [PATCH v3 12/17] libmulitpath: cleanup uid_fallback code Benjamin Marzinski
2019-04-01 13:26   ` Martin Wilck
2019-03-30  6:06 ` [PATCH v3 13/17] multipathd: handle changed wwids by removal and addition Benjamin Marzinski
2019-04-01 13:31   ` Martin Wilck
2019-03-30  6:06 ` [PATCH v3 14/17] multipathd: remove "wwid_changed" path attribute Benjamin Marzinski
2019-03-30  6:06 ` [PATCH v3 15/17] multipathd: ignore "disable_changed_wwids" Benjamin Marzinski
2019-03-30  6:06 ` [PATCH v3 16/17] multipathd: Don't use fallback code after getting wwid Benjamin Marzinski
2019-04-01 14:21   ` Martin Wilck
2019-03-30  6:06 ` [PATCH v3 17/17] libmultipath: silence dm_is_mpath error messages Benjamin Marzinski
2019-04-01 14:27   ` Martin Wilck

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=1553925966-20958-4-git-send-email-bmarzins@redhat.com \
    --to=bmarzins@redhat.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@redhat.com \
    --cc=mwilck@suse.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.