mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Update udev rules to skip DM flags decoding for removed devices
Skip decoding of DM flags when device is removed. We currently need DM flags only for add|change events. So forking dmsetup process for removed devices is a waste of CPU time. Udev is already quite slow, so make it just a tiny bit faster.
This commit is contained in:
parent
cf98c05082
commit
85ee8e10db
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.87 -
|
Version 2.02.87 -
|
||||||
===============================
|
===============================
|
||||||
|
Update udev rules to skip DM flags decoding for removed devices.
|
||||||
Add detect_internal_vg_cache_corruption to lvm.conf, disabled by default.
|
Add detect_internal_vg_cache_corruption to lvm.conf, disabled by default.
|
||||||
Use memory pool locking to check for corruption of internal VG structs.
|
Use memory pool locking to check for corruption of internal VG structs.
|
||||||
Cache and share generated VG structs.
|
Cache and share generated VG structs.
|
||||||
|
@ -24,12 +24,6 @@ ENV{DM_SBIN_PATH}="/sbin"
|
|||||||
TEST!="$env{DM_SBIN_PATH}/dmsetup", ENV{DM_SBIN_PATH}="/usr/sbin"
|
TEST!="$env{DM_SBIN_PATH}/dmsetup", ENV{DM_SBIN_PATH}="/usr/sbin"
|
||||||
TEST!="$env{DM_SBIN_PATH}/dmsetup", GOTO="dm_end"
|
TEST!="$env{DM_SBIN_PATH}/dmsetup", GOTO="dm_end"
|
||||||
|
|
||||||
# Decode udev control flags and set environment variables appropriately.
|
|
||||||
# These flags are encoded in DM_COOKIE variable that was introduced in
|
|
||||||
# kernel version 2.6.31. Therefore, we can use this feature with
|
|
||||||
# kernels >= 2.6.31 only.
|
|
||||||
ENV{DM_COOKIE}=="?*", IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup udevflags $env{DM_COOKIE}"
|
|
||||||
|
|
||||||
# Device created, major and minor number assigned - "add" event generated.
|
# Device created, major and minor number assigned - "add" event generated.
|
||||||
# Table loaded - no event generated.
|
# Table loaded - no event generated.
|
||||||
# Device resumed (or renamed) - "change" event generated.
|
# Device resumed (or renamed) - "change" event generated.
|
||||||
@ -42,6 +36,12 @@ ENV{DM_COOKIE}=="?*", IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup udevflags $env
|
|||||||
# is not recommended.
|
# is not recommended.
|
||||||
ACTION!="add|change", GOTO="dm_end"
|
ACTION!="add|change", GOTO="dm_end"
|
||||||
|
|
||||||
|
# Decode udev control flags and set environment variables appropriately.
|
||||||
|
# These flags are encoded in DM_COOKIE variable that was introduced in
|
||||||
|
# kernel version 2.6.31. Therefore, we can use this feature with
|
||||||
|
# kernels >= 2.6.31 only. Cookie is not decoded for remove event.
|
||||||
|
ENV{DM_COOKIE}=="?*", IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup udevflags $env{DM_COOKIE}"
|
||||||
|
|
||||||
# Rule out easy-to-detect inappropriate events first.
|
# Rule out easy-to-detect inappropriate events first.
|
||||||
ENV{DISK_RO}=="1", GOTO="dm_disable"
|
ENV{DISK_RO}=="1", GOTO="dm_disable"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user