[PATCH 42/57] Use multipath wwid if path wwid is empty

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

 



During booting udev might not be fully initialized, causing
it to not return any information for a path.
The multipath map, however, would still be present.
In these cases we should use the multipath map as the
path wwid to avoid spurious path failures during boot.
The situation will be corrected anyway as udev will
be sending out the 'real' events very soon after.

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
 libmultipath/dmparser.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c
index 2209b2d..c19c5d2 100644
--- a/libmultipath/dmparser.c
+++ b/libmultipath/dmparser.c
@@ -336,10 +336,16 @@ disassemble_map (vector pathvec, char * params, struct multipath * mpp)
 					goto out1;
 
 				strncpy(pp->dev_t, word, BLK_DEV_SIZE);
-
+				if (strlen(mpp->wwid)) {
+					strncpy(pp->wwid, mpp->wwid, WWID_SIZE);
+				}
 				/* Only call this in multipath client mode */
 				if (!conf->daemon && store_path(pathvec, pp))
 					goto out1;
+			} else {
+				if (!strlen(pp->wwid) &&
+				    strlen(mpp->wwid))
+					strncpy(pp->wwid, mpp->wwid, WWID_SIZE);
 			}
 			FREE(word);
 
-- 
2.6.6

--
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