Commit f0c32ebb authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

event/app: Call spdk_rpc_finish() after all subsystems were finished



At subsystems shutdown, JSON RPCs still may be processed. Hence, it is
safe to call spdk_rpc_finish() after spdk_subsystem_fini() completed.

This is necessary to fix the github issue #3062 together with the next
patch.

Signed-off-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I55ee8b7916d046c02e3f748d757547d307250ee9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19380


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent e328d90c
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -822,6 +822,13 @@ spdk_app_fini(void)
	unclaim_cpu_cores(NULL);
}

static void
subsystem_fini_done(void *arg1)
{
	spdk_rpc_finish();
	spdk_reactors_stop(NULL);
}

static void
_start_subsystem_fini(void *arg1)
{
@@ -830,7 +837,7 @@ _start_subsystem_fini(void *arg1)
		return;
	}

	spdk_subsystem_fini(spdk_reactors_stop, NULL);
	spdk_subsystem_fini(subsystem_fini_done, NULL);
}

static int
@@ -860,7 +867,6 @@ app_stop(void *arg1)
		return;
	}

	spdk_rpc_finish();
	g_spdk_app.stopped = true;
	spdk_log_for_each_deprecation(NULL, log_deprecation_hits);
	_start_subsystem_fini(NULL);