update_multipath_strings() destroys and recreates the pathgroup vector. This wipes information previously stored. Restore the path group priorities. Fixes: efc7407bed65 "libmultipath: don't update path groups when printing" Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- libmultipath/structs_vec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c index 03e2b978..db5d19da 100644 --- a/libmultipath/structs_vec.c +++ b/libmultipath/structs_vec.c @@ -18,6 +18,7 @@ #include "configure.h" #include "libdevmapper.h" #include "io_err_stat.h" +#include "switchgroup.h" /* * creates or updates mpp->paths reading mpp->pg @@ -261,6 +262,9 @@ void sync_paths(struct multipath *mpp, vector pathvec) int update_multipath_strings(struct multipath *mpp, vector pathvec, int is_daemon) { + struct pathgroup *pgp; + int i; + if (!mpp) return 1; @@ -278,6 +282,10 @@ update_multipath_strings(struct multipath *mpp, vector pathvec, int is_daemon) if (update_multipath_status(mpp)) return 1; + vector_foreach_slot(mpp->pg, pgp, i) + if (pgp->paths) + path_group_prio_update(pgp); + return 0; } -- 2.19.2 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel