]> sourceware.org Git - lvm2.git/commitdiff
Set DM_UDEV_DISABLE_OTHER_RULES_FLAG for suspended DM devices in udev rules.
authorPeter Rajnoha <prajnoha@redhat.com>
Fri, 28 Jan 2011 11:41:51 +0000 (11:41 +0000)
committerPeter Rajnoha <prajnoha@redhat.com>
Fri, 28 Jan 2011 11:41:51 +0000 (11:41 +0000)
This is to avoid any scanning and processing of DM devices while they are in
suspended state (e.g. a rename while the device is suspended - a CHANGE event
is generated!). Otherwise, any scanning in the rules could end up with locking
the calling process until the device is resumed and so we don't receive a
notification about udev rules completion until then (and that effectively
locks out the process awaiting the notification!).

However, we still keep 'disk' and any 'subsystem' related udev rules running.
We trust these and these should check themselves whether a device is suspended
or not, not trying to run any scanning if it is.

WHATS_NEW_DM
udev/10-dm.rules.in

index efe51b47549a9f03c556a07fb806a305649de1a9..2f24c5ddf4c1fc7ca974599fcfce66f5c5eb5222 100644 (file)
@@ -1,5 +1,6 @@
 Version 1.02.62 - 
 ===================================
+  Set DM_UDEV_DISABLE_OTHER_RULES_FLAG for suspended DM devices in udev rules.
   Initialize pool object for each row in _output_as_rows().
 
 Version 1.02.61 - 10th January 2011
index 4d50ed3df39137fd2aad18e26657e00443eddf78..606a13dbb08083bf2555523c7bcbd796d8d0c514 100644 (file)
@@ -119,6 +119,11 @@ ENV{DM_UUID}=="mpath-?*", ENV{DM_ACTION}=="PATH_FAILED", GOTO="dm_disable"
 ENV{DM_UUID}=="CRYPT-TEMP-?*", GOTO="dm_disable"
 ENV{DM_UUID}!="?*", ENV{DM_NAME}=="temporary-cryptsetup-?*", GOTO="dm_disable"
 
+# 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.
+ENV{DM_SUSPENDED}=="1", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1"
+
 GOTO="dm_end"
 
 LABEL="dm_disable"
This page took 0.039938 seconds and 5 git commands to generate.