libmultipath: add wrapper function around pgpolicyfn
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 23 Aug 2019 17:48:48 +0000 (12:48 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 1 Oct 2019 19:58:26 +0000 (21:58 +0200)
commit95ab641455076a0dc26d67cd9d5115ccd02287bc
treeec2fcbd69fc88f0bb1a92e9ec3613b2ebb123771
parent53956b51db829b70d5e6d50e6ecb2084a51d4e73
libmultipath: add wrapper function around pgpolicyfn

group_paths() is a wrapper around the pgpolicy functions, that pulls out
the common code from the beginning and the end. For this to work,
one_group() needs to change how it sets up the pathgroups vector to work
like the other pgpolicy functions. This does means that the pathgroups
in group_by_prio are now needlessly sorted afterwards. That will be
dealt with in a later patch.  Also, since store_pathgroup() is only
called by add_pathgroup(), it doesn't need to exist as a seperate
function.

Reviewed-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/configure.c
libmultipath/pgpolicies.c
libmultipath/pgpolicies.h
libmultipath/structs.c
libmultipath/structs.h