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

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