819badda28
- Update lvm2 from LVM2.2.03.15 to LVM2.2.03.16 *** WHATS_NEW for 2.03.16 *** Version 2.03.16 - 18th May 2022 =============================== Fix segfault when handling selection with historical LVs. Add support --vdosettings with lvcreate, lvconvert, lvchange. Filtering multipath devices respects blacklist setting from multipath configuration. lvmdevices support for removing by device id using --deviceidtype and --deldev. Display writecache block size with lvs -o writecache_block_size. Improve cachesettings description in man lvmcache. Fix lossing of delete message on thin-pool extension. - Drop patches that have been merged into upstream - 0001-post-release.patch - 0002-asan-fix-some-reports-from-libasan.patch - 0003-make-generate.patch - 0004-tests-udev-pvscan-vgchange-fix-service-wait.patch - 0005-devices-file-do-not-clear-PVID-of-unread-devices.patch - 0006-tests-skip-vgchange-pvs-online.sh-on-rhel5.patch - 0007-dev_manager-fix-dm_task_get_device_list.patch - 0008-dev_manager-failing-status-is-not-internal-error.patch - 0009-clang-add-extra-check.patch - 0010-clang-possible-better-compilation-with-musl-c.patch - 0011-dev_manager-do-not-query-for-open_count.patch - 0012-dev_manager-use-list-info-for-preset-devs.patch - 0013-man-lvmcache-add-more-writecache-cachesettings-info.patch - 0014-man-update-cachesettings-option-description.patch - 0015-man-lvmcache-mention-writecache-memory-usage.patch - 0016-writecache-display-block-size-from-lvs.patch - 0017-devices-simplify-dev_cache_get_by_devt.patch - 0018-devices-drop-incorrect-paths-from-aliases-list.patch - 0019-devices-initial-use-of-existing-option.patch - 0020-devices-fix-dev_name-assumptions.patch - 0021-devices-use-dev-cache-aliases-handling-from-label-sc.patch - 0022-devices-only-close-PVs-on-LVs-when-scan_lvs-is-enabl.patch - 0023-writecache-check-memory-usage.patch - 0024-pvscan-don-t-use-udev-for-external-device-info.patch - 0025-vgchange-monitor-don-t-use-udev-info.patch - Add upstream patch - 0001-devices-file-move-clean-up-after-command-is-run.patch - 0002-devices-file-fail-if-devicesfile-filename-doesn-t-ex.patch - 0003-filter-mpath-handle-other-wwid-types-in-blacklist.patch - 0004-filter-mpath-get-wwids-from-sysfs-vpd_pg83.patch - 0005-pvdisplay-restore-reportformat-option.patch - 0006-exit-with-error-when-devicesfile-name-doesn-t-exist.patch - 0007-report-fix-pe_start-column-type-from-NUM-to-SIZ.patch - 0008-_vg_read_raw_area-fix-segfault-caused-by-using-null-.patch - 0009-mm-remove-libaio-from-being-skipped.patch - 0010-dmsetup-check-also-for-ouf-of-range-value.patch - 0011-devices-drop-double-from-sysfs-path.patch - 0012-devices-file-fix-pvcreate-uuid-matching-pvid-entry-w.patch - 0013-vgimportdevices-change-result-when-devices-are-not-a.patch - 0014-vgimportdevices-fix-locking-when-creating-devices-fi.patch - update lvm2.spec - indent some lines for easy read - remove config item '--enable-cmirrord' - add new man lvm_import_vdo.8 - add new man dmfilemapd.8 OBS-URL: https://build.opensuse.org/request/show/1000764 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=312
67 lines
2.4 KiB
Diff
67 lines
2.4 KiB
Diff
From 8c3cfc75c72696ae8b620555fcc4f815b0c1d6b6 Mon Sep 17 00:00:00 2001
|
|
From: David Teigland <teigland@redhat.com>
|
|
Date: Fri, 19 Aug 2022 13:31:22 -0500
|
|
Subject: [PATCH] devices file: fix pvcreate --uuid matching pvid entry with no
|
|
device id
|
|
|
|
pvcreate with --uuid would segfault if a devices file entry matched
|
|
the specified pvid, but the devices file entry had no device_id, which
|
|
could happen if the entry has a devname idtype.
|
|
---
|
|
lib/device/device_id.c | 7 ++++---
|
|
test/shell/devicesfile-devname.sh | 13 +++++++++++++
|
|
2 files changed, 17 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/lib/device/device_id.c b/lib/device/device_id.c
|
|
index 9dec9f884da4..6c70f110c820 100644
|
|
--- a/lib/device/device_id.c
|
|
+++ b/lib/device/device_id.c
|
|
@@ -1168,8 +1168,9 @@ id_done:
|
|
du_devname->devname);
|
|
|
|
if (du_pvid && (du_pvid->dev != dev))
|
|
- log_warn("WARNING: adding device %s with PVID %s which is already used for %s.",
|
|
- dev_name(dev), pvid, du_pvid->dev ? dev_name(du_pvid->dev) : "missing device");
|
|
+ log_warn("WARNING: adding device %s with PVID %s which is already used for %s device_id %s.",
|
|
+ dev_name(dev), pvid, du_pvid->dev ? dev_name(du_pvid->dev) : "missing device",
|
|
+ du_pvid->idname ?: "none");
|
|
|
|
if (du_devid && (du_devid->dev != dev)) {
|
|
if (!du_devid->dev) {
|
|
@@ -1215,7 +1216,7 @@ id_done:
|
|
else
|
|
check_idname = device_id_system_read(cmd, dev, du_pvid->idtype);
|
|
|
|
- if (check_idname && !strcmp(check_idname, du_pvid->idname)) {
|
|
+ if (!du_pvid->idname || (check_idname && !strcmp(check_idname, du_pvid->idname))) {
|
|
update_du = du_pvid;
|
|
dm_list_del(&update_du->list);
|
|
update_matching_kind = "PVID";
|
|
diff --git a/test/shell/devicesfile-devname.sh b/test/shell/devicesfile-devname.sh
|
|
index 338637275ec5..211f4dbed36b 100644
|
|
--- a/test/shell/devicesfile-devname.sh
|
|
+++ b/test/shell/devicesfile-devname.sh
|
|
@@ -550,6 +550,19 @@ vgchange -an $vg2
|
|
vgremove -ff $vg1
|
|
vgremove -ff $vg2
|
|
|
|
+# bz 2119473
|
|
+
|
|
+aux lvmconf "devices/search_for_devnames = \"none\""
|
|
+sed -e "s|DEVNAME=$dev1|DEVNAME=.|" "$ORIG" > tmp1.devices
|
|
+sed -e "s|IDNAME=$dev1|IDNAME=.|" tmp1.devices > "$DF"
|
|
+pvs
|
|
+lvmdevices
|
|
+pvcreate -ff --yes --uuid "$PVID1" --norestorefile $dev1
|
|
+grep "$PVID1" "$DF" |tee out
|
|
+grep "DEVNAME=$dev1" out
|
|
+grep "IDNAME=$dev1" out
|
|
+aux lvmconf "devices/search_for_devnames = \"auto\""
|
|
+
|
|
# devnames change so the new devname now refers to a filtered device,
|
|
# e.g. an mpath or md component, which is not scanned
|
|
|
|
--
|
|
2.26.2
|
|
|