From: Martin Wilck <martin.wilck@suse.com>
To: "bmarzins@redhat.com" <bmarzins@redhat.com>,
"christophe.varoqui@opensvc.com" <christophe.varoqui@opensvc.com>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: Re: [dm-devel] [RFC PATCH 1/4] libmultipath: don't bother to reset default timeout value
Date: Tue, 29 Aug 2023 19:51:49 +0000 [thread overview]
Message-ID: <86abcd0775e43b2bec01a73b6e1697d021e02763.camel@suse.com> (raw)
In-Reply-To: <1690571155-8283-2-git-send-email-bmarzins@redhat.com>
On Fri, 2023-07-28 at 14:05 -0500, Benjamin Marzinski wrote:
> 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>
Reviewed-by: Martin Wilck <mwilck@suse.com>
Thinking about it, I am not sure if it's wise to re-read the timeout
from sysfs every time we retrieve a path state. It's inefficient, and I
wonder if we even want to do this if someone modifies SCSI timeouts in
sysfs while multipathd is running. It would be cleaner to set
checker_timeout and reload multipathd.
But that's no reason to reject this patch.
> ---
> 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));
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2023-08-29 19:52 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 ` [dm-devel] [RFC PATCH 1/4] libmultipath: don't bother to reset default timeout value Benjamin Marzinski
2023-08-29 19:51 ` Martin Wilck [this message]
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=86abcd0775e43b2bec01a73b6e1697d021e02763.camel@suse.com \
--to=martin.wilck@suse.com \
--cc=bmarzins@redhat.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