From 9670d583d381d4c2c7f4d80de63bee7ad54fef44 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 25 Nov 2013 21:08:39 +0100 Subject: swap: always track the current real device node of all swap devices, even when not active This way, we can avoid executing two /bin/swapon jobs to be dispatched for the same swap device if it is configured for two different paths. Previously we were just tracking the device nodes of active swap devices, which would not allow us to recognize the identity of two swap devices before they are active. https://bugs.freedesktop.org/show_bug.cgi?id=69835 --- src/core/manager.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/manager.h') diff --git a/src/core/manager.h b/src/core/manager.h index d6a6bce424..bf05812fc5 100644 --- a/src/core/manager.h +++ b/src/core/manager.h @@ -138,8 +138,9 @@ struct Manager { char *generator_unit_path_early; char *generator_unit_path_late; - /* Data specific to the device subsystem */ struct udev* udev; + + /* Data specific to the device subsystem */ struct udev_monitor* udev_monitor; sd_event_source *udev_event_source; Hashmap *devices_by_sysfs; @@ -151,7 +152,7 @@ struct Manager { /* Data specific to the swap filesystem */ FILE *proc_swaps; sd_event_source *swap_event_source; - Hashmap *swaps_by_proc_swaps; + Hashmap *swaps_by_devnode; /* Data specific to the D-Bus subsystem */ sd_bus *api_bus, *system_bus; -- cgit v1.2.3-54-g00ecf