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

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