lvm2/0011-devices-drop-double-from-sysfs-path.patch
heming zhao 819badda28 Accepting request 1000764 from home:hmzhao:branches:Base:System
- 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
2022-09-01 23:48:48 +00:00

91 lines
3.8 KiB
Diff

From 1a981e9b6efb0bbc0881f5ed1f17900e9c669f48 Mon Sep 17 00:00:00 2001
From: Zdenek Kabelac <zkabelac@redhat.com>
Date: Wed, 10 Aug 2022 15:09:34 +0200
Subject: [PATCH] devices: drop double // from sysfs path
dm_sysfs_dir() comes internally as /sys/.
---
lib/device/dev-mpath.c | 4 ++--
lib/device/dev-type.c | 8 ++++----
lib/metadata/vdo_manip.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/device/dev-mpath.c b/lib/device/dev-mpath.c
index 27b0f41a6a8a..2040edac3bb8 100644
--- a/lib/device/dev-mpath.c
+++ b/lib/device/dev-mpath.c
@@ -815,7 +815,7 @@ const char *dev_mpath_component_wwid(struct cmd_context *cmd, struct device *dev
/* /sys/dev/block/253:7/slaves/sda/device/wwid */
- if (dm_snprintf(slaves_path, sizeof(slaves_path), "%s/dev/block/%d:%d/slaves",
+ if (dm_snprintf(slaves_path, sizeof(slaves_path), "%sdev/block/%d:%d/slaves",
dm_sysfs_dir(), (int)MAJOR(dev->dev), (int)MINOR(dev->dev)) < 0) {
log_warn("Sysfs path to check mpath components is too long.");
return NULL;
@@ -845,7 +845,7 @@ const char *dev_mpath_component_wwid(struct cmd_context *cmd, struct device *dev
/* read /sys/block/sda/device/wwid */
- if (dm_snprintf(wwid_path, sizeof(wwid_path), "%s/block/%s/device/wwid",
+ if (dm_snprintf(wwid_path, sizeof(wwid_path), "%sblock/%s/device/wwid",
dm_sysfs_dir(), slave_name) < 0) {
log_warn("Failed to create sysfs wwid path for %s", slave_name);
continue;
diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c
index 939eb4aeb514..1dc895b54216 100644
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
@@ -548,7 +548,7 @@ static int _has_sys_partition(struct device *dev)
int minor = (int) MINOR(dev->dev);
/* check if dev is a partition */
- if (dm_snprintf(path, sizeof(path), "%s/dev/block/%d:%d/partition",
+ if (dm_snprintf(path, sizeof(path), "%sdev/block/%d:%d/partition",
dm_sysfs_dir(), major, minor) < 0) {
log_warn("WARNING: %s: partition path is too long.", dev_name(dev));
return 0;
@@ -775,7 +775,7 @@ int dev_get_primary_dev(struct dev_types *dt, struct device *dev, dev_t *result)
* - basename ../../block/md0/md0 = md0
* Parent's 'dev' sysfs attribute = /sys/block/md0/dev
*/
- if (dm_snprintf(path, sizeof(path), "%s/dev/block/%d:%d",
+ if (dm_snprintf(path, sizeof(path), "%sdev/block/%d:%d",
dm_sysfs_dir(), major, minor) < 0) {
log_warn("WARNING: %s: major:minor sysfs path is too long.", dev_name(dev));
return 0;
@@ -787,7 +787,7 @@ int dev_get_primary_dev(struct dev_types *dt, struct device *dev, dev_t *result)
temp_path[size] = '\0';
- if (dm_snprintf(path, sizeof(path), "%s/block/%s/dev",
+ if (dm_snprintf(path, sizeof(path), "%sblock/%s/dev",
dm_sysfs_dir(), basename(dirname(temp_path))) < 0) {
log_warn("WARNING: sysfs path for %s is too long.",
basename(dirname(temp_path)));
@@ -1095,7 +1095,7 @@ int wipe_known_signatures(struct cmd_context *cmd, struct device *dev,
static int _snprintf_attr(char *buf, size_t buf_size, const char *sysfs_dir,
const char *attribute, dev_t dev)
{
- if (dm_snprintf(buf, buf_size, "%s/dev/block/%d:%d/%s", sysfs_dir,
+ if (dm_snprintf(buf, buf_size, "%sdev/block/%d:%d/%s", sysfs_dir,
(int)MAJOR(dev), (int)MINOR(dev),
attribute) < 0) {
log_warn("WARNING: sysfs path for %s attribute is too long.", attribute);
diff --git a/lib/metadata/vdo_manip.c b/lib/metadata/vdo_manip.c
index 0db401537d7c..779883d03bc3 100644
--- a/lib/metadata/vdo_manip.c
+++ b/lib/metadata/vdo_manip.c
@@ -148,7 +148,7 @@ static int _sysfs_get_kvdo_value(const char *dm_name, const struct dm_info *dmin
char temp[64];
int fd, size, r = 0;
- if (dm_snprintf(path, sizeof(path), "%s/block/dm-%d/vdo/%s",
+ if (dm_snprintf(path, sizeof(path), "%sblock/dm-%d/vdo/%s",
dm_sysfs_dir(), dminfo->minor, vdo_param) < 0) {
log_debug("Failed to build kvdo path.");
return 0;
--
2.26.2