linux/drivers/nvme/host
Ruozhu Li 104594de27 nvme: fix regression when disconnect a recovering ctrl
[ Upstream commit f7f70f4aa0 ]

We encountered a problem that the disconnect command hangs.
After analyzing the log and stack, we found that the triggering
process is as follows:
CPU0                          CPU1
                                nvme_rdma_error_recovery_work
                                  nvme_rdma_teardown_io_queues
nvme_do_delete_ctrl                 nvme_stop_queues
  nvme_remove_namespaces
  --clear ctrl->namespaces
                                    nvme_start_queues
                                    --no ns in ctrl->namespaces
    nvme_ns_remove                  return(because ctrl is deleting)
      blk_freeze_queue
        blk_mq_freeze_queue_wait
        --wait for ns to unquiesce to clean infligt IO, hang forever

This problem was not found in older kernels because we will flush
err work in nvme_stop_ctrl before nvme_remove_namespaces.It does not
seem to be modified for functional reasons, the patch can be revert
to solve the problem.

Revert commit 794a4cb3d2 ("nvme: remove the .stop_ctrl callout")

Signed-off-by: Ruozhu Li <liruozhu@huawei.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-07-21 21:20:15 +02:00
..
core.c nvme: fix regression when disconnect a recovering ctrl 2022-07-21 21:20:15 +02:00
fabrics.c nvme-fabrics: decode host pathing error for connect 2021-06-16 12:01:37 +02:00
fabrics.h nvme-fabrics: fix state check in nvmf_ctlr_matches_baseopts() 2022-02-08 18:30:35 +01:00
fault_inject.c
fc.c nvme-fc: avoid race between time out and tear down 2021-10-09 14:40:57 +02:00
fc.h nvme-fc: Update header and host for common definitions for LS handling 2020-05-09 16:18:33 -06:00
hwmon.c nvme: return errors for hwmon init 2020-09-22 17:49:55 +02:00
Kconfig nvme-tcp: remove incorrect Kconfig dep in BLK_DEV_NVME 2021-06-16 12:01:38 +02:00
lightnvm.c nvme: split nvme_alloc_request() 2022-06-29 08:59:49 +02:00
Makefile nvme: support for zoned namespaces 2020-07-08 16:16:20 +02:00
multipath.c nvme: use sysfs_emit instead of sprintf 2022-06-22 14:13:17 +02:00
nvme.h nvme: fix regression when disconnect a recovering ctrl 2022-07-21 21:20:15 +02:00
pci.c nvme-pci: add NVME_QUIRK_BOGUS_NID for ADATA XPG SX6000LNP (AKA SPECTRIX S40G) 2022-07-07 17:52:15 +02:00
rdma.c nvme: fix regression when disconnect a recovering ctrl 2022-07-21 21:20:15 +02:00
tcp.c nvme: fix regression when disconnect a recovering ctrl 2022-07-21 21:20:15 +02:00
trace.c
trace.h nvme: fix nvme_setup_command metadata trace event 2021-08-08 09:05:23 +02:00
zns.c nvme: remove the disk argument to nvme_update_zone_info 2020-10-07 07:56:17 +02:00