summaryrefslogtreecommitdiffstats
path: root/udev
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2010-08-12 13:07:08 +0000
committerPeter Rajnoha <prajnoha@redhat.com>2010-08-12 13:07:08 +0000
commitb045f4fe9a0fc433554e99324fa3c2598f383d06 (patch)
tree3a62346b938537a578bfeab0ab12e20e935934f0 /udev
parent2565ffad25808c25cbf5509e8c5ffc2a1c05671f (diff)
downloadlvm2-b045f4fe9a0fc433554e99324fa3c2598f383d06.tar.gz
lvm2-b045f4fe9a0fc433554e99324fa3c2598f383d06.tar.xz
lvm2-b045f4fe9a0fc433554e99324fa3c2598f383d06.zip
Reinstate detection of inappropriate uevent with DISK_RO set and suppress it.
We still need to detect this one! We're not so strict with CHANGE events as with the ADD events while applying filters in the rules so this one would pass and it would process the rules prematurely (because it appears *before* the actual CHANGE event used when resuming a DM device while setting read-only state at the same time).
Diffstat (limited to 'udev')
-rw-r--r--udev/10-dm.rules.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
index 5d2a22b4..c40805a8 100644
--- a/udev/10-dm.rules.in
+++ b/udev/10-dm.rules.in
@@ -42,6 +42,9 @@ ENV{DM_COOKIE}=="?*", IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup udevflags $env
# is not recommended.
ACTION!="add|change", GOTO="dm_end"
+# Rule out easy-to-detect inappropriate events first.
+ENV{DISK_RO}=="1", GOTO="dm_disable"
+
# 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