Systemd/src
Lennart Poettering eef85c4a3f core: track why unit dependencies came to be
This replaces the dependencies Set* objects by Hashmap* objects, where
the key is the depending Unit, and the value is a bitmask encoding why
the specific dependency was created.

The bitmask contains a number of different, defined bits, that indicate
why dependencies exist, for example whether they are created due to
explicitly configured deps in files, by udev rules or implicitly.

Note that memory usage is not increased by this change, even though we
store more information, as we manage to encode the bit mask inside the
value pointer each Hashmap entry contains.

Why this all? When we know how a dependency came to be, we can update
dependencies correctly when a configuration source changes but others
are left unaltered. Specifically:

1. We can fix UDEV_WANTS dependency generation: so far we kept adding
   dependencies configured that way, but if a device lost such a
   dependency we couldn't them again as there was no scheme for removing
   of dependencies in place.

2. We can implement "pin-pointed" reload of unit files. If we know what
   dependencies were created as result of configuration in a unit file,
   then we know what to flush out when we want to reload it.

3. It's useful for debugging: "systemd-analyze dump" now shows
   this information, helping substantially with understanding how
   systemd's dependency tree came to be the way it came to be.
2017-11-10 19:45:29 +01:00
..
ac-power build-sys: drop automake support 2017-07-18 10:04:44 -04:00
activate tree-wide: make use of getpid_cached() wherever we can 2017-07-20 20:27:24 +02:00
analyze build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
ask-password build-sys: drop automake support 2017-07-18 10:04:44 -04:00
backlight build-sys: drop automake support 2017-07-18 10:04:44 -04:00
basic virt: trivial whitespace fixes 2017-11-10 19:00:06 +01:00
binfmt exec-util,conf-files: skip non-executable files in execute_directories() 2017-09-13 11:42:31 +02:00
boot build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
busctl busctl: monitor - ignore the final NameLost message 2017-05-25 17:37:50 +02:00
cgls build-sys: drop automake support 2017-07-18 10:04:44 -04:00
cgroups-agent build-sys: drop automake support 2017-07-18 10:04:44 -04:00
cgtop build-sys: drop automake support 2017-07-18 10:04:44 -04:00
core core: track why unit dependencies came to be 2017-11-10 19:45:29 +01:00
coredump build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
cryptsetup Merge pull request #7089 from oniko/luks2-support 2017-11-10 16:16:36 +01:00
debug-generator build-sys: drop automake support 2017-07-18 10:04:44 -04:00
delta build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
detect-virt build-sys: drop automake support 2017-07-18 10:04:44 -04:00
dissect dissect: when we invoke dissection on a loop device with partscan help the user 2017-10-26 17:54:56 +02:00
environment-d-generator exec-util,conf-files: skip non-executable files in execute_directories() 2017-09-13 11:42:31 +02:00
escape escape: fix systemd-escape description text 2017-07-31 18:01:42 +02:00
firstboot systemd-firstboot: add vconsole keymap support (#7035) 2017-11-10 10:31:44 +01:00
fsck Merge pull request #6974 from keszybz/clean-up-defines 2017-10-04 19:25:30 +02:00
fstab-generator tree-wide: fput[cs]() → fput[cs]_unlocked() wherever that makes sense (#6396) 2017-07-21 10:35:45 +02:00
getty-generator getty-generator: shift relevant comment to above tty_is_vc() 2017-08-07 17:23:41 +01:00
gpt-auto-generator gpt-auto-generator: make sure "r" is always set 2017-11-10 19:00:06 +01:00
hibernate-resume build-sys: drop automake support 2017-07-18 10:04:44 -04:00
hostname treewide: unify identical definitions of polkit_agent_open_if_enabled() (#7187) 2017-10-30 09:57:53 +01:00
hwdb exec-util,conf-files: skip non-executable files in execute_directories() 2017-09-13 11:42:31 +02:00
import importd: remove IN_SET to avoid ambiguity 2017-11-01 23:09:05 +01:00
initctl tree-wide: make use of getpid_cached() wherever we can 2017-07-20 20:27:24 +02:00
journal journal: disable -Waddress-of-packed-member under clang 2017-11-01 23:10:25 +01:00
journal-remote Reverting erroneous changes made of the course of adding a timeout to journal-remote event handling (#7219) 2017-11-01 10:15:38 +01:00
kernel-install build-sys: drop automake support 2017-07-18 10:04:44 -04:00
libsystemd tree-wide: do not work in assert() 2017-11-09 18:38:02 +09:00
libsystemd-network libsystemd-network: coding style fix 2017-11-09 18:39:41 +09:00
libudev meson: move library version defines to the top (#6939) 2017-09-28 19:24:16 +02:00
locale systemd-firstboot: add vconsole keymap support (#7035) 2017-11-10 10:31:44 +01:00
login Merge pull request #7096 from keszybz/logind-session-killing 2017-11-10 15:51:39 +01:00
machine Merge pull request #6996 from poettering/discover-block-device 2017-10-30 16:05:20 +01:00
machine-id-setup build-sys: drop automake support 2017-07-18 10:04:44 -04:00
modules-load modules-load: downgrade error on ENODEV/ENOENT 2017-10-08 22:29:45 +02:00
mount treewide: unify identical definitions of polkit_agent_open_if_enabled() (#7187) 2017-10-30 09:57:53 +01:00
network networkd: set dhcp_use_routes to true when dhcp_anonymize is true (#7209) 2017-11-10 16:03:43 +01:00
notify build-sys: drop automake support 2017-07-18 10:04:44 -04:00
nspawn dissect: when we invoke dissection on a loop device with partscan help the user 2017-10-26 17:54:56 +02:00
nss-myhostname tree-wide: use !IN_SET(..) for a != b && a != c && … 2017-10-02 13:09:56 +02:00
nss-mymachines nss: use secure_getenv for behaviour-modifying booleans (#6817) 2017-09-14 09:20:27 +02:00
nss-resolve tree-wide: use IN_SET macro (#6977) 2017-10-04 16:01:32 +02:00
nss-systemd nss-systemd: if cannot open bus, then try to read user info directly (#6971) 2017-10-04 19:29:36 +02:00
path build-sys: drop automake support 2017-07-18 10:04:44 -04:00
quotacheck build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
random-seed build-sys: drop automake support 2017-07-18 10:04:44 -04:00
rc-local-generator build-sys: drop automake support 2017-07-18 10:04:44 -04:00
remount-fs build-sys: drop automake support 2017-07-18 10:04:44 -04:00
reply-password build-sys: drop automake support 2017-07-18 10:04:44 -04:00
resolve resolved: change newline position in stub-resolv.conf (#7216) 2017-10-30 10:34:41 +01:00
rfkill rfkill: include the device name in error message 2017-10-18 17:39:54 +02:00
run treewide: unify identical definitions of polkit_agent_open_if_enabled() (#7187) 2017-10-30 09:57:53 +01:00
shared Merge pull request #7089 from oniko/luks2-support 2017-11-10 16:16:36 +01:00
sleep fileio: make write_string_stream() accept flags parameter 2017-09-22 20:55:34 +02:00
socket-proxy tree-wide: use IN_SET macro (#6977) 2017-10-04 16:01:32 +02:00
stdio-bridge tree-wide: when %m is used in log_*, always specify errno explicitly 2017-05-19 14:24:03 -04:00
sulogin-shell sulogin-shell: switch from shell implementation to a C implementation (#6698) 2017-09-08 18:21:37 +02:00
sysctl exec-util,conf-files: skip non-executable files in execute_directories() 2017-09-13 11:42:31 +02:00
system-update-generator build-sys: drop automake support 2017-07-18 10:04:44 -04:00
systemctl treewide: unify identical definitions of polkit_agent_open_if_enabled() (#7187) 2017-10-30 09:57:53 +01:00
systemd Add sd_bus_message_new and sd_bus_message_seal as public functions (#6609) 2017-10-30 16:08:46 +01:00
sysusers Merge pull request #6974 from keszybz/clean-up-defines 2017-10-04 19:25:30 +02:00
sysv-generator tree-wide: use IN_SET where possible 2017-10-02 13:09:54 +02:00
test systemd-firstboot: add vconsole keymap support (#7035) 2017-11-10 10:31:44 +01:00
timedate treewide: unify identical definitions of polkit_agent_open_if_enabled() (#7187) 2017-10-30 09:57:53 +01:00
timesync timesync: make poll interval configurable 2017-11-08 01:47:38 +09:00
tmpfiles Merge pull request #6974 from keszybz/clean-up-defines 2017-10-04 19:25:30 +02:00
tty-ask-password-agent tree-wide: use IN_SET macro (#6977) 2017-10-04 16:01:32 +02:00
udev util-lib: introdude _cleanup_ macros for kmod objects 2017-10-08 22:04:07 +02:00
update-done build-sys: drop automake support 2017-07-18 10:04:44 -04:00
update-utmp Merge pull request #6974 from keszybz/clean-up-defines 2017-10-04 19:25:30 +02:00
user-sessions build-sys: drop automake support 2017-07-18 10:04:44 -04:00
vconsole build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
veritysetup tree-wide: use IN_SET where possible 2017-10-02 13:09:54 +02:00
volatile-root build-sys: drop automake support 2017-07-18 10:04:44 -04:00