[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] LVM2 ./WHATS_NEW_DM udev/10-dm.rules.in

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha sourceware org	2010-08-12 13:41:19

Modified files:
	.              : WHATS_NEW_DM 
	udev           : 10-dm.rules.in 

Log message:
	Fix udev rules to support udev database content generated by older rules.
	This can happen with older rules (without support for synthesized events)
	that are still part of initrd while using new udev rules in the system itself.
	The consequence was that new udev rules incorrectly assumed that not having
	DM_UDEV_PRIMARY_SOURCE_FLAG set always means the uevent is synthesized and
	inappropriate (device is still not properly activated) and so it should be
	ignored. However, initrd is not updated automatically while updating the
	libdevmapper/udev rules in the system and so we end up with the rules not
	detecting and setting crucial parts in the initrd environment and the rules
	in the system that rely on the information that should have been stored in
	udev db (which is incorrect in this configuration, of course).
	The overall consequence is that the update of libdevmapper/lvm2 without
	regenerating the initrd could end up with a boot failure! Ignoring the event
	means removing any existing symlinks in /dev!
	To fix this, increase udev rules version to make a difference. So from now on,
	mark rules without proper support for synthesized events as
	DM_UDEV_RULES_VSN="1" and 2 (or higher) if that support is included.


--- LVM2/WHATS_NEW_DM	2010/08/12 13:07:08	1.406
+++ LVM2/WHATS_NEW_DM	2010/08/12 13:41:18	1.407
@@ -1,5 +1,6 @@
 Version 1.02.54 - 
+  Fix udev rules to support udev database content generated by older rules.
   Reinstate detection of inappropriate uevent with DISK_RO set and suppress it.
   Fix segfault in regex matcher with characters of ordinal value > 127.
   Use built-in rule for device aliases: block/ < dm- < disk/ < mapper/ < other.
--- LVM2/udev/10-dm.rules.in	2010/08/12 13:07:08	1.11
+++ LVM2/udev/10-dm.rules.in	2010/08/12 13:41:19	1.12
@@ -66,6 +66,7 @@
 # Normally, we operate on "change" events. But when coldplugging, there's an
@@ -80,7 +81,7 @@
 # before (e.g. in initrd). If udev is used in initrd, we require the udev init
 # script to not remove the existing udev database so we can reuse the information
 # stored at the time of device activation in the initrd.
-ACTION=="add", ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!="1", GOTO="dm_disable"
 # "dm" sysfs subdirectory is available in newer versions of DM
 # only (kernels >= 2.6.29). We have to check for its existence
@@ -106,7 +107,9 @@
 # fact (e.g. fallback to rules that behave correctly even without
 # these rules installed). It also provides versioning for any
 # possible future changes.
+# VSN 1 - original rules
+# VSN 2 - add support for synthesized events

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]