Blame SOURCES/rear-bz1993296.patch

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