Auto sync2gitlab import of lvm2-2.03.14-6.el8.src.rpm

This commit is contained in:
CentOS Sources 2022-08-11 18:15:32 +00:00
parent 263516cfb9
commit df0ad0f745
2 changed files with 62 additions and 1 deletions

View File

@ -0,0 +1,55 @@
From 3f297c1b3bebcb8812db882f369fbb4c43f4ceb3 Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
Date: Mon, 25 Jul 2022 13:50:43 -0500
Subject: [PATCH] apply multipath_component_detection=0 to duplicate PV
handling
multipath_component_detection=0 has always applied to the filter-based
component detection. Also apply this setting to the duplicate-PV
handling which also eliminates multipath components (based on duplicate
PVs having the same wwid.)
(cherry picked from commit 99ce09ae778c2cc4aa2611e425bba5287b8b9513)
---
lib/cache/lvmcache.c | 3 +++
test/shell/duplicate-pvs-multipath.sh | 10 +++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 61a2fee6d..04e9f0605 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -640,6 +640,9 @@ static int _all_multipath_components(struct cmd_context *cmd, struct lvmcache_in
*dev_mpath = NULL;
+ if (!find_config_tree_bool(cmd, devices_multipath_component_detection_CFG, NULL))
+ return 0;
+
/* This function only makes sense with more than one dev. */
if ((info && dm_list_empty(altdevs)) || (!info && (dm_list_size(altdevs) == 1))) {
log_debug("Skip multipath component checks with single device for PVID %s", pvid);
diff --git a/test/shell/duplicate-pvs-multipath.sh b/test/shell/duplicate-pvs-multipath.sh
index 59c15b0d4..bc98d2d5a 100644
--- a/test/shell/duplicate-pvs-multipath.sh
+++ b/test/shell/duplicate-pvs-multipath.sh
@@ -24,9 +24,13 @@ modprobe --dry-run scsi_debug || skip
multipath -l || skip
multipath -l | grep scsi_debug && skip
-# Turn off multipath_component_detection so that the duplicate
-# resolution of mpath components is used.
-aux lvmconf 'devices/multipath_component_detection = 0'
+# FIXME: setting multipath_component_detection=0 now also disables
+# the wwid-based mpath component detection, so this test will need
+# to find another way to disable only the filter-mpath code (using
+# sysfs and multipath/wwids) while keeping the code enabled that
+# eliminates duplicates based on their matching wwids which this
+# tries to test.
+
# Prevent wwids from being used for filtering.
aux lvmconf 'devices/multipath_wwids_file = "/dev/null"'
# Need to use /dev/mapper/mpath
--
2.37.1

View File

@ -68,7 +68,7 @@ Version: 2.03.14
%if 0%{?from_snapshot} %if 0%{?from_snapshot}
Release: 0.1.20210426git%{shortcommit}%{?dist}%{?rel_suffix} Release: 0.1.20210426git%{shortcommit}%{?dist}%{?rel_suffix}
%else %else
Release: 5%{?dist}%{?rel_suffix} Release: 6%{?dist}%{?rel_suffix}
%endif %endif
License: GPLv2 License: GPLv2
URL: http://sourceware.org/lvm2 URL: http://sourceware.org/lvm2
@ -136,6 +136,8 @@ Patch55: 0054-build-Fix-make-rpm-with-VERSION_DM-without-dash.patch
Patch56: 0055-make-generate.patch Patch56: 0055-make-generate.patch
# BZ 2090949: # BZ 2090949:
Patch57: 0056-exit-with-error-when-devicesfile-name-doesn-t-exist.patch Patch57: 0056-exit-with-error-when-devicesfile-name-doesn-t-exist.patch
# BZ 2111137:
Patch58: 0057-apply-multipath_component_detection-0-to-duplicate-P.patch
BuildRequires: gcc BuildRequires: gcc
%if %{enable_testsuite} %if %{enable_testsuite}
@ -253,6 +255,7 @@ or more physical volumes and creating one or more logical volumes
%patch55 -p1 -b .backup55 %patch55 -p1 -b .backup55
%patch56 -p1 -b .backup56 %patch56 -p1 -b .backup56
%patch57 -p1 -b .backup57 %patch57 -p1 -b .backup57
%patch58 -p1 -b .backup58
%build %build
%global _default_pid_dir /run %global _default_pid_dir /run
@ -871,6 +874,9 @@ An extensive functional testsuite for LVM2.
%endif %endif
%changelog %changelog
* Fri Jul 29 2022 Marian Csontos <mcsontos@redhat.com> - 2.03.14-6
- Fix effect of setting multipath_component_detection to 0.
* Thu Jul 14 2022 Marian Csontos <mcsontos@redhat.com> - 2.03.14-5 * Thu Jul 14 2022 Marian Csontos <mcsontos@redhat.com> - 2.03.14-5
- Exit with error when --devicesfile used does not exist. - Exit with error when --devicesfile used does not exist.