r809 - lvm2/trunk/debian/tree/dmsetup/lib/udev/rules.d

Bastian Blank waldi at alioth.debian.org
Wed May 19 11:11:45 UTC 2010


Author: waldi
Date: Wed May 19 11:11:34 2010
New Revision: 809

Log:
debian/tree/dmsetup/lib/udev/rules.d/55-dm.rules: Adopt further changes.

Modified:
   lvm2/trunk/debian/tree/dmsetup/lib/udev/rules.d/55-dm.rules

Modified: lvm2/trunk/debian/tree/dmsetup/lib/udev/rules.d/55-dm.rules
==============================================================================
--- lvm2/trunk/debian/tree/dmsetup/lib/udev/rules.d/55-dm.rules	Wed May 19 11:07:53 2010	(r808)
+++ lvm2/trunk/debian/tree/dmsetup/lib/udev/rules.d/55-dm.rules	Wed May 19 11:11:34 2010	(r809)
@@ -19,8 +19,35 @@
 # kernels >= 2.6.31 only.
 ENV{DM_COOKIE}=="?*", IMPORT{program}="/sbin/dmsetup udevflags $env{DM_COOKIE}"
 
+# Normally, we would test for DM_UDEV_DISABLE_DM_RULES_FLAG here and skip
+# the rules if set. However, we need to set DM_* environment variables
+# for now to properly filter out inappropriate events. This dependency
+# might be removed in the future.
+
 ACTION!="add|change", GOTO="dm_end"
 
+# There is no cookie set nor any flags encoded in events not originating
+# in libdevmapper so we need to detect this and try to behave correctly.
+# For such spurious events, regenerate all flags from current udev database content
+# (this information would normally be inaccessible for spurious ADD and CHANGE events).
+ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", GOTO="dm_flags_done"
+IMPORT{db}="DM_UDEV_DISABLE_DM_RULES_FLAG"
+IMPORT{db}="DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG"
+IMPORT{db}="DM_UDEV_DISABLE_DISK_RULES_FLAG"
+IMPORT{db}="DM_UDEV_DISABLE_OTHER_RULES_FLAG"
+IMPORT{db}="DM_UDEV_LOW_PRIORITY_FLAG"
+IMPORT{db}="DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG"
+IMPORT{db}="DM_UDEV_FLAG7"
+IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG0"
+IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG1"
+IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG2"
+IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG3"
+IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG4"
+IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG5"
+IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG6"
+IMPORT{db}="DM_SUBSYSTEM_UDEV_FLAG7"
+LABEL="dm_flags_done"
+
 # Normally, we operate on "change" events only. But when
 # coldplugging, there's an "add" event present. We have to
 # recognize this and do our actions in this particular
@@ -45,10 +72,10 @@
 ENV{DM_SUSPENDED}=="Active", ENV{DM_SUSPENDED}="0"
 ENV{DM_SUSPENDED}=="Suspended", ENV{DM_SUSPENDED}="1"
 
-ENV{DM_NAME}=="?*", NAME="mapper/$env{DM_NAME}", SYMLINK+="$kernel"
-
 ENV{DM_UDEV_RULES}="1"
 
+ENV{DM_NAME}=="?*", NAME="mapper/$env{DM_NAME}", SYMLINK+="$kernel"
+
 # We have to ignore further rule application for inappropriate events
 # and devices. But still send the notification if cookie exists.
 ENV{DM_UUID}=="mpath-?*", ENV{DM_ACTION}=="PATH_FAILED", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1"



More information about the pkg-lvm-commits mailing list