summaryrefslogtreecommitdiff
path: root/src/basic/unit-name.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-09-25 19:13:37 +0200
committerSven Eden <yamakuzure@gmx.net>2017-09-25 19:13:37 +0200
commitacb0dfc64a315e7bdd002c0a1da110e7008f42fd (patch)
treec632f4c33ebd7d5f460bf3b032637a217a8e780f /src/basic/unit-name.h
parent5a59d7ac6d3bae01c2946dd77363840edbd988b8 (diff)
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.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/basic/unit-name.h b/src/basic/unit-name.h
index 67cd64785..cfe21474a 100644
--- a/src/basic/unit-name.h
+++ b/src/basic/unit-name.h
@@ -90,8 +90,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,