From: Benjamin Marzinski <bmarzins@redhat.com>
To: Martin Wilck <mwilck@suse.com>
Cc: dm-devel@redhat.com
Subject: Re: [PATCH v3 05/10] libmultipath: detect_alua(): use system timeout
Date: Tue, 19 Mar 2019 13:36:58 -0500 [thread overview]
Message-ID: <20190319183658.GK13295@octiron.msp.redhat.com> (raw)
In-Reply-To: <20190318112445.6636-6-mwilck@suse.com>
On Mon, Mar 18, 2019 at 12:24:40PM +0100, Martin Wilck wrote:
> This is not the path checker - we don't need to use the
> configured checker timeout here. This makes it possible to
> call this function without a current (struct config *).
I feel like checker_timeout is badly named, since we use if for a lot of
timeouts that aren't in the checker. In general, I feel like we should
allow users to configure how long they want these sorts of calls to wait
for a response. I get why you changed this, but it may be worth thinking
about if we should deal with this timeout like we deal with verbosity,
where, we track it outside of the config structure.
But that doesn't need to be dealt with now, so
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
> Signed-off-by: Martin Wilck <mwilck@suse.com>
> ---
> libmultipath/discovery.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
> index 270dedc9..b2a43e86 100644
> --- a/libmultipath/discovery.c
> +++ b/libmultipath/discovery.c
> @@ -833,11 +833,14 @@ get_serial (char * str, int maxlen, int fd)
> }
>
> static void
> -detect_alua(struct path * pp, struct config *conf)
> +detect_alua(struct path * pp)
> {
> int ret;
> int tpgs;
> - unsigned int timeout = conf->checker_timeout;
> + unsigned int timeout;
> +
> + if (sysfs_get_timeout(pp, &timeout) <= 0)
> + timeout = DEF_TIMEOUT;
>
> if ((tpgs = get_target_port_group_support(pp, timeout)) <= 0) {
> pp->tpgs = TPGS_NONE;
> @@ -1519,7 +1522,7 @@ scsi_ioctl_pathinfo (struct path * pp, struct config *conf, int mask)
> const char *attr_path = NULL;
>
> if (pp->tpgs == TPGS_UNDEF)
> - detect_alua(pp, conf);
> + detect_alua(pp);
>
> if (!(mask & DI_SERIAL))
> return;
> --
> 2.21.0
next prev parent reply other threads:[~2019-03-19 18:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-18 11:24 [PATCH v3 00/10] multipath-tools: avoid I/O during uevent processing Martin Wilck
2019-03-18 11:24 ` [PATCH v3 01/10] libmultipath: add sysfs_get_inquiry() Martin Wilck
2019-03-18 11:24 ` [PATCH v3 02/10] libmultipath: alua: make API more consistent Martin Wilck
2019-03-18 11:24 ` [PATCH v3 03/10] libmultipath: alua: try to retrieve inquiry data from sysfs Martin Wilck
2019-03-18 11:24 ` [PATCH v3 04/10] libmultipath: constify sysfs_get_timeout() Martin Wilck
2019-03-18 11:24 ` [PATCH v3 05/10] libmultipath: detect_alua(): use system timeout Martin Wilck
2019-03-19 18:36 ` Benjamin Marzinski [this message]
2019-03-18 11:24 ` [PATCH v3 06/10] libmultipath: lazy tpgs probing Martin Wilck
2019-03-18 11:24 ` [PATCH v3 07/10] libmultipath: don't link alua_rtpg.o twice Martin Wilck
2019-03-18 11:24 ` [PATCH v3 08/10] libmultipath: tidy up do_set_from_hwe() with statement expression Martin Wilck
2019-03-18 11:24 ` [PATCH v3 09/10] libmultipath: check_rdac(): pre-check in hwtable Martin Wilck
2019-03-18 11:24 ` [PATCH v3 10/10] libmultipath: hwtable: add Lenovo DE series Martin Wilck
2019-03-18 17:28 ` Schremmer, Steven
2019-04-12 17:27 ` Schremmer, Steven
2019-03-19 18:37 ` [PATCH v3 00/10] multipath-tools: avoid I/O during uevent processing 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=20190319183658.GK13295@octiron.msp.redhat.com \
--to=bmarzins@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox