Skip to content

Commit

Permalink
multipathd: only call reload_and_sync_map() when ghost delay expires
Browse files Browse the repository at this point in the history
While we're waiting for active paths to appear when ghost delay is
enabled, we do add new paths to multipathd's internal mpp data structure
as they are discovered (unlike missing uevent case, where we orphan
the paths instead). When the ghost_delay timer expires, it should be
sufficient to call the more light-weight reload_and_sync_map() instead
of update_map().

Signed-off-by: Martin Wilck <mwilck@suse.com>
  • Loading branch information
mwilck committed Dec 6, 2024
1 parent 8d4758b commit 8119027
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions multipathd/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2932,16 +2932,16 @@ static void checker_finished(struct vectors *vecs)
int i;

vector_foreach_slot(vecs->mpvec, mpp, i) {
if ((missing_uev_wait_tick(mpp, &uev_timed_out) ||
ghost_delay_tick(mpp)) &&
if (missing_uev_wait_tick(mpp, &uev_timed_out) &&
update_map(mpp, vecs, 0)) {
/* multipath device deleted */
i--;
continue;
}
if ((update_mpp_prio(mpp) ||
(mpp->need_reload && mpp->synced_count > 0) ||
deferred_failback_tick(mpp)) &&
deferred_failback_tick(mpp) ||
ghost_delay_tick(mpp)) &&
reload_and_sync_map(mpp, vecs) == 2)
/* multipath device deleted */
i--;
Expand Down

0 comments on commit 8119027

Please sign in to comment.