[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240509202929.831680-4-jmeneghi@redhat.com>
Date: Thu, 9 May 2024 16:29:29 -0400
From: John Meneghini <jmeneghi@...hat.com>
To: kbusch@...nel.org,
hch@....de,
sagi@...mberg.me,
emilne@...hat.com
Cc: linux-nvme@...ts.infradead.org,
linux-kernel@...r.kernel.org,
jmeneghi@...hat.com,
jrani@...estorage.com,
randyj@...estorage.com,
hare@...nel.org,
constg@...ibm.com,
aviv.coro@....com
Subject: [PATCH v2 3/3] nvme: multipath: Invalidate current_path when changing iopolicy
From: "Ewan D. Milne" <emilne@...hat.com>
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.
Tested-by: John Meneghini <jmeneghi@...hat.com>
Signed-off-by: Ewan D. Milne <emilne@...hat.com>
Reviewed-by: Christoph Hellwig <hch@....de>
---
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 02baadb45c82..d916a5ddf5d4 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -862,6 +862,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.39.3
Powered by blists - more mailing lists