From: Benjamin Marzinski <bmarzins@redhat.com>
To: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>,
Martin Wilck <Martin.Wilck@suse.com>
Subject: [dm-devel] [RFC PATCH 1/4] libmultipath: don't bother to reset default timeout value
Date: Fri, 28 Jul 2023 14:05:52 -0500 [thread overview]
Message-ID: <1690571155-8283-2-git-send-email-bmarzins@redhat.com> (raw)
In-Reply-To: <1690571155-8283-1-git-send-email-bmarzins@redhat.com>
by the time get_state() is rechecking the sysfs timeout value,
c->timeout has already been set. The only reason why this check exists
is to deal with the possiblity that the sysfs value has changed. If the
sysfs value doesn't exist (which likely means that the device is not a
scsi device), then there's no reason to reset the default value, since
that can't have changed.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/discovery.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 5626d48d..2b1a11d5 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -1965,9 +1965,8 @@ get_state (struct path * pp, struct config *conf, int daemon, int oldstate)
checker_set_async(c);
else
checker_set_sync(c);
- if (!conf->checker_timeout &&
- sysfs_get_timeout(pp, &(c->timeout)) <= 0)
- c->timeout = DEF_TIMEOUT;
+ if (!conf->checker_timeout)
+ sysfs_get_timeout(pp, &(c->timeout));
state = checker_check(c, oldstate);
condlog(3, "%s: %s state = %s", pp->dev,
checker_name(c), checker_state_name(state));
--
2.17.2
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2023-07-28 19:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 19:05 [dm-devel] [RFC PATCH 0/4] Make prio timeouts work like checkers Benjamin Marzinski
2023-07-28 19:05 ` Benjamin Marzinski [this message]
2023-08-29 19:51 ` [dm-devel] [RFC PATCH 1/4] libmultipath: don't bother to reset default timeout value Martin Wilck
2023-07-28 19:05 ` [dm-devel] [RFC PATCH 2/4] libmultipath: make prioritizer timeouts work like checker timeouts Benjamin Marzinski
2023-07-28 19:05 ` [dm-devel] [RFC PATCH 3/4] libmultipath: fix timeouts for detect_alua() Benjamin Marzinski
2023-07-28 19:05 ` [dm-devel] [RFC PATCH 4/4] libmultipath: fix timeouts for path_latency prioritizer Benjamin Marzinski
2023-08-24 14:37 ` [dm-devel] [RFC PATCH 0/4] Make prio timeouts work like checkers Benjamin Marzinski
2023-08-29 20:34 ` Martin Wilck
2023-08-30 18:44 ` Benjamin Marzinski
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=1690571155-8283-2-git-send-email-bmarzins@redhat.com \
--to=bmarzins@redhat.com \
--cc=Martin.Wilck@suse.com \
--cc=christophe.varoqui@opensvc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox