From: Martin Wilck <mwi...@suse.com>

In a follow up patch, we will set INIT_MISSING_UDEV and set tick=1
(minimal) at the same time. In this case, which is new, check_path()
must reset the delay when it first triggers an uevent.

Signed-off-by: Martin Wilck <mwi...@suse.com>
---
 multipathd/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/multipathd/main.c b/multipathd/main.c
index 7b2d320..0cd0ee6 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -2019,6 +2019,7 @@ check_path (struct vectors * vecs, struct path * pp, 
unsigned int ticks)
        int disable_reinstate = 0;
        int oldchkrstate = pp->chkrstate;
        int retrigger_tries, verbosity;
+       unsigned int retrigger_delay;
        unsigned int checkint, max_checkint;
        struct config *conf;
        int marginal_pathgroups, marginal_changed = 0;
@@ -2036,6 +2037,7 @@ check_path (struct vectors * vecs, struct path * pp, 
unsigned int ticks)
 
        conf = get_multipath_config();
        retrigger_tries = conf->retrigger_tries;
+       retrigger_delay = conf->retrigger_delay;
        checkint = conf->checkint;
        max_checkint = conf->max_checkint;
        verbosity = conf->verbosity;
@@ -2048,6 +2050,8 @@ check_path (struct vectors * vecs, struct path * pp, 
unsigned int ticks)
        };
 
        if (!pp->mpp && pp->initialized == INIT_MISSING_UDEV) {
+               if (pp->tick != retrigger_delay)
+                       pp->tick = conf->retrigger_delay;
                if (pp->retriggers < retrigger_tries) {
                        condlog(2, "%s: triggering change event to 
reinitialize",
                                pp->dev);
-- 
2.26.2


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to