diff options
author | Valentin David <valentin.david@canonical.com> | 2022-11-08 13:53:44 +0100 |
---|---|---|
committer | Valentin David <valentin.david@canonical.com> | 2023-01-11 15:30:42 +0100 |
commit | 6dc68a00cfc816678fd713b12ae2a4cf2ae6da85 (patch) | |
tree | 6cd87b357a2debaaf6a8d3fad4cf78070be8d527 /src/shutdown/umount.h | |
parent | shutdown: Drop bit fields in boolean declarations (diff) | |
download | systemd-6dc68a00cfc816678fd713b12ae2a4cf2ae6da85.tar.xz systemd-6dc68a00cfc816678fd713b12ae2a4cf2ae6da85.zip |
shutdown: Move busy mounts to not block parent mounts
There is a case that confuses systemd-shutdown: a filesystem has been moved to
a mount point which is part of another filesystem from an image from that
former filesystem. systemd-shutdown cannot unmount any of those two
filesystems. It needs first to move the filesystem containing the image of the
other out of the tree of that image.
Here we move leaf mount points when they are busy so that they do not block
parent mounts. We can only move leafs at each iteration since moving mount
points also move sub mount points which would invalidate we read from
`/proc/self/mountinfo`.
Diffstat (limited to 'src/shutdown/umount.h')
-rw-r--r-- | src/shutdown/umount.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shutdown/umount.h b/src/shutdown/umount.h index 6261e719b0..a742ac0af5 100644 --- a/src/shutdown/umount.h +++ b/src/shutdown/umount.h @@ -20,6 +20,7 @@ typedef struct MountPoint { unsigned long remount_flags; bool try_remount_ro; bool umount_lazily; + bool leaf; dev_t devnum; LIST_FIELDS(struct MountPoint, mount_point); } MountPoint; |