Message ID | 20250117202738.126196-5-mwilck@suse.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | Benjamin Marzinski |
Headers | show |
Series | multipathd: More map reload handling, and checkerloop work | expand |
On Fri, Jan 17, 2025 at 09:27:27PM +0100, Martin Wilck wrote: > After reading the kernel device-mapper table, update_pathvec_from_dm() > sets the mpp->need_reload flag if an inconsistent state was found (often a > path with wrong WWID). We expect reload_and_sync_map() to fix this situation. > If this is not the case (need_reload still set after map reloading), it's > most probably a bug. > > Signed-off-by: Martin Wilck <mwilck@suse.com> Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com> > --- > multipathd/main.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/multipathd/main.c b/multipathd/main.c > index e4e6bf7..ff3031e 100644 > --- a/multipathd/main.c > +++ b/multipathd/main.c > @@ -3026,13 +3026,20 @@ checkerloop (void *ap) > start_time.tv_sec); > if (checker_state == CHECKER_FINISHED) { > vector_foreach_slot(vecs->mpvec, mpp, i) { > + bool inconsistent; > + > sync_mpp(vecs, mpp, ticks); > - if ((update_mpp_prio(mpp) || mpp->need_reload) && > + inconsistent = mpp->need_reload; > + if ((update_mpp_prio(mpp) || inconsistent) && > reload_and_sync_map(mpp, vecs) == 2) { > /* multipath device deleted */ > i--; > continue; > } > + /* need_reload was cleared in dm_addmap and then set again */ > + if (inconsistent && mpp->need_reload) > + condlog(1, "BUG: %s; map remained in inconsistent state after reload", > + mpp->alias); > } > } > lock_cleanup_pop(vecs->lock); > -- > 2.47.1
diff --git a/multipathd/main.c b/multipathd/main.c index e4e6bf7..ff3031e 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -3026,13 +3026,20 @@ checkerloop (void *ap) start_time.tv_sec); if (checker_state == CHECKER_FINISHED) { vector_foreach_slot(vecs->mpvec, mpp, i) { + bool inconsistent; + sync_mpp(vecs, mpp, ticks); - if ((update_mpp_prio(mpp) || mpp->need_reload) && + inconsistent = mpp->need_reload; + if ((update_mpp_prio(mpp) || inconsistent) && reload_and_sync_map(mpp, vecs) == 2) { /* multipath device deleted */ i--; continue; } + /* need_reload was cleared in dm_addmap and then set again */ + if (inconsistent && mpp->need_reload) + condlog(1, "BUG: %s; map remained in inconsistent state after reload", + mpp->alias); } } lock_cleanup_pop(vecs->lock);
After reading the kernel device-mapper table, update_pathvec_from_dm() sets the mpp->need_reload flag if an inconsistent state was found (often a path with wrong WWID). We expect reload_and_sync_map() to fix this situation. If this is not the case (need_reload still set after map reloading), it's most probably a bug. Signed-off-by: Martin Wilck <mwilck@suse.com> --- multipathd/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)