Blame SOURCES/0166-RHBZ-1323429-dont-allow-new-wwid.patch

4ae388
---
4ae388
 libmultipath/dmparser.c |    9 +++++++++
4ae388
 1 file changed, 9 insertions(+)
4ae388
4ae388
Index: multipath-tools-130222/libmultipath/dmparser.c
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/libmultipath/dmparser.c
4ae388
+++ multipath-tools-130222/libmultipath/dmparser.c
4ae388
@@ -360,6 +360,15 @@ disassemble_map (vector pathvec, char *
4ae388
 			else if (!strlen(pp->wwid))
4ae388
 				strncpy(pp->wwid, mpp->wwid, WWID_SIZE);
4ae388
 
4ae388
+			/*
4ae388
+			 * Something went wrong. Likely the user changed the
4ae388
+			 * path uid_attribute after creating a device
4ae388
+			 */
4ae388
+			else if (strcmp(pp->wwid, mpp->wwid) != 0) {
4ae388
+				condlog(0, "%s: path wwid appears to have changed. Using map wwid.\n", pp->dev_t);
4ae388
+				strncpy(pp->wwid, mpp->wwid, WWID_SIZE);
4ae388
+			}
4ae388
+
4ae388
 			pgp->id ^= (long)pp;
4ae388
 			pp->pgindex = i + 1;
4ae388