Skip to content

Commit 01cc89c

Browse files
bmarzinsmwilck
authored andcommitted
multipathd: fix failures on booting from a multipath device
Commit a04be55 ("multipathd: don't add removed/partial paths to new maps") stopped including INIT_PARTIAL paths in the updated multipath devices built during reconfigure(). During normal multipath operation this does make sense, but isn't necessary (the uevent should still come shortly) and the situation is very unlikely to occur. On the other hand, when multipathd starts up after the pivot root during boot, it's very possible that paths will not be fully initialized. Multipathd should not drops paths in this case. The patch mostly reverts a04be55. Paths that are marked as INIT_REMOVED shouldn't be added in coalesce_paths(). adopt_paths() was already making sure that they weren't before a04be55. But it does make sense to catch those paths earlier in coalesce_paths(), so this patch retains that behavior. Fixes: a04be55 ("multipathd: don't add removed/partial paths to new maps") Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Reviewed-by: Martin Wilck <mwilck@suse.com>
1 parent 011fdd8 commit 01cc89c

2 files changed

Lines changed: 3 additions & 14 deletions

File tree

libmultipath/configure.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,22 +1108,12 @@ int coalesce_paths (struct vectors *vecs, vector mpvec, char *refwwid,
11081108
continue;
11091109

11101110
/* 3. if path has disappeared */
1111-
if (pp1->state == PATH_REMOVED) {
1111+
if (pp1->state == PATH_REMOVED || pp1->initialized == INIT_REMOVED) {
11121112
orphan_path(pp1, "path removed");
11131113
continue;
11141114
}
11151115

1116-
/*
1117-
* 4. The path wasn't found in path_discovery. It only exists
1118-
* in an old map.
1119-
*/
1120-
if (pp1->initialized == INIT_PARTIAL ||
1121-
pp1->initialized == INIT_REMOVED) {
1122-
orphan_path(pp1, "path not found");
1123-
continue;
1124-
}
1125-
1126-
/* 5. path is out of scope */
1116+
/* 4. path is out of scope */
11271117
if (refwwid && strncmp(pp1->wwid, refwwid, WWID_SIZE - 1))
11281118
continue;
11291119

libmultipath/structs_vec.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,7 @@ int adopt_paths(vector pathvec, struct multipath *mpp,
315315
pp->dev, mpp->alias);
316316
continue;
317317
}
318-
if (pp->initialized == INIT_REMOVED ||
319-
pp->initialized == INIT_PARTIAL)
318+
if (pp->initialized == INIT_REMOVED)
320319
continue;
321320
if (mpp->queue_mode == QUEUE_MODE_RQ &&
322321
pp->bus == SYSFS_BUS_NVME &&

0 commit comments

Comments
 (0)