nvmf,tgt: fix issue while shutting down nvmf tgt with CTRL + C
The phenoemon is that we can not shutdown the nvmf tgt. The solution is that we need to adjust the shutting down orders of nvmf tgt subsystem and rdma trasport layer. Change-Id: Ie39657370b1574960e0ee7cf604cc5872db0bed3 Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
08238af7ee
commit
38980dedfa
@ -75,6 +75,7 @@ subsystem_delete_event(void *arg1, void *arg2)
|
||||
spdk_nvmf_delete_subsystem(subsystem);
|
||||
|
||||
if (g_subsystems_shutdown && TAILQ_EMPTY(&g_subsystems)) {
|
||||
spdk_nvmf_tgt_fini();
|
||||
/* Finished shutting down all subsystems - continue the shutdown process. */
|
||||
shutdown_complete();
|
||||
}
|
||||
@ -118,7 +119,6 @@ shutdown_subsystems(void)
|
||||
static void
|
||||
acceptor_poller_unregistered_event(void *arg1, void *arg2)
|
||||
{
|
||||
spdk_nvmf_tgt_fini();
|
||||
shutdown_subsystems();
|
||||
}
|
||||
|
||||
|
@ -1012,6 +1012,8 @@ static int
|
||||
spdk_nvmf_rdma_fini(void)
|
||||
{
|
||||
pthread_mutex_lock(&g_rdma.lock);
|
||||
|
||||
assert(TAILQ_EMPTY(&g_rdma.listen_addrs));
|
||||
if (g_rdma.event_channel != NULL) {
|
||||
rdma_destroy_event_channel(g_rdma.event_channel);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user