Blame SOURCES/0131-UPBZ-1259831-lock-retry.patch

f20720
---
f20720
 multipathd/main.c |   11 ++++++++++-
f20720
 1 file changed, 10 insertions(+), 1 deletion(-)
f20720
f20720
Index: multipath-tools-130222/multipathd/main.c
f20720
===================================================================
f20720
--- multipath-tools-130222.orig/multipathd/main.c
f20720
+++ multipath-tools-130222/multipathd/main.c
f20720
@@ -462,6 +462,7 @@ ev_add_path (struct path * pp, struct ve
f20720
 	char params[PARAMS_SIZE] = {0};
f20720
 	int retries = 3;
f20720
 	int start_waiter = 0;
f20720
+	int ret;
f20720
 
f20720
 	/*
f20720
 	 * need path UID to go any further
f20720
@@ -540,7 +541,15 @@ rescan:
f20720
 	/*
f20720
 	 * reload the map for the multipath mapped device
f20720
 	 */
f20720
-	if (domap(mpp, params) <= 0) {
f20720
+retry:
f20720
+	ret = domap(mpp, params);
f20720
+	if (ret <= 0) {
f20720
+		if (ret < 0 && retries-- > 0) {
f20720
+			condlog(0, "%s: retry domap for addition of new "
f20720
+				"path %s", mpp->alias, pp->dev);
f20720
+			sleep(1);
f20720
+			goto retry;
f20720
+		}
f20720
 		condlog(0, "%s: failed in domap for addition of new "
f20720
 			"path %s", mpp->alias, pp->dev);
f20720
 		/*