mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-02 04:22:02 +03:00
pvscan: use alternate device names from DEVLINKS to check filter
pvscan --cache <dev> is called by our udev rule at a time when all the symlinks for <dev> may not be created yet (by other udev rules.) The regex filter in lvm.conf may refer to <dev> using a symlink name that hasn't yet been created, which would cause <dev> to not match the filter regex. The DEVLINKS env var, set by udev, contains all the symlink names for <dev> that have been or will be created. So, we add all these symlink names to dev->aliases, as if we had found them in /dev. This allows <dev> to be recognized by a regex filter containing a symlink for <dev>.
This commit is contained in:
@ -179,7 +179,7 @@ static int _accept_p(struct cmd_context *cmd, struct dev_filter *f, struct devic
|
||||
|
||||
if (m >= 0) {
|
||||
if (dm_bit(rf->accept, m)) {
|
||||
if (!first)
|
||||
if (!first && !cmd->filter_regex_set_preferred_name_disable)
|
||||
dev_set_preferred_name(sl, dev);
|
||||
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user