diff options
author | Franck Bui <fbui@suse.com> | 2022-09-12 17:54:22 +0200 |
---|---|---|
committer | Franck Bui <fbui@suse.com> | 2022-10-05 14:52:38 +0200 |
commit | 87c734eedd4cba78d2a5b8aa1fe07b85efbc5a5a (patch) | |
tree | f867b0068d140592e6ba435941b91c01745e40f9 /src/core/unit.h | |
parent | 9c77ffc7e0459e2bbc4c0c54ff065aa302ecd62e (diff) | |
download | systemd-87c734eedd4cba78d2a5b8aa1fe07b85efbc5a5a.tar.gz |
mount: replace UNIT_DEPENDENCY_MOUNTINFO_OR_FILE with UNIT_DEPENDENCY_MOUNTINFO/UNIT_DEPENDENCY_MOUNT_FILE
UNIT_DEPENDENCY_MOUNTINFO_OR_FILE was a bit strange as unlike the other flags
we don't know where the dependency came from exactly. Indeed its origin could
have been from the mount unit file or from /proc/self/mountinfo.
Instead this patch replaces UNIT_DEPENDENCY_MOUNTINFO_OR_FILE with 2 new
dependency flags: UNIT_DEPENDENCY_MOUNT_FILE and UNIT_DEPENDENCY_MOUNTINFO. The
former indicates that the dep is created from the unit file but unlike
UNIT_DEPENDENCY_FILE, it will be replaced by a dep with the
UNIT_DEPENDENCY_MOUNTINFO flag as soon as the kernel will make the mount
available in /proc/self/mountinfo.
Diffstat (limited to 'src/core/unit.h')
-rw-r--r-- | src/core/unit.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/unit.h b/src/core/unit.h index 06ec7ea7b5..b34c59c3eb 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -79,17 +79,21 @@ typedef enum UnitDependencyMask { /* A dependency created because of some unit's RequiresMountsFor= setting */ UNIT_DEPENDENCY_PATH = 1 << 4, - /* A dependency created because of data read from /proc/self/mountinfo, but fallback to unit configuration - * sources */ - UNIT_DEPENDENCY_MOUNTINFO_OR_FILE = 1 << 5, + /* A dependency initially configured from the mount unit file however the dependency will be updated + * from /proc/self/mountinfo as soon as the kernel will make the entry for that mount available in + * the /proc file */ + UNIT_DEPENDENCY_MOUNT_FILE = 1 << 5, + + /* A dependency created or updated because of data read from /proc/self/mountinfo */ + UNIT_DEPENDENCY_MOUNTINFO = 1 << 6, /* A dependency created because of data read from /proc/swaps and no other configuration source */ - UNIT_DEPENDENCY_PROC_SWAP = 1 << 6, + UNIT_DEPENDENCY_PROC_SWAP = 1 << 7, /* A dependency for units in slices assigned by directly setting Slice= */ - UNIT_DEPENDENCY_SLICE_PROPERTY = 1 << 7, + UNIT_DEPENDENCY_SLICE_PROPERTY = 1 << 8, - _UNIT_DEPENDENCY_MASK_FULL = (1 << 8) - 1, + _UNIT_DEPENDENCY_MASK_FULL = (1 << 9) - 1, } UnitDependencyMask; /* The Unit's dependencies[] hashmaps use this structure as value. It has the same size as a void pointer, and thus can |