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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I112018d8f487b387ae5f4f444a342be2c8da167d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479350
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
Shuhei Matsumoto 2020-01-05 18:14:53 -05:00 committed by Tomasz Zawadzki
parent f7e8827aa6
commit 95754cd170

View File

@ -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;
}