mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
udev: proper reset of DM_UDEV_DISABLE_OTHER_RULES_FLAG and honour this flag in lvmetad rules
Reset the DM_UDEV_OTHER_RULES_FLAG to original value right at the time of dropping the DM_NOSCAN flag. When DM_NOSCAN is set, the DM_UDEV_DISABLE_OTHER_RULES_FLAG is also set to avoid udev processing in "other/foreign" rules. If the noscan flag is dropped, the DM_UDEV_DISABLE_OTHER_RULES_FLAG should be reset to its original value. Also, lvmetad should respect the DM_UDEV_DISABLE_OTHER_RULES_FLAG because if the volume is set with this flag it: - definitely is not a top-level device (so makes no sense for lvmetad scanning) - is not supposed to be scanned further (for any stacking on top of it, including LVM stacking itself and any autoactivation of stacked LVs)
This commit is contained in:
parent
f3a6f7073b
commit
9d0621267d
@ -32,7 +32,7 @@ IMPORT{program}="(DM_EXEC)/dmsetup splitname --nameprefixes --noheadings --rows
|
||||
# uevent that follows for this LV, even an artificially generated one).
|
||||
ENV{DM_SUBSYSTEM_UDEV_FLAG0}=="1", ENV{DM_NOSCAN}="1", ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}="$env{DM_UDEV_DISABLE_OTHER_RULES_FLAG}", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1"
|
||||
ENV{DM_SUBSYSTEM_UDEV_FLAG0}!="1", IMPORT{db}="DM_NOSCAN", IMPORT{db}="DM_DISABLE_OTHER_RULES_FLAG_OLD"
|
||||
ENV{DM_SUBSYSTEM_UDEV_FLAG0}!="1", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="$env{DM_DISABLE_OTHER_RULES_FLAG_OLD}", \
|
||||
ENV{DM_SUBSYSTEM_UDEV_FLAG0}!="1", ENV{DM_NOSCAN}=="1", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="$env{DM_DISABLE_OTHER_RULES_FLAG_OLD}", \
|
||||
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG_OLD}="", ENV{DM_NOSCAN}=""
|
||||
|
||||
ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end"
|
||||
|
@ -18,6 +18,7 @@ SUBSYSTEM!="block", GOTO="lvm_end"
|
||||
(LVM_EXEC_RULE)
|
||||
|
||||
ENV{DM_NOSCAN}=="1", GOTO="lvm_end"
|
||||
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="lvm_end"
|
||||
|
||||
# If the PV label got lost, inform lvmetad immediately.
|
||||
# Detect the lost PV label by comparing previous ID_FS_TYPE value with current one.
|
||||
|
Loading…
Reference in New Issue
Block a user