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

bdevperf: Reorder state checks in spdk_bdevperf_shutdown_cb()



io_target_group manages io_targets, and hence checking g_head
should be done earlier than checking g_target_count.

Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I112018d8f487b387ae5f4f444a342be2c8da167d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479350


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
parent f7e8827a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1343,13 +1343,13 @@ spdk_bdevperf_shutdown_cb(void)

	g_shutdown = true;

	if (g_target_count == 0) {
		bdevperf_fini(g_run_rc);
	if (TAILQ_EMPTY(&g_head)) {
		spdk_app_stop(0);
		return;
	}

	if (TAILQ_EMPTY(&g_head)) {
		spdk_app_stop(0);
	if (g_target_count == 0) {
		bdevperf_fini(g_run_rc);
		return;
	}