Skip to content

Commit 2032d07

Browse files
hreineckeChristoph Hellwig
authored andcommitted
nvme-multipath: also check for a disabled path if there is a single sibling
When we have a singular list in nvme_round_robin_path() we still need to check its validity. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent ca7ae5c commit 2032d07

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/nvme/host/multipath.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,11 @@ static struct nvme_ns *nvme_round_robin_path(struct nvme_ns_head *head,
183183
{
184184
struct nvme_ns *ns, *found, *fallback = NULL;
185185

186-
if (list_is_singular(&head->list))
186+
if (list_is_singular(&head->list)) {
187+
if (nvme_path_is_disabled(old))
188+
return NULL;
187189
return old;
190+
}
188191

189192
for (ns = nvme_next_ns(head, old);
190193
ns != old;

0 commit comments

Comments
 (0)