Commit 241d0446 authored by Seth Howell's avatar Seth Howell Committed by Changpeng Liu
Browse files

example/nvmf: always return after spdk_subsystem_init



When the call to spdk_subsystem_init returns synchronously, calling the
callback results in double iterating over states in the state machine.
Returning after calling spdk_subsystem_init allows us to reliably begin
executing after the callback function is executed with no double
execution.

Change-Id: Ieb9003acece7483c956f19be4f131c8d4f64fbaa
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/480007


Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
parent 159703c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -716,7 +716,7 @@ nvmf_target_advance_state(void)
		case NVMF_INIT_SUBSYSTEM:
			/* initlize the bdev layer */
			spdk_subsystem_init(nvmf_subsystem_init_done, NULL);
			break;
			return;
		case NVMF_INIT_TARGET:
			nvmf_create_nvmf_tgt();
			break;