[dm-devel] [PATCH 07/10] libmultipath: add "protocol" blacklist option.

Martin Wilck mwilck at suse.com
Fri Jul 20 18:49:17 UTC 2018


On Fri, 2018-07-13 at 14:39 -0500, Benjamin Marzinski wrote:
> Multiple users have requested an easy way to setup blacklists that do
> things such as blacklisting all non FC and iSCSI devices. Currently
> there is no easy way to do this, without knowing in advance what the
> devices are.  Looking into the udev property values, I didn't see a
> consistent set of values that would worked for all the different
> types
> of requests like this (which would have allowed us to solve this by
> extending the "property" blacklist option to allow comparing values,
> instead of just keywords).
> 
> Instead I've opted to allow multipath to blacklist/whitelist devices
> by the protocol strings printed by "multipathd: add new protocol path
> wildcard". This check happens after multipath checks the "device"
> keyword, and before it checks wwid. This gives users an easily
> understandible method to set up these types of blacklists, without
> needing to know the exact arrays being used.
> 
> Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
> ---
>  libmultipath/blacklist.c   | 51
> ++++++++++++++++++++++++++++++++++++++--------
>  libmultipath/blacklist.h   |  3 +++
>  libmultipath/config.c      | 15 ++++++++++++++
>  libmultipath/config.h      |  2 ++
>  libmultipath/dict.c        | 14 +++++++++++--
>  libmultipath/discovery.c   |  5 +++--
>  libmultipath/print.c       | 31 ++++++++++++++++++++++++++++
>  multipath/multipath.conf.5 | 16 +++++++++++++--
>  8 files changed, 123 insertions(+), 14 deletions(-)

Reviewed-by: Martin Wilck <mwilck at suse.com>

-- 
Dr. Martin Wilck <mwilck at suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)




More information about the dm-devel mailing list