Blame SOURCES/0143-RHBZ-1299648-kpartx-sync.patch

f20720
---
f20720
 kpartx/kpartx.c           |   10 +++++++---
f20720
 multipath/multipath.rules |    2 +-
f20720
 2 files changed, 8 insertions(+), 4 deletions(-)
f20720
f20720
Index: multipath-tools-130222/kpartx/kpartx.c
f20720
===================================================================
f20720
--- multipath-tools-130222.orig/kpartx/kpartx.c
f20720
+++ multipath-tools-130222/kpartx/kpartx.c
f20720
@@ -57,7 +57,7 @@ struct pt {
f20720
 } pts[MAXTYPES];
f20720
 
f20720
 int ptct = 0;
f20720
-int udev_sync = 0;
f20720
+int udev_sync = 1;
f20720
 
f20720
 static void
f20720
 addpts(char *t, ptreader f)
f20720
@@ -85,7 +85,7 @@ initpts(void)
f20720
 	addpts("ps3", read_ps3_pt);
f20720
 }
f20720
 
f20720
-static char short_opts[] = "rladfgvp:t:su";
f20720
+static char short_opts[] = "rladfgvp:t:snu";
f20720
 
f20720
 /* Used in gpt.c */
f20720
 int force_gpt=0;
f20720
@@ -104,7 +104,8 @@ usage(void) {
f20720
 	printf("\t-g force GUID partition table (GPT)\n");
f20720
 	printf("\t-f force devmap create\n");
f20720
 	printf("\t-v verbose\n");
f20720
-	printf("\t-s sync mode. Don't return until the partitions are created\n");
f20720
+	printf("\t-n nosync mode. Return before the partitions are created\n");
f20720
+	printf("\t-s sync mode. Don't return until the partitions are created. Default.\n");
f20720
 	return 1;
f20720
 }
f20720
 
f20720
@@ -285,6 +286,9 @@ main(int argc, char **argv){
f20720
 		case 's':
f20720
 			udev_sync = 1;
f20720
 			break;
f20720
+		case 'n':
f20720
+			udev_sync = 0;
f20720
+			break;
f20720
 		case 'u':
f20720
 			what = UPDATE;
f20720
 			break;
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
@@ -48,6 +48,6 @@ ENV{DM_ACTIVATION}=="1", ENV{DM_MULTIPAT
f20720
 ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
f20720
 ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
f20720
 ENV{DM_ACTIVATION}!="1", ENV{DM_MULTIPATH_NEED_KPARTX}!="1", GOTO="end_mpath"
f20720
-RUN+="$env{MPATH_SBIN_PATH}/kpartx -a $tempnode", \
f20720
+RUN+="$env{MPATH_SBIN_PATH}/kpartx -an $tempnode", \
f20720
 	ENV{DM_MULTIPATH_NEED_KPARTX}=""
f20720
 LABEL="end_mpath"