mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-22 18:44:44 +08:00
nvme-multipath: fix logic for non-optimized paths
Handle the special case where we have exactly one optimized path,
which we should keep using in this case.
Fixes: 75c10e7327
("nvme-multipath: round-robin I/O policy")
Signed off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
9f98772ba3
commit
3f6e3246db
@ -255,6 +255,12 @@ static struct nvme_ns *nvme_round_robin_path(struct nvme_ns_head *head,
|
||||
fallback = ns;
|
||||
}
|
||||
|
||||
/* No optimized path found, re-check the current path */
|
||||
if (!nvme_path_is_disabled(old) &&
|
||||
old->ana_state == NVME_ANA_OPTIMIZED) {
|
||||
found = old;
|
||||
goto out;
|
||||
}
|
||||
if (!fallback)
|
||||
return NULL;
|
||||
found = fallback;
|
||||
|
Loading…
Reference in New Issue
Block a user