Message ID | 1637184084-4882-2-git-send-email-bmarzins@redhat.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | christophe varoqui |
Headers | show |
Series | multipathd: remove udev settle dependency | expand |
diff --git a/libmultipath/configure.c b/libmultipath/configure.c index eb8ec1bd..f1a890af 100644 --- a/libmultipath/configure.c +++ b/libmultipath/configure.c @@ -715,6 +715,8 @@ void select_action (struct multipath *mpp, const struct _vector *curmp, cmpp = find_mp_by_wwid(curmp, mpp->wwid); cmpp_by_name = find_mp_by_alias(curmp, mpp->alias); + if (mpp->need_reload || (cmpp && cmpp->need_reload)) + force_reload = 1; if (!cmpp_by_name) { if (cmpp) { diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c index c05dc201..3e1a7260 100644 --- a/libmultipath/devmapper.c +++ b/libmultipath/devmapper.c @@ -522,6 +522,8 @@ freeout: addout: dm_task_destroy (dmt); + if (r) + mpp->need_reload = false; return r; } diff --git a/libmultipath/structs.h b/libmultipath/structs.h index 399540e7..d0b266b7 100644 --- a/libmultipath/structs.h +++ b/libmultipath/structs.h @@ -355,6 +355,7 @@ struct multipath { int retain_hwhandler; int deferred_remove; bool in_recovery; + bool need_reload; int san_path_err_threshold; int san_path_err_forget_rate; int san_path_err_recovery_time; diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c index 85d97ac1..e52db0c4 100644 --- a/libmultipath/structs_vec.c +++ b/libmultipath/structs_vec.c @@ -237,6 +237,7 @@ bool update_pathvec_from_dm(vector pathvec, struct multipath *mpp, free_pathgroup(pgp, KEEP_PATHS); must_reload = true; } + mpp->need_reload = mpp->need_reload || must_reload; return must_reload; }