bdevperf: Free all targets before exiting bdevperf application
We will use SPDK application framework (SPDK thread, IO channel, and etc) to manage IO target groups, and will need to free IO target groups before exiting bdevperf application. As a preparation, move bdevperf_free_targets() before returning from spdk_app_start(). Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Id695a88107f87a9573c281f7f7d26d91d3a307b5 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478778 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
f4e536cb57
commit
e7a300e096
@ -470,6 +470,7 @@ end_run(void *arg1, void *arg2)
|
||||
if (g_request && !g_shutdown) {
|
||||
rpc_perform_tests_cb(rc);
|
||||
} else {
|
||||
bdevperf_free_targets();
|
||||
spdk_app_stop(rc);
|
||||
}
|
||||
}
|
||||
@ -1316,6 +1317,7 @@ bdevperf_run(void *arg1)
|
||||
|
||||
rc = bdevperf_test();
|
||||
if (rc) {
|
||||
bdevperf_free_targets();
|
||||
spdk_app_stop(1);
|
||||
return;
|
||||
}
|
||||
@ -1342,6 +1344,7 @@ spdk_bdevperf_shutdown_cb(void)
|
||||
g_shutdown = true;
|
||||
|
||||
if (g_target_count == 0) {
|
||||
bdevperf_free_targets();
|
||||
spdk_app_stop(0);
|
||||
return;
|
||||
}
|
||||
@ -1497,7 +1500,6 @@ main(int argc, char **argv)
|
||||
g_run_failed = true;
|
||||
}
|
||||
|
||||
bdevperf_free_targets();
|
||||
spdk_app_fini();
|
||||
return g_run_failed;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user