diff options
author | Hannes Reinecke <hare@suse.de> | 2019-07-04 09:10:46 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-07-10 00:17:21 +0300 |
commit | 2032d074716a811440aa9cd2e971a0716646d6af (patch) | |
tree | 4598ffeecf6e87316361331a53091becfed718fb /drivers/nvme | |
parent | ca7ae5c966bd4c00626d6ba05d68219f3c1fba36 (diff) | |
download | linux-2032d074716a811440aa9cd2e971a0716646d6af.tar.xz |
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 <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/multipath.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 5a6dbb422a9c..9b6dc11fa559 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -183,8 +183,11 @@ static struct nvme_ns *nvme_round_robin_path(struct nvme_ns_head *head, { struct nvme_ns *ns, *found, *fallback = NULL; - if (list_is_singular(&head->list)) + if (list_is_singular(&head->list)) { + if (nvme_path_is_disabled(old)) + return NULL; return old; + } for (ns = nvme_next_ns(head, old); ns != old; |