diff options
author | Hannes Reinecke <hare@kernel.org> | 2024-09-05 09:17:50 +0200 |
---|---|---|
committer | Hannes Reinecke <hare@kernel.org> | 2024-09-05 09:17:50 +0200 |
commit | 588e67595f2f251300cb17851da709a9b211fb1e (patch) | |
tree | 8e1e74d0e5c4694a4a061f01f6dbf6d4b4b15573 | |
parent | 4c6a3e6e38515b7dc597ab19e72b1e2509e8d3eb (diff) | |
download | nvme-virtual-subsys.v6.tar.gz |
nvme-multipath: always requeue I/O when updating the ANA statevirtual-subsys.v6
When we've changed the ANA state we always need to kiek the requeue
list to ensure any pending I/O is retried with the latest changes.
Signed-off-by: Hannes Reinecke <hare@kernel.org>
-rw-r--r-- | drivers/nvme/host/multipath.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 82b8c07e2537b0..7c479796ee79f5 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -733,9 +733,12 @@ static void nvme_update_ns_ana_state(struct nvme_ana_group_desc *desc, * will reprocess the ANA log page in nvme_mpath_update() once the * controller is ready. */ - if (nvme_state_is_live(ns->ana_state) && - nvme_ctrl_state(ns->ctrl) == NVME_CTRL_LIVE) - nvme_mpath_set_live(ns); + if (nvme_ctrl_state(ns->ctrl) == NVME_CTRL_LIVE) { + if (nvme_state_is_live(ns->ana_state)) + nvme_mpath_set_live(ns); + else + kblockd_schedule_work(&head->requeue_work); + } } static int nvme_update_ana_state(struct nvme_ctrl *ctrl, |