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>,
	dm-devel@lists.linux.dev, Martin Wilck <mwilck@suse.com>
Subject: Re: [PATCH 08/13] multipathd: remove mpvec_garbage_collector()
Date: Tue, 10 Dec 2024 18:34:29 -0500	[thread overview]
Message-ID: <Z1jQBRIvfP2aQvGa@redhat.com> (raw)
In-Reply-To: <20241206233617.382200-9-mwilck@suse.com>

On Sat, Dec 07, 2024 at 12:36:12AM +0100, Martin Wilck wrote:
> This function duplicates functionality that we now have in the
> do_sync_mpp() code path. Remove it.

If we decide not to delete devices on do_sync_mpp() errors in the
checker, we probably want something like this to say around, perhaps
rolled into finish_checker().

But to go along with my feeling that we shouldn't be deleting the device
on errors in the checker, perhaps it should call dm_is_mpath() and only
delete the device on DM_IS_MPATH_NO.

Thoughts?

-Ben
 
> Signed-off-by: Martin Wilck <mwilck@suse.com>
> ---
>  multipathd/main.c | 31 -------------------------------
>  1 file changed, 31 deletions(-)
> 
> diff --git a/multipathd/main.c b/multipathd/main.c
> index 7e844a5..43f6cc8 100644
> --- a/multipathd/main.c
> +++ b/multipathd/main.c
> @@ -1967,24 +1967,6 @@ enable_group(struct path * pp)
>  	}
>  }
>  
> -static void
> -mpvec_garbage_collector (struct vectors * vecs)
> -{
> -	struct multipath * mpp;
> -	int i;
> -
> -	if (!vecs->mpvec)
> -		return;
> -
> -	vector_foreach_slot (vecs->mpvec, mpp, i) {
> -		if (mpp && mpp->alias && !dm_map_present(mpp->alias)) {
> -			condlog(2, "%s: remove dead map", mpp->alias);
> -			remove_map_and_stop_waiter(mpp, vecs);
> -			i--;
> -		}
> -	}
> -}
> -
>  /* This is called after a path has started working again. It the multipath
>   * device for this path uses the followover failback type, and this is the
>   * best pathgroup, and this is the first path in the pathgroup to come back
> @@ -3002,7 +2984,6 @@ checkerloop (void *ap)
>  {
>  	struct vectors *vecs;
>  	struct path *pp;
> -	int count = 0;
>  	struct timespec last_time;
>  	struct config *conf;
>  	int foreign_tick = 0;
> @@ -3074,18 +3055,6 @@ checkerloop (void *ap)
>  			lock_cleanup_pop(vecs->lock);
>  		}
>  
> -		if (count)
> -			count--;
> -		else {
> -			pthread_cleanup_push(cleanup_lock, &vecs->lock);
> -			lock(&vecs->lock);
> -			pthread_testcancel();
> -			condlog(4, "map garbage collection");
> -			mpvec_garbage_collector(vecs);
> -			count = MAPGCINT;
> -			lock_cleanup_pop(vecs->lock);
> -		}
> -
>  		get_monotonic_time(&end_time);
>  		timespecsub(&end_time, &start_time, &diff_time);
>  		if (num_paths) {
> -- 
> 2.47.0


  reply	other threads:[~2024-12-10 23:34 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06 23:36 [PATCH 00/13] multipathd: More map reload handling, and checkerloop work Martin Wilck
2024-12-06 23:36 ` [PATCH 01/13] multipathd: don't reload map in update_mpp_prio() Martin Wilck
2024-12-06 23:36 ` [PATCH 02/13] multipathd: remove dm_get_info() call from refresh_multipath() Martin Wilck
2024-12-06 23:36 ` [PATCH 03/13] multipathd: allow map removal in do_sync_mpp() Martin Wilck
2024-12-10 19:02   ` Benjamin Marzinski
2024-12-10 19:44     ` Benjamin Marzinski
2024-12-10 21:05     ` Martin Wilck
2024-12-10 22:49       ` Benjamin Marzinski
2024-12-11 20:48         ` Martin Wilck
2024-12-10 23:30   ` Benjamin Marzinski
2024-12-11 12:06     ` Martin Wilck
2024-12-11 17:09       ` Benjamin Marzinski
2024-12-11 20:20         ` Martin Wilck
2024-12-11 20:33           ` Martin Wilck
2024-12-12 17:12             ` Benjamin Marzinski
2024-12-12 17:18               ` Martin Wilck
2024-12-12 17:50                 ` Benjamin Marzinski
2024-12-06 23:36 ` [PATCH 04/13] multipathd: reload maps in do_sync_mpp() if necessary Martin Wilck
2024-12-10 19:20   ` Benjamin Marzinski
2024-12-06 23:36 ` [PATCH 05/13] multipathd: move yielding for waiters to start of checkerloop Martin Wilck
2024-12-06 23:36 ` [PATCH 06/13] multipathd: add checker_finished() Martin Wilck
2024-12-06 23:36 ` [PATCH 07/13] multipathd: move "tick" calls into checker_finished() Martin Wilck
2024-12-06 23:36 ` [PATCH 08/13] multipathd: remove mpvec_garbage_collector() Martin Wilck
2024-12-10 23:34   ` Benjamin Marzinski [this message]
2024-12-06 23:36 ` [PATCH 09/13] multipathd: don't call reload_and_sync_map() from deferred_failback_tick() Martin Wilck
2024-12-06 23:36 ` [PATCH 10/13] multipathd: move retry_count_tick() into existing mpvec loop Martin Wilck
2024-12-06 23:36 ` [PATCH 11/13] multipathd: don't call update_map() from missing_uev_wait_tick() Martin Wilck
2024-12-10 23:13   ` Benjamin Marzinski
2024-12-06 23:36 ` [PATCH 12/13] multipathd: don't call udpate_map() from ghost_delay_tick() Martin Wilck
2024-12-06 23:36 ` [PATCH 13/13] multipathd: only call reload_and_sync_map() when ghost delay expires Martin Wilck
2024-12-11  0:02 ` [PATCH 00/13] multipathd: More map reload handling, and checkerloop work 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=Z1jQBRIvfP2aQvGa@redhat.com \
    --to=bmarzins@redhat.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=martin.wilck@suse.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 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.