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

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