Blame SOURCES/rear-bz1993296.patch

769012
From 4233fe30b315737ac8c4d857e2b04e021c2e2886 Mon Sep 17 00:00:00 2001
769012
From: Pavel Cahyna <pcahyna@redhat.com>
769012
Date: Mon, 16 Aug 2021 10:10:38 +0300
769012
Subject: [PATCH] Revert the main part of PR #2299
769012
769012
multipath -l is very slow with many multipath devices. As it will be
769012
called for every multipath device, it leads to quadratic time complexity
769012
in the number of multipath devices. For thousands of devices, ReaR can
769012
take hours to scan and exclude them. We therefore have to comment
769012
multipath -l out, as it is a huge performance regression, and find
769012
another solution to bug #2298.
769012
---
769012
 usr/share/rear/lib/layout-functions.sh | 5 ++++-
769012
 1 file changed, 4 insertions(+), 1 deletion(-)
769012
769012
diff --git a/usr/share/rear/lib/layout-functions.sh b/usr/share/rear/lib/layout-functions.sh
769012
index cdd81a14..8c8be74b 100644
769012
--- a/usr/share/rear/lib/layout-functions.sh
769012
+++ b/usr/share/rear/lib/layout-functions.sh
769012
@@ -771,7 +771,10 @@ function is_multipath_path {
769012
     # so that no "multipath -l" output could clutter the log (the "multipath -l" output is irrelevant here)
769012
     # in contrast to e.g. test "$( multipath -l )" that would falsely succeed with blank output
769012
     # and the output would appear in the log in 'set -x' debugscript mode:
769012
-    multipath -l | grep -q '[[:alnum:]]' || return 1
769012
+    #
769012
+    # Unfortunately, multipat -l is quite slow with many multipath devices
769012
+    # and becomes a performance bottleneck, so we must comment it out for now.
769012
+    #multipath -l | grep -q '[[:alnum:]]' || return 1
769012
     # Check if a block device should be a path in a multipath device:
769012
     multipath -c /dev/$1 &>/dev/null
769012
 }
769012
-- 
769012
2.26.3
769012