From 14716a10c22206722ee48b44b88f0eec5203f228 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Fri, 1 Mar 2024 10:34:06 +0800
Subject: [PATCH] RH: Remove the property blacklist exception builtin

Multipath set the default property blacklist exceptions to
(ID_SCSI_VPD|ID_WWN).  This has the effect of blacklisting some internal
devices.  These devices may never have multiple paths, but it is nice
to be able to set multipath up on them all the same.  This patch simply
removes the default, and makes it so that if no property
blacklist_exception is given, then devices aren't failed for not matching
it.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>

Upstream-Status: Pending

[OP: Rebase to 0.9.3]
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>

Rebase to 0.9.8
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 libmultipath/blacklist.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c
index 17e1b54a..2cfb18b8 100644
--- a/libmultipath/blacklist.c
+++ b/libmultipath/blacklist.c
@@ -221,15 +221,6 @@ setup_default_blist (struct config * conf)
 	struct hwentry *hwe;
 	int i;
 
-	if (nvme_multipath_enabled()) {
-		if (store_ble(conf->blist_devnode, "!^(sd[a-z]|dasd[a-z])",
-			      ORIGIN_DEFAULT))
-			return 1;
-	} else {
-		if (store_ble(conf->blist_devnode, "!^(sd[a-z]|dasd[a-z]|nvme[0-9])",
-			      ORIGIN_DEFAULT))
-			return 1;
-	}
 	if (store_ble(conf->elist_property, "(SCSI_IDENT_|ID_WWN)", ORIGIN_DEFAULT))
 		return 1;
 
@@ -464,8 +455,11 @@ filter_property(const struct config *conf, struct udev_device *udev,
 			r = MATCH_NOTHING;
 	}
 
-	log_filter(devname, NULL, NULL, NULL, env, NULL, r, lvl);
-	return r;
+       if (VECTOR_SIZE(conf->elist_property)) {
+               log_filter(devname, NULL, NULL, NULL, env, NULL, r, lvl);
+               return r;
+       }
+       return 0;
 }
 
 static void free_ble(struct blentry *ble)
