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@xxxxxxxx> > --- > 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