[dm-devel] [PATCH v2 12/12] libmpathpersist: initialize mpp->hwe in get_mpvec()
Benjamin Marzinski
bmarzins at redhat.com
Fri Oct 16 22:13:04 UTC 2020
On Fri, Oct 16, 2020 at 12:42:39PM +0200, mwilck at suse.com wrote:
> From: Martin Wilck <mwilck at suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins at redhat.com>
>
> In __mpath_persistent_reserve_out, we call select_all_tg_pt(),
> which requires mpp->hwe to be set. Initialize it in get_mpvec().
>
> Fixes: 5b54e77 ("mpathpersist: add all_tg_pt option")
> Signed-off-by: Martin Wilck <mwilck at suse.com>
> ---
> libmpathpersist/mpath_persist.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
> index 1f9817e..4b3f3e0 100644
> --- a/libmpathpersist/mpath_persist.c
> +++ b/libmpathpersist/mpath_persist.c
> @@ -341,11 +341,13 @@ get_mpvec (vector curmp, vector pathvec, char * refwwid)
> continue;
>
> if (update_multipath_table(mpp, pathvec, DI_CHECKER) != DMP_OK ||
> - update_multipath_status(mpp) != DMP_OK) {
> + update_multipath_status(mpp) != DMP_OK ||
> + update_mpp_paths(mpp, pathvec)) {
> condlog(1, "error parsing map %s", mpp->wwid);
> remove_map(mpp, pathvec, curmp, PURGE_VEC);
> i--;
> - }
> + } else
> + extract_hwe_from_path(mpp);
> }
> return MPATH_PR_SUCCESS ;
> }
> --
> 2.28.0
More information about the dm-devel
mailing list