All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Marzinski <bmarzins@redhat.com>
To: Martin Wilck <martin.wilck@suse.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>,
	device-mapper development <dm-devel@lists.linux.dev>
Subject: Re: [PATCH 10/15] multipathd: split check_path into two functions
Date: Wed, 4 Sep 2024 14:51:19 -0400	[thread overview]
Message-ID: <ZtisJ_9A2-z0Gdly@redhat.com> (raw)
In-Reply-To: <131273007ab11d8a866e395c1e3aa80598aa1dbe.camel@suse.com>

On Wed, Sep 04, 2024 at 05:38:52PM +0200, Martin Wilck wrote:
> On Wed, 2024-08-28 at 18:17 -0400, Benjamin Marzinski wrote:
> > Split out the code that updates a path's state and sets up the next
> > check time into its own function, update_path().
> > 
> > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> > ---
> >  multipathd/main.c | 31 ++++++++++++++++++++++---------
> >  1 file changed, 22 insertions(+), 9 deletions(-)
> > 
> > diff --git a/multipathd/main.c b/multipathd/main.c
> > index 94d4e421..300f8247 100644
> > --- a/multipathd/main.c
> > +++ b/multipathd/main.c
> > @@ -2390,6 +2390,7 @@ sync_mpp(struct vectors * vecs, struct
> > multipath *mpp, unsigned int ticks)
> >  }
> >  
> >  enum check_path_return {
> > +	CHECK_PATH_STARTED,
> >  	CHECK_PATH_CHECKED,
> >  	CHECK_PATH_SKIPPED,
> >  	CHECK_PATH_REMOVED,
> > @@ -2629,13 +2630,10 @@ update_path_state (struct vectors * vecs,
> > struct path * pp)
> >  }
> >  
> >  static int
> > -check_path (struct vectors * vecs, struct path * pp, unsigned int
> > ticks,
> > -	    time_t start_secs)
> > +check_path (struct path * pp, unsigned int ticks)
> 
> check_path() used to be one of our core functions, and you now re-
> introduce it with quite different semantics. 
> 
> Perhaps choose a new name?

Sure. Although the new check_path() is just the beginning part of the
old check_path(), where we actually run the checker, so it seems
reasonable to me. But your objection is also reasonable. I was just
getting sick of coming up with new function names by this point.

-Ben 

> 
> Martin


  reply	other threads:[~2024-09-04 18:51 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28 22:17 [PATCH 00/15] Yet Another path checker refactor Benjamin Marzinski
2024-08-28 22:17 ` [PATCH 01/15] libmultipath: store checker_check() result in checker struct Benjamin Marzinski
2024-09-04 16:13   ` Martin Wilck
2024-08-28 22:17 ` [PATCH 02/15] libmultipath: add missing checker function prototypes Benjamin Marzinski
2024-09-04 16:13   ` Martin Wilck
2024-08-28 22:17 ` [PATCH 03/15] libmultipath: split out the code to wait for pending checkers Benjamin Marzinski
2024-09-04 15:01   ` Martin Wilck
2024-09-04 18:16     ` Benjamin Marzinski
2024-09-04 19:48       ` Martin Wilck
2024-08-28 22:17 ` [PATCH 04/15] libmultipath: remove pending wait code from libcheck_check calls Benjamin Marzinski
2024-09-04 20:05   ` Martin Wilck
2024-09-04 21:17     ` Benjamin Marzinski
2024-09-05  7:53       ` Martin Wilck
2024-09-06 17:26         ` Benjamin Marzinski
2024-08-28 22:17 ` [PATCH 05/15] multipath-tools tests: fix up directio tests Benjamin Marzinski
2024-09-04 16:12   ` Martin Wilck
2024-09-04 18:29     ` Benjamin Marzinski
2024-09-04 19:36       ` Martin Wilck
2024-09-04 19:43         ` Martin Wilck
2024-09-04 22:53           ` Benjamin Marzinski
2024-09-05  7:57             ` Martin Wilck
2024-08-28 22:17 ` [PATCH 06/15] libmultipath: split get_state into two functions Benjamin Marzinski
2024-09-04 15:14   ` Martin Wilck
2024-09-04 18:43     ` Benjamin Marzinski
2024-08-28 22:17 ` [PATCH 07/15] libmultipath: change path_offline to path_sysfs_state Benjamin Marzinski
2024-09-04 15:31   ` Martin Wilck
2024-08-28 22:17 ` [PATCH 08/15] multipathd: split check_path_state into two functions Benjamin Marzinski
2024-08-28 22:17 ` [PATCH 09/15] multipathd: split do_checker_path Benjamin Marzinski
2024-08-28 22:17 ` [PATCH 10/15] multipathd: split check_path into two functions Benjamin Marzinski
2024-09-04 15:38   ` Martin Wilck
2024-09-04 18:51     ` Benjamin Marzinski [this message]
2024-09-05 19:02       ` Benjamin Marzinski
2024-09-06  7:45         ` Martin Wilck
2024-08-28 22:17 ` [PATCH 11/15] multipathd: split handle_uninitialized_path " Benjamin Marzinski
2024-08-28 22:17 ` [PATCH 12/15] multipathd: split check_paths " Benjamin Marzinski
2024-08-28 22:17 ` [PATCH 13/15] multipathd: update priority once after updating all paths Benjamin Marzinski
2024-09-04 15:06   ` Martin Wilck
2024-09-04 18:54     ` Benjamin Marzinski
2024-09-04 18:57   ` Martin Wilck
2024-09-04 19:51     ` Benjamin Marzinski
2024-09-04 20:14       ` Martin Wilck
2024-08-28 22:17 ` [PATCH 14/15] multipathd: remove pointless check Benjamin Marzinski
2024-09-04 16:07   ` Martin Wilck
2024-08-28 22:17 ` [PATCH 15/15] multipathd: fix deferred_failback_tick for reload removes Benjamin Marzinski
2024-09-04 16:10   ` Martin Wilck
2024-09-04 20:07 ` [PATCH 00/15] Yet Another path checker refactor 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=ZtisJ_9A2-z0Gdly@redhat.com \
    --to=bmarzins@redhat.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=martin.wilck@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.