blob: 451c524c9ab062819b760057aa722c129208ad29 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Benjamin Marzinski <bmarzins@redhat.com>
3Date: Wed, 2 Jul 2014 12:49:53 -0500
4Subject: [PATCH] RH: Remove the property blacklist exception builtin
5
6Multipath set the default property blacklist exceptions to
7(ID_SCSI_VPD|ID_WWN). This has the effect of blacklisting some internal
8devices. These devices may never have multiple paths, but it is nice
9to be able to set multipath up on them all the same. This patch simply
10removes the default, and makes it so that if no property
11blacklist_exception is given, then devices aren't failed for not matching
12it.
13
14Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
15---
16 libmultipath/blacklist.c | 15 ++++++---------
17 multipath/multipath.conf.5 | 14 ++++++++------
18 2 files changed, 14 insertions(+), 15 deletions(-)
19
20diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c
21index ee396e2..19d4697 100644
22--- a/libmultipath/blacklist.c
23+++ b/libmultipath/blacklist.c
24@@ -181,12 +181,6 @@ setup_default_blist (struct config * conf)
25 if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
26 return 1;
27
28- str = STRDUP("(SCSI_IDENT_|ID_WWN)");
29- if (!str)
30- return 1;
31- if (store_ble(conf->elist_property, str, ORIGIN_DEFAULT))
32- return 1;
33-
34 vector_foreach_slot (conf->hwtable, hwe, i) {
35 if (hwe->bl_product) {
36 if (_blacklist_device(conf->blist_device, hwe->vendor,
37@@ -390,9 +384,12 @@ filter_property(struct config * conf, struct udev_device * udev)
38 * This is the inverse of the 'normal' matching;
39 * the environment variable _has_ to match.
40 */
41- log_filter(devname, NULL, NULL, NULL, NULL,
42- MATCH_PROPERTY_BLIST_MISSING);
43- return MATCH_PROPERTY_BLIST_MISSING;
44+ if (VECTOR_SIZE(conf->elist_property)) {
45+ log_filter(devname, NULL, NULL, NULL, NULL,
46+ MATCH_PROPERTY_BLIST_MISSING);
47+ return MATCH_PROPERTY_BLIST_MISSING;
48+ }
49+ return 0;
50 }
51
52 void
53diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
54index 30d8598..c45da9f 100644
55--- a/multipath/multipath.conf.5
56+++ b/multipath/multipath.conf.5
57@@ -1179,10 +1179,6 @@ The \fIWorld Wide Identification\fR of a device.
58 .TP
59 .B property
60 Regular expression of the udev property to be whitelisted.
61-.RS
62-.TP
63-The default is: \fB(SCSI_IDENT_|ID_WWN)\fR
64-.RE
65 .TP
66 .B device
67 Subsection for the device description. This subsection recognizes the
68@@ -1193,8 +1189,14 @@ keywords. For a full description of these keywords please see the \fIdevices\fR
69 section description.
70 .LP
71 The \fIproperty\fR whitelist handling is different from the usual
72-handling in the sense that the device \fIhas\fR to have a udev property that
73-matches the whitelist, otherwise the device will be blacklisted. In these cases the message \fIblacklisted, udev property missing\fR will be displayed.
74+handling in the sense that if the propery whitelist is set, the device
75+\fIhas\fR to have a udev property that matches the whitelist, otherwise the
76+device will be blacklisted. In these cases the message \fIblacklisted, udev
77+property missing\fR will be displayed. For example settting the
78+property blacklist_exception to \fB(SCSI_IDENT_|ID_WWN)\fR will blacklist
79+all devices that have no udev property whose name regex matches either
80+\fBSCSI_IDENT_\fR or \fBID_WWN\fR. This works to exclude most
81+non-multipathable devices.
82 .
83 .
84 .\" ----------------------------------------------------------------------------
85--
862.7.4
87