From 2864ad8c10be2651cbca4d924a4113774e0b22bd Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 10 2020 18:27:01 +0000 Subject: import systemd-239-39.el8 --- diff --git a/SOURCES/0430-device-make-sure-we-emit-PropertiesChanged-signal-on.patch b/SOURCES/0430-device-make-sure-we-emit-PropertiesChanged-signal-on.patch new file mode 100644 index 0000000..8d202a4 --- /dev/null +++ b/SOURCES/0430-device-make-sure-we-emit-PropertiesChanged-signal-on.patch @@ -0,0 +1,26 @@ +From 91dddaafe0b6fcc9c0a57d2feef599b82ce2a146 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michal=20Sekleta=CC=81r?= +Date: Thu, 26 Mar 2020 13:34:20 +0100 +Subject: [PATCH] device: make sure we emit PropertiesChanged signal once we + set sysfs + +(cherry picked from commit 7c4d139485139eae95b17a1d54cb51ae958abd70) + +Related: #1793533 +--- + src/core/device.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/core/device.c b/src/core/device.c +index a2d00a0fbe..21fe3802bd 100644 +--- a/src/core/device.c ++++ b/src/core/device.c +@@ -81,6 +81,8 @@ static int device_set_sysfs(Device *d, const char *sysfs) { + } + + d->sysfs = TAKE_PTR(copy); ++ unit_add_to_dbus_queue(UNIT(d)); ++ + return 0; + } + diff --git a/SOURCES/0431-device-don-t-emit-PropetiesChanged-needlessly.patch b/SOURCES/0431-device-don-t-emit-PropetiesChanged-needlessly.patch new file mode 100644 index 0000000..e0986d5 --- /dev/null +++ b/SOURCES/0431-device-don-t-emit-PropetiesChanged-needlessly.patch @@ -0,0 +1,44 @@ +From a4cefc9f8bf24b2fdcc62cc0d2685698814374d4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michal=20Sekleta=CC=81r?= +Date: Thu, 26 Mar 2020 13:35:11 +0100 +Subject: [PATCH] device: don't emit PropetiesChanged needlessly +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Functions called from device_setup_unit() already make sure that unit is +enqueued in case it is a new unit or properties exported on the bus have +changed. + +This should prevent unnecessary DBus wakeups and associated DBus traffic +when device_setup_unit() was called while reparsing /proc/self/mountinfo +due to the mountinfo notifications. Note that we parse +/proc/self/mountinfo quite often on the busy systems (e.g. k8s container +hosts) but majority of the time mounts didn't change, only some mount +got added. Thus we don't need to generate PropertiesChanged for devices +associated with the mounts that didn't change. + +Thanks to Renaud Métrich for debugging the +problem and providing draft version of the patch. + +(cherry picked from commit 2e129d5d6bd6bd8be4b5359e81a880cbf72a44b8) + +Resolves: #1793533 +--- + src/core/device.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/core/device.c b/src/core/device.c +index 21fe3802bd..021c28dfbd 100644 +--- a/src/core/device.c ++++ b/src/core/device.c +@@ -549,9 +549,6 @@ static int device_setup_unit(Manager *m, struct udev_device *dev, const char *pa + if (dev && device_is_bound_by_mounts(DEVICE(u), dev)) + device_upgrade_mount_deps(u); + +- /* Note that this won't dispatch the load queue, the caller has to do that if needed and appropriate */ +- unit_add_to_dbus_queue(u); +- + return 0; + + fail: diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec index 836155a..71fc1e9 100644 --- a/SPECS/systemd.spec +++ b/SPECS/systemd.spec @@ -13,7 +13,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 239 -Release: 38%{?dist} +Release: 39%{?dist} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager @@ -479,6 +479,8 @@ Patch0426: 0426-core-fix-the-return-value-in-order-to-make-sure-we-d.patch Patch0427: 0427-test-add-test-for-cgroup-v2-freezer-support.patch Patch0428: 0428-fix-mis-merge.patch Patch0429: 0429-tests-sleep-a-bit-and-give-kernel-time-to-perform-th.patch +Patch0430: 0430-device-make-sure-we-emit-PropertiesChanged-signal-on.patch +Patch0431: 0431-device-don-t-emit-PropetiesChanged-needlessly.patch %ifarch %{ix86} x86_64 aarch64 @@ -1107,6 +1109,10 @@ fi %files tests -f .file-list-tests %changelog +* Thu Aug 06 2020 systemd maintenance team - 239-39 +- device: make sure we emit PropertiesChanged signal once we set sysfs (#1793533) +- device: don't emit PropetiesChanged needlessly (#1793533) + * Tue Aug 04 2020 systemd maintenance team - 239-38 - spec: fix rpm verification (#1702300)