diff options
author | Martin Pitt <martinpitt@users.noreply.github.com> | 2017-09-15 09:21:49 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-09-15 09:21:49 +0200 |
commit | 6d44591141bd67074338088194aa977986646a59 (patch) | |
tree | c16e28760270393b017e89291c430e41849ca91f | |
parent | ab2116b140a3a087de53b5635cef811b0a3ffdc4 (diff) | |
download | systemd-6d44591141bd67074338088194aa977986646a59.tar.gz |
Revert "device : reload when udev generates a "changed" event" (#6836)
This reverts commit 0ffddc6e2c6e19e5dc81812aee9fbe964059f3aa. That
causes a rather severe disruption of D-Bus and other services when e. g.
restarting local-fs.target (as spotted by the "storage" test regression).
Fixes #6834
-rw-r--r-- | man/systemd.device.xml | 6 | ||||
-rw-r--r-- | src/core/device.c | 22 |
2 files changed, 1 insertions, 27 deletions
diff --git a/man/systemd.device.xml b/man/systemd.device.xml index 6edf1090d0..c60b9c035e 100644 --- a/man/systemd.device.xml +++ b/man/systemd.device.xml @@ -83,12 +83,6 @@ the escaping logic used to convert a file system path to a unit name see <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> - - <para>Device units will be reloaded by systemd whenever the - corresponding device generates a <literal>changed</literal> event. - Other units can use <varname>ReloadPropagatedFrom=</varname> to react - to that event</para> - </refsect1> <refsect1> diff --git a/src/core/device.c b/src/core/device.c index 5366ba050f..87186f135b 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -766,27 +766,7 @@ static int device_dispatch_io(sd_event_source *source, int fd, uint32_t revents, return 0; } - if (streq(action, "change")) { - _cleanup_free_ char *e = NULL; - Unit *u; - - r = unit_name_from_path(sysfs, ".device", &e); - if (r < 0) - return log_error_errno(r, "Failed to generate unit name from device path: %m"); - - u = manager_get_unit(m, e); - if (!u) { - log_error("Failed to get unit from sysfs name."); - return 0; - } - - r = manager_add_job(m, JOB_RELOAD, u, JOB_REPLACE, NULL, NULL); - if (r < 0) { - log_error_errno(r, "Failed to add job to manager : %m"); - return 0; - } - - } else if (streq(action, "remove")) { + if (streq(action, "remove")) { r = swap_process_device_remove(m, dev); if (r < 0) log_error_errno(r, "Failed to process swap device remove event: %m"); |