Hello Lennart, Lennart Poettering [2015-05-18 14:10 +0200]: > I don't really grok what the problem you are experencing is supposed > to be: note that a device showing up in /proc/self/mountinfo means it > will be set to "tentative" state, and thus will not resolve in an > unmount. What more do you need?
Exactly, that's what these patches do. > The whole point of the "tentative" state is that devices showing up in > /proc/self/mountinfo but not in /sys are put in it. Are you saying > that does not work? Right. As I said, the problem is that when /mountinfo is being read, .device units (with state tentative/found == MOUNT) are not actually being created, despite the comment saying so. They are created later, rather unintentionally, in unit_add_node_link() which calls manager_load_unit(); but the latter always just creates stubs with state "dead", and never sets any proper state. > Generally, dependencies should not be generated depending on state. > Dependencies should be static as much as possible, and sometimes > augmented as we load in more units, but the very clear focus needs > to be to keep them as static as possible. Acting on them should be > dynamic however, and hence our state engines for the units should be > optimized to reflect the unit state as fine-grained as necessary. Fully agreed. > I don't understand your patch I must say, but from what I grok it > appears to make deps dynamic, based on state, and that's something I > really don't like. No, it just fixes the creation of the .device units to happen at the right and intended time (when we actually have a proper state), and thus have the intended state "tentative" instead of "dead". Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel