Skip to content

Commit

Permalink
11-dm-mpath.rules: use import logic like 13-dm-disk.rules
Browse files Browse the repository at this point in the history
We have to import the properties if either DM_NOSCAN or
DM_DISABLE_OTHER_RULES_FLAG is set, because blkid will be skipped
in both cases. Also, if DM_UDEV_PRIMARY_SOURCE_FLAG is not set,
it makes no sense to try and import the properties.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
  • Loading branch information
mwilck committed Feb 14, 2024
1 parent c33de4a commit b3582da
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion multipath/11-dm-mpath.rules.in
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,14 @@ ENV{MPATH_DEVICE_READY}!="0", ENV{.MPATH_DEVICE_READY_OLD}=="0", \
# not. If symlinks get lost, systemd may auto-unmount file systems.

LABEL="scan_import"
ENV{DM_NOSCAN}!="1", GOTO="import_end"

# If DM_UDEV_PRIMARY_SOURCE_FLAG is not set, the properties below
# have never been properly set. Don't import them.
ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!="1", GOTO="import_end"

# Don't import the properties from db if we will run blkid later.
ENV{DM_NOSCAN}!="1", ENV{DM_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="import_end"

IMPORT{db}="ID_FS_TYPE"
IMPORT{db}="ID_FS_USAGE"
IMPORT{db}="ID_FS_UUID_ENC"
Expand Down

0 comments on commit b3582da

Please sign in to comment.