]> git.ipfire.org Git - thirdparty/systemd.git/commit
device: don't emit PropetiesChanged needlessly v239-39
authorMichal Sekletár <msekleta@redhat.com>
Thu, 26 Mar 2020 12:35:11 +0000 (13:35 +0100)
committerJan Synacek <jan.synacek@gmail.com>
Thu, 6 Aug 2020 15:20:43 +0000 (17:20 +0200)
commita4cefc9f8bf24b2fdcc62cc0d2685698814374d4
treec6f68ae71d2adf44411a8117866db16a18d34ea3
parent91dddaafe0b6fcc9c0a57d2feef599b82ce2a146
device: don't emit PropetiesChanged needlessly

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 <rmetrich@redhat.com> for debugging the
problem and providing draft version of the patch.

(cherry picked from commit 2e129d5d6bd6bd8be4b5359e81a880cbf72a44b8)

Resolves: #1793533
src/core/device.c