Blame SOURCES/0067-RHBZ-1022899-fix-udev-partition-handling.patch

38852f
---
38852f
 multipath/multipath.rules |    8 +++++++-
38852f
 1 file changed, 7 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
@@ -13,12 +13,13 @@ ACTION=="add", ENV{DM_MULTIPATH_DEVICE_P
38852f
 	PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -c $tempnode", \
38852f
 	ENV{DM_MULTIPATH_DEVICE_PATH}="1", ENV{ID_FS_TYPE}="mpath_member"
38852f
 
38852f
-ENV{DM_MULTIPATH_DEVICE_PATH}=="1", \
38852f
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{DM_MULTIPATH_WIPE_PARTS}="1", \
38852f
 	RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
38852f
 
38852f
 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
 # 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
@@ -27,8 +28,13 @@ PROGRAM=="$env{MPATH_SBIN_PATH}/multipat
38852f
 
38852f
 # If the device isn't part of a multipath device, clear this
38852f
 ENV{DM_MULTIPATH_DEVICE_PATH}=""
38852f
+ENV{DM_MULTIPATH_WIPE_PARTS}=""
38852f
 
38852f
 LABEL="update_timestamp"
38852f
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{DM_MULTIPATH_WIPE_PARTS}!="1", \
38852f
+	ENV{DM_MULTIPATH_WIPE_PARTS}="1", \
38852f
+	RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
38852f
+
38852f
 IMPORT{file}="/run/multipathd/timestamp"
38852f
 
38852f
 LABEL="check_kpartx"