mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
b77497cbd8
The regex filter (controlled by devices/filter lvm.conf setting) was evaluated as the very last filter. However, this is not optimal when it comes to restricting disk access - users define devices/filter as well as devices/global_filter to avoid this. The devices/global_filter is already positioned at the beginning of the filter chain. We need to do the same for devices/filter. Filter chains before this patch: A: when lvmetad is not used: persistent_filter -> sysfs_filter -> global_regex_filter -> type_filter -> usable->filter -> mpath_component_filter -> partition_filter -> md_component_filter -> fw_raid_filter -> regex_filter B: when lvmetad is used: B1: to update lvmetad: sysfs_filter -> global_regex_filter -> type_filter -> usable_filter -> mpath_component_filter -> partition_filter -> md_component_filter -> fw_raid_filter B2: to retrieve info from lvmetad: persistent_filter -> usable_filter -> regex_filter From the chain list above we can see that particularly in case when lvmetad is not used, the regex filter is the very last one that is processed. If lvmetad is used, it doesn't matter much as there's the global_regex_filter which is used instead when updating lvmetad and when retrieving info from lvmetad, putting regex_filter in front of usable_filter wouldn't change much since usabled_filter is not reading disks directly. This patch puts the regex filter to the front even in case lvmetad is not used, hence reinstating the state as it was before commit |
||
---|---|---|
.. | ||
toolcontext.c | ||
toolcontext.h |