[PATCH 3/3] nvme: multipath: Invalidate current_path when changing iopolicy
Ewan D. Milne
emilne at redhat.com
Tue Nov 7 13:23:31 PST 2023
When switching back to numa from round-robin, current_path may refer to
a different path than the one numa would have selected, and it is desirable
to have consistent behavior.
Signed-off-by: Ewan D. Milne <emilne at redhat.com>
---
drivers/nvme/host/multipath.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index e184e7c377bc..273940b6ca86 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -859,6 +859,7 @@ void nvme_subsys_iopolicy_update(struct nvme_subsystem *subsys, int iopolicy)
mutex_lock(&nvme_subsystems_lock);
list_for_each_entry(ctrl, &subsys->ctrls, subsys_entry) {
atomic_set(&ctrl->nr_active, 0);
+ nvme_mpath_clear_ctrl_paths(ctrl);
}
mutex_unlock(&nvme_subsystems_lock);
}
--
2.20.1
More information about the Linux-nvme
mailing list