From de73c1ab474661307d87b3bcfe442fd9f3e31233 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Fri, 19 Aug 2016 16:16:13 +0200 Subject: [PATCH] 10-dm.rules: Reset state variables for spurious events When spurious events are generated we need to ensure to always present the same information than the original event; otherwise systemd might be thinking the device to be non-functional and will take unwanted action (like unmounting it). References: bsc#932300 Signed-off-by: Hannes Reinecke --- udev/10-dm.rules.in | 5 +++++ 1 file changed, 5 insertions(+) Index: LVM2.2.02.165/udev/10-dm.rules.in =================================================================== --- LVM2.2.02.165.orig/udev/10-dm.rules.in +++ LVM2.2.02.165/udev/10-dm.rules.in @@ -138,6 +138,11 @@ ENV{DM_UDEV_RULES_VSN}="2" ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1", ENV{DM_NAME}=="?*", SYMLINK+="(DM_DIR)/$env{DM_NAME}" +# Reset variables for spurious events +ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}="" +ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}="" +ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="" + # Avoid processing and scanning a DM device in the other (foreign) # rules if it is in suspended state. However, we still keep 'disk' # and 'DM subsystem' related rules enabled in this case.