Blame SOURCES/0019-RH-Remove-the-property-blacklist-exception-builtin.patch

5c2e41
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5c2e41
From: Benjamin Marzinski <bmarzins@redhat.com>
5c2e41
Date: Wed, 2 Jul 2014 12:49:53 -0500
5c2e41
Subject: [PATCH] RH: Remove the property blacklist exception builtin
5c2e41
5c2e41
Multipath set the default property blacklist exceptions to
5c2e41
(ID_SCSI_VPD|ID_WWN).  This has the effect of blacklisting some internal
5c2e41
devices.  These devices may never have multiple paths, but it is nice
5c2e41
to be able to set multipath up on them all the same.  This patch simply
5c2e41
removes the default, and makes it so that if no property
5c2e41
blacklist_exception is given, then devices aren't failed for not matching
5c2e41
it.
5c2e41
5c2e41
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
5c2e41
---
5c2e41
 libmultipath/blacklist.c   | 12 ++++--------
5c2e41
 multipath/multipath.conf.5 | 14 ++++++--------
5c2e41
 2 files changed, 10 insertions(+), 16 deletions(-)
5c2e41
5c2e41
diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c
a1c519
index e0d0279..556c0b9 100644
5c2e41
--- a/libmultipath/blacklist.c
5c2e41
+++ b/libmultipath/blacklist.c
5c2e41
@@ -204,12 +204,6 @@ setup_default_blist (struct config * conf)
5c2e41
 	if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
5c2e41
 		return 1;
5c2e41
 
5c2e41
-	str = STRDUP("(SCSI_IDENT_|ID_WWN)");
5c2e41
-	if (!str)
5c2e41
-		return 1;
5c2e41
-	if (store_ble(conf->elist_property, str, ORIGIN_DEFAULT))
5c2e41
-		return 1;
5c2e41
-
5c2e41
 	vector_foreach_slot (conf->hwtable, hwe, i) {
5c2e41
 		if (hwe->bl_product) {
5c2e41
 			if (find_blacklist_device(conf->blist_device,
a1c519
@@ -394,9 +388,11 @@ filter_property(struct config *conf, struct udev_device *udev, int lvl)
5c2e41
 	if (udev) {
5c2e41
 		/*
5c2e41
 		 * This is the inverse of the 'normal' matching;
5c2e41
-		 * the environment variable _has_ to match.
5c2e41
+		 * the environment variable _has_ to match
5c2e41
+		 * if a whitelist is present.
5c2e41
 		 */
5c2e41
-		r = MATCH_PROPERTY_BLIST_MISSING;
5c2e41
+		if (VECTOR_SIZE(conf->elist_property))
5c2e41
+			r = MATCH_PROPERTY_BLIST_MISSING;
5c2e41
 		udev_list_entry_foreach(list_entry,
5c2e41
 				udev_device_get_properties_list_entry(udev)) {
5c2e41
 
5c2e41
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
a1c519
index 646c156..768ab83 100644
5c2e41
--- a/multipath/multipath.conf.5
5c2e41
+++ b/multipath/multipath.conf.5
a1c519
@@ -1235,16 +1235,14 @@ keywords. Both are regular expressions. For a full description of these keywords
5c2e41
 Regular expression for an udev property. All
5c2e41
 devices that have matching udev properties will be excluded/included.
5c2e41
 The handling of the \fIproperty\fR keyword is special,
5c2e41
-because devices \fBmust\fR have at least one whitelisted udev property;
5c2e41
+because if a property blacklist_exception is set, devices \fBmust\fR have at
5c2e41
+least one whitelisted udev property;
5c2e41
 otherwise they're treated as blacklisted, and the message
5c2e41
 "\fIblacklisted, udev property missing\fR" is displayed in the logs.
5c2e41
-.
5c2e41
-.RS
5c2e41
-.PP
5c2e41
-The default \fIblacklist exception\fR is: \fB(SCSI_IDENT_|ID_WWN)\fR, causing
5c2e41
-well-behaved SCSI devices and devices that provide a WWN (World Wide Number)
5c2e41
-to be included, and all others to be excluded.
5c2e41
-.RE
5c2e41
+For example, setting the property blacklist_exception to
5c2e41
+\fB(SCSI_IDENT_|ID_WWN)\fR, will cause well-behaved SCSI devices and devices
5c2e41
+that provide a WWN (World Wide Number) to be included, and all others to be
5c2e41
+excluded. This works to exclude most non-multipathable devices.
5c2e41
 .TP
5c2e41
 .B protocol
5c2e41
 Regular expression for the protocol of a device to be excluded/included.
5c2e41
-- 
a1c519
2.17.2
5c2e41