Spdk/lib/nvmf
Alexey Marchuk 95fc1ac759 nvmf: Rework qpair disconnect when subsystem is removed
When we iterate qpairs that belong to a subsystem
and try to disconnect them, there is a chance that
some qpair can be disconnected on transport level,
e.g. the initiator may receive a disconnect for
the first qpair and disconnect others. That may lead
to a dead loop when we call spdk_nvmf_qpair_disconnect
with a callback, the callback is called immediatelly
and tries to disconnect the qpair again.

To solve this problem, move part of nvmf_poll_group_remove_subsystem
function to another function nvmf_poll_group_remove_subsystem_msg
which disconnects all qpair at once without any callback
and calls itself via thread_send_msg untill all qpairs are
disconnected.

Fixes github issue #1780

Change-Id: I1000cda73e6164917fc13f7f374366af90571b99
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6597
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-19 08:24:20 +00:00
..
ctrlr_bdev.c log: remove internal log.h header 2020-10-15 08:23:39 +00:00
ctrlr_discovery.c nvmf: Async event support for discovery log change 2020-11-11 00:53:57 +00:00
ctrlr.c nvmf: Fix race condition when adding IO qpair 2021-02-18 13:37:01 +00:00
fc_ls.c nvmf/fc: Handle out of order fused commands. 2021-01-14 16:18:25 +00:00
fc.c lib/fc: move to spdk_nvmf_tgt_listen_ext() 2021-03-18 14:43:08 +00:00
Makefile so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
nvmf_fc.h nvmf/fc: Add flag to differentiate LS queue and non LS queue. 2021-01-14 16:18:25 +00:00
nvmf_internal.h nvmf: Subsystem pauses only pause admin queues 2021-01-26 17:38:54 +00:00
nvmf_rpc.c nvmf: Allow transport specific statistics dumping into JSON 2021-03-19 08:23:01 +00:00
nvmf.c nvmf: Rework qpair disconnect when subsystem is removed 2021-03-19 08:24:20 +00:00
rdma.c nvmf: Allow transport specific statistics dumping into JSON 2021-03-19 08:23:01 +00:00
spdk_nvmf.map nvmf: Allow transport specific statistics dumping into JSON 2021-03-19 08:23:01 +00:00
subsystem.c lib/nvmf: remove deprecated API 2021-03-18 14:43:08 +00:00
tcp.c lib/nvmf: Use the accelerated engine to compute the data digest. 2021-02-25 10:25:49 +00:00
transport.c nvmf: Allow transport specific statistics dumping into JSON 2021-03-19 08:23:01 +00:00
transport.h nvmf: Allow nvmf_transport_qpair_fini to complete asynchronously. 2020-11-18 11:28:02 +00:00
vfio_user.c nvmf/vfio-user: don't block DSM command in vfio-user 2021-03-08 10:49:32 +00:00