Skip to content

Commit

Permalink
11-dm-mpath.rules: Don't force activation while device is suspended
Browse files Browse the repository at this point in the history
If paths become available while the device is suspended, don't
activate. Another uevent will arrive when the device is resumed.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
  • Loading branch information
mwilck committed Feb 15, 2024
1 parent 87cd201 commit b22c273
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions multipath/11-dm-mpath.rules.in
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,16 @@ ENV{MPATH_DEVICE_READY}=="0", ENV{DM_NOSCAN}="1"
ENV{MPATH_DEVICE_READY}=="0", \
ENV{.MPATH_SAVE_DISABLE_OTHER_RULES_FLAG}="$env{DM_UDEV_DISABLE_OTHER_RULES_FLAG}", \
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1"

# If the device comes back online, set DM_ACTIVATION so that
# upper layers do a rescan.
ENV{MPATH_DEVICE_READY}!="0", ENV{.MPATH_DEVICE_READY_OLD}=="0", \
ENV{DM_ACTIVATION}="1", ENV{MPATH_UNCHANGED}="0"
# upper layers do a rescan. If the device is currently suspended,
# we have to postpone the activation until the next event.
ENV{MPATH_DEVICE_READY}=="0", GOTO="dont_activate"
ENV{.MPATH_DEVICE_READY_OLD}!="0", GOTO="dont_activate"
ENV{DM_SUSPENDED}=="1", ENV{MPATH_DEVICE_READY}="0", GOTO="dont_activate"

ENV{DM_ACTIVATION}="1", ENV{MPATH_UNCHANGED}="0"
LABEL="dont_activate"

# The code to check multipath state ends here. We need to set
# properties and symlinks regardless whether the map is usable or
Expand Down

0 comments on commit b22c273

Please sign in to comment.