summaryrefslogtreecommitdiff
path: root/src/core/swap.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-02-27 21:55:08 +0100
committerLennart Poettering <lennart@poettering.net>2015-02-28 17:38:38 +0100
commit628c89cc68ab96fce2de7ebba5933725d147aecc (patch)
tree0ad23950d2ff4895b0de0c4163baa9be8617c4e3 /src/core/swap.h
parent1a1db450e54c549382e8466130e63b91ae78b552 (diff)
downloadsystemd-628c89cc68ab96fce2de7ebba5933725d147aecc.tar.gz
core: rework device state logic
This change introduces a new state "tentative" for device units. Device units are considered "plugged" when udev announced them, "dead" when they are not available in the kernel, and "tentative" when they are referenced in /proc/self/mountinfo or /proc/swaps but not (yet) announced via udev. This should fix a race when device nodes (like loop devices) are created and immediately mounted. Previously, systemd might end up seeing the mount unit before the device, and would thus pull down the mount because its BindTo dependency on the device would not be fulfilled.
Diffstat (limited to 'src/core/swap.h')
-rw-r--r--src/core/swap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/swap.h b/src/core/swap.h
index c36c6f2ce9..5de8c20c04 100644
--- a/src/core/swap.h
+++ b/src/core/swap.h
@@ -115,8 +115,8 @@ struct Swap {
extern const UnitVTable swap_vtable;
-int swap_process_new_device(Manager *m, struct udev_device *dev);
-int swap_process_removed_device(Manager *m, struct udev_device *dev);
+int swap_process_device_new(Manager *m, struct udev_device *dev);
+int swap_process_device_remove(Manager *m, struct udev_device *dev);
const char* swap_state_to_string(SwapState i) _const_;
SwapState swap_state_from_string(const char *s) _pure_;