Blame SOURCES/0121-RHBZ-1197234-rules-fix.patch

38852f
---
38852f
 multipath/multipath.rules |    6 +++++-
38852f
 1 file changed, 5 insertions(+), 1 deletion(-)
38852f
38852f
Index: multipath-tools-130222/multipath/multipath.rules
38852f
===================================================================
38852f
--- multipath-tools-130222.orig/multipath/multipath.rules
38852f
+++ multipath-tools-130222/multipath/multipath.rules
38852f
@@ -21,6 +21,7 @@ ACTION!="change", GOTO="update_timestamp
38852f
 IMPORT{db}="DM_MULTIPATH_TIMESTAMP"
38852f
 IMPORT{db}="DM_MULTIPATH_DEVICE_PATH"
38852f
 IMPORT{db}="DM_MULTIPATH_WIPE_PARTS"
38852f
+IMPORT{db}="DM_MULTIPATH_NEED_KPARTX"
38852f
 # Check if the device is part of a multipath device. the -T option just keeps
38852f
 # the old result if the timestamp hasn't changed.
38852f
 PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -T $env{DM_MULTIPATH_TIMESTAMP}:$env{DM_MULTIPATH_DEVICE_PATH} -c $env{DEVNAME}", \
38852f
@@ -43,7 +44,10 @@ KERNEL!="dm-*", GOTO="end_mpath"
38852f
 ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath-?*", OPTIONS+="link_priority=10"
38852f
 ACTION!="change", GOTO="end_mpath"
38852f
 ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath"
38852f
+ENV{DM_ACTIVATION}=="1", ENV{DM_MULTIPATH_NEED_KPARTX}="1"
38852f
 ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
38852f
 ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
38852f
-ENV{DM_ACTIVATION}=="1", RUN+="$env{MPATH_SBIN_PATH}/kpartx -u $tempnode"
38852f
+ENV{DM_ACTIVATION}!="1", ENV{DM_MULTIPATH_NEED_KPARTX}!="1", GOTO="end_mpath"
38852f
+RUN+="$env{MPATH_SBIN_PATH}/kpartx -a $tempnode", \
38852f
+	ENV{DM_MULTIPATH_NEED_KPARTX}=""
38852f
 LABEL="end_mpath"