diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-09-25 19:13:37 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-09-26 16:17:22 +0200 |
commit | 22af0e5873978efbb3c210dc4c889041c7d56447 (patch) | |
tree | ba3e6b2576dd9e6f14194a95662314461f805976 /src/basic/unit-name.h | |
parent | mount: clean up reload_result management a bit (diff) | |
download | systemd-22af0e5873978efbb3c210dc4c889041c7d56447.tar.xz systemd-22af0e5873978efbb3c210dc4c889041c7d56447.zip |
mount: rework mount state engine
This changes the mount unit state engine in the following ways:
1. The MOUNT_MOUNTING_SIGTERM and MOUNT_MOUNTING_SIGKILL are removed.
They have been pretty much equivalent to MOUNT_UNMOUNTING_SIGTERM and
MOUNT_UNMOUNTING_SIGKILL in what they do, and the outcome has been
the same as well: the unit is stopped. Hence, let's simplify things a
bit, and merge them. Note that we keep
MOUNT_REMOUNTING_{SIGTERM|SIGKILL} however, as those states have a
different outcome: the unit remains started.
2. mount_enter_signal() will now honour the SendSIGKILL= option of the
mount unit if it was set. This was previously done already when we
entered the signal states through a timeout, and was simply missing
here.
3. A new helper function mount_enter_dead_or_mounted() is added that
places the mount unit in either MOUNT_DEAD or MOUNT_MOUNTED,
depending on what the kernel thinks about the mount's state. This
function is called at various places now, wherever we finished an
operation, and want to make sure our own state reflects again what
the kernel thinks. Previously we had very similar code in a number of
places and in other places didn't recheck the kernel state. Let's do
that with the same logic and function at all relevant places now.
4. Rework mount_stop(): never forget about running control processes.
Instead: when we have a start (i.e. a /bin/mount) process running,
and are asked to stop, then enter the kill states for it, so that it
gets cleaned up. This fixes #6048. Moreover, when we have a reload
process running convert the possible states into the relevant
unmounting states, so that we can properly execute the requested
operation.
Fixes #6048
Diffstat (limited to 'src/basic/unit-name.h')
-rw-r--r-- | src/basic/unit-name.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/basic/unit-name.h b/src/basic/unit-name.h index f40fff3fe1..55f6372ee5 100644 --- a/src/basic/unit-name.h +++ b/src/basic/unit-name.h @@ -89,8 +89,6 @@ typedef enum MountState { MOUNT_MOUNTED, MOUNT_REMOUNTING, MOUNT_UNMOUNTING, - MOUNT_MOUNTING_SIGTERM, - MOUNT_MOUNTING_SIGKILL, MOUNT_REMOUNTING_SIGTERM, MOUNT_REMOUNTING_SIGKILL, MOUNT_UNMOUNTING_SIGTERM, |