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

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