[PATCH 03/10] do not allow in-use path to change wwid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When a path is part of a multipath device, it must not change it's wwid.
If it can, when multipathd is reconfigured, you can end up with two
multipath devices owning the same path, eventually leading to a crash.

Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
 libmultipath/dmparser.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c
index 9e79ecd..87e8398 100644
--- a/libmultipath/dmparser.c
+++ b/libmultipath/dmparser.c
@@ -380,6 +380,14 @@ disassemble_map (vector pathvec, char * params, struct multipath * mpp,
 				strncpy(pp->wwid, mpp->wwid,
 					WWID_SIZE - 1);
 
+			/*
+			 * Do not allow in-use patch to change wwid
+			 */
+			else if (strcmp(pp->wwid, mpp->wwid) != 0) {
+				condlog(0, "%s: path wwid appears to have changed. Using map wwid.\n", pp->dev_t);
+				strncpy(pp->wwid, mpp->wwid, WWID_SIZE);
+			}
+
 			pgp->id ^= (long)pp;
 			pp->pgindex = i + 1;
 
-- 
1.8.3.1

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux