Hello community, here is the log from the commit of package libvpd2 for openSUSE:Factory checked in at 2020-01-29 13:19:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libvpd2 (Old) and /work/SRC/openSUSE:Factory/.libvpd2.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libvpd2" Wed Jan 29 13:19:11 2020 rev:31 rq:768097 version:2.2.6 Changes: -------- --- /work/SRC/openSUSE:Factory/libvpd2/libvpd2.changes 2019-02-13 09:59:28.617648901 +0100 +++ /work/SRC/openSUSE:Factory/.libvpd2.new.26092/libvpd2.changes 2020-01-29 13:20:03.466221285 +0100 @@ -1,0 +2,9 @@ +Tue Jan 28 15:59:32 UTC 2020 - Martin Wilck <[email protected]> + +- Avoid boot stalls due to excessive udev rule execution + (bsc#1154837) + * added udev-rules-don-t-touch-run.vpdupdate-for-ignored-dev.patch + * added udev-rules-more-software-devices-to-ignore.patch + * added udev-rules-don-t-generate-multiple-vpdupdate-events-.patch + +------------------------------------------------------------------- New: ---- udev-rules-don-t-generate-multiple-vpdupdate-events-.patch udev-rules-don-t-touch-run.vpdupdate-for-ignored-dev.patch udev-rules-more-software-devices-to-ignore.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libvpd2.spec ++++++ --- /var/tmp/diff_new_pack.Al0Crs/_old 2020-01-29 13:20:08.210223711 +0100 +++ /var/tmp/diff_new_pack.Al0Crs/_new 2020-01-29 13:20:08.214223713 +0100 @@ -1,7 +1,7 @@ # # spec file for package libvpd2 # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,9 @@ Source: http://downloads.sourceforge.net/project/linux-diag/libvpd/%{version}/libvpd-%{version}.tar.gz Source2: baselibs.conf Patch1: libvpd2.makefile.patch +Patch2: udev-rules-don-t-touch-run.vpdupdate-for-ignored-dev.patch +Patch3: udev-rules-more-software-devices-to-ignore.patch +Patch4: udev-rules-don-t-generate-multiple-vpdupdate-events-.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ @@ -52,7 +55,7 @@ %prep %setup -q -n libvpd-%{version} -%patch1 -p1 +%autopatch -p1 %build autoreconf -fiv ++++++ udev-rules-don-t-generate-multiple-vpdupdate-events-.patch ++++++ >From 3ec780310cca88698fccbf4fb0de20d822ecf88e Mon Sep 17 00:00:00 2001 From: Martin Wilck <[email protected]> Date: Tue, 28 Jan 2020 16:07:43 +0100 Subject: [PATCH 3/3] udev rules: don't generate multiple vpdupdate events for SCSI/NVMe lsvpd lists SCSI devices, not partitions or block devices. Currently, addition of e.g. /dev/sda will generate events for a "scsi_device", "scsi_disk", "bsg", and "block" device, plus events for partitions, and every event will trigger a "touch /run/run.vpdupdate" command, where touching the file once would be obviously sufficient. Add rules that touch vpdupdate for SCSI hosts and devices, but not for the additional sysfs nodes. Similar reasoning for NVMe. --- 90-vpdupdate.rules | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/90-vpdupdate.rules b/90-vpdupdate.rules index d906ffa..ea4c901 100644 --- a/90-vpdupdate.rules +++ b/90-vpdupdate.rules @@ -18,6 +18,18 @@ DEVPATH=="/devices/uprobe/*", GOTO="vpd_end" DEVPATH=="/devices/kprobe/*", GOTO="vpd_end" DEVPATH=="/devices/rbd/*", GOTO="vpd_end" +SUBSYSTEM=="scsi_device", GOTO="vpd_update" +SUBSYSTEM=="scsi_host", GOTO="vpd_update" +# Don't generate extra events, we have one for the scsi_device already +# This rule also skips SCSI block device uevents +# (but the corresponding scsi_device will have triggered vpdupdate). +SUBSYSTEMS=="scsi*", GOTO="vpd_end" + +# virtual NVMe devices (NVMeoF) are skipped because of the rule above +SUBSYSTEM=="nvme", GOTO="vpd_update" +SUBSYSTEM=="nvme-subsystem", GOTO="vpd_update" +SUBSYSTEMS=="nvme*", GOTO="vpd_end" + LABEL="vpd_update" RUN+="/bin/touch /run/run.vpdupdate" LABEL="vpd_end" -- 2.25.0 ++++++ udev-rules-don-t-touch-run.vpdupdate-for-ignored-dev.patch ++++++ >From 34f8ba2c35e278af38693f6a91d65690d1faf6bf Mon Sep 17 00:00:00 2001 From: Martin Wilck <[email protected]> Date: Tue, 28 Jan 2020 16:04:42 +0100 Subject: [PATCH 1/3] udev rules: don't touch run.vpdupdate for ignored devices vpdupdate ignores certain sysfs devices. It's pointless to trigger VPD database updates from uevents for these devices. --- 90-vpdupdate.rules | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/90-vpdupdate.rules b/90-vpdupdate.rules index 5a4b42d..43eb75b 100644 --- a/90-vpdupdate.rules +++ b/90-vpdupdate.rules @@ -1 +1,18 @@ -KERNELS=="*", ACTION=="*", DEVPATH=="/devices/*", RUN+="/bin/touch /run/run.vpdupdate" +# See SysFSTreeCollector::filterDevicePath() +DEVPATH=="/devices/virtual/*", GOTO="vpd_end" +DEVPATH=="/devices/system/*", GOTO="vpd_end" +DEVPATH=="/devices/cpu/*", GOTO="vpd_end" +DEVPATH=="/devices/breakpoint/*", GOTO="vpd_end" +DEVPATH=="/devices/tracepoint/*", GOTO="vpd_end" +DEVPATH=="/devices/software/*", GOTO="vpd_end" + +# See SysFSTreeCollector::filterDevice() +ENV{DEVTYPE}=="scsi_target", GOTO="vpd_end" +SUBSYSTEM=="enclosure", GOTO="vpd_end" + +# See SysFSTreeCollector::isDevice() +ENV{DEVTYPE}=="partition", GOTO="vpd_end" + +LABEL="vpd_update" +RUN+="/bin/touch /run/run.vpdupdate" +LABEL="vpd_end" -- 2.25.0 ++++++ udev-rules-more-software-devices-to-ignore.patch ++++++ >From b15caf51a61628e4e5de0539beb3a35b34310369 Mon Sep 17 00:00:00 2001 From: Martin Wilck <[email protected]> Date: Tue, 28 Jan 2020 16:06:33 +0100 Subject: [PATCH 2/3] udev rules: more software devices to ignore Additional subdirectories under /sys/devices that don't contain nodes usable for vpdupdate. --- 90-vpdupdate.rules | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/90-vpdupdate.rules b/90-vpdupdate.rules index 43eb75b..d906ffa 100644 --- a/90-vpdupdate.rules +++ b/90-vpdupdate.rules @@ -13,6 +13,11 @@ SUBSYSTEM=="enclosure", GOTO="vpd_end" # See SysFSTreeCollector::isDevice() ENV{DEVTYPE}=="partition", GOTO="vpd_end" +# More devices that aren't covered by VPD +DEVPATH=="/devices/uprobe/*", GOTO="vpd_end" +DEVPATH=="/devices/kprobe/*", GOTO="vpd_end" +DEVPATH=="/devices/rbd/*", GOTO="vpd_end" + LABEL="vpd_update" RUN+="/bin/touch /run/run.vpdupdate" LABEL="vpd_end" -- 2.25.0
