File 10-dm.rules-Reset-state-variable-for-spurious-events.patch of Package lvm2.7683
From de73c1ab474661307d87b3bcfe442fd9f3e31233 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
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 <hare@suse.com>
---
udev/10-dm.rules.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
index bcf2a09..70cf666 100644
--- a/udev/10-dm.rules.in
+++ b/udev/10-dm.rules.in
@@ -127,6 +127,11 @@ ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1", ENV{DM_NAME}=="?*", SYMLINK+="(DM_DIR)/
# We have to ignore further rule application for inappropriate events
# and devices. But still send the notification if cookie exists.
+# 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.
--
2.6.6