event: Remove arg2 from spdk_app_start()
We never used this anywhere, and I need to move to a model where the start up action is a thread message instead Change-Id: I6b21ba9afb93a3245aceca2fe24713ffd16d0933 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446986 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
88179a6554
commit
362879570a
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## v19.04: (Upcoming Release)
|
## v19.04: (Upcoming Release)
|
||||||
|
|
||||||
|
### thread
|
||||||
|
|
||||||
|
spdk_app_start() now only accepts a single context argument.
|
||||||
|
|
||||||
### nvme
|
### nvme
|
||||||
|
|
||||||
Added asynchronous probe support. New APIs spdk_nvme_probe_async() and
|
Added asynchronous probe support. New APIs spdk_nvme_probe_async() and
|
||||||
|
@ -109,7 +109,7 @@ main(int argc, char **argv)
|
|||||||
opts.usr1_handler = spdk_sigusr1;
|
opts.usr1_handler = spdk_sigusr1;
|
||||||
|
|
||||||
/* Blocks until the application is exiting */
|
/* Blocks until the application is exiting */
|
||||||
rc = spdk_app_start(&opts, spdk_startup, NULL, NULL);
|
rc = spdk_app_start(&opts, spdk_startup, NULL);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
SPDK_ERRLOG("Start iscsi target daemon: spdk_app_start() retn non-zero\n");
|
SPDK_ERRLOG("Start iscsi target daemon: spdk_app_start() retn non-zero\n");
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Blocks until the application is exiting */
|
/* Blocks until the application is exiting */
|
||||||
rc = spdk_app_start(&opts, nvmf_tgt_started, NULL, NULL);
|
rc = spdk_app_start(&opts, nvmf_tgt_started, NULL);
|
||||||
spdk_app_fini();
|
spdk_app_fini();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ main(int argc, char **argv)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = spdk_app_start(&opts, spdk_tgt_started, NULL, NULL);
|
rc = spdk_app_start(&opts, spdk_tgt_started, NULL);
|
||||||
spdk_app_fini();
|
spdk_app_fini();
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -103,7 +103,7 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Blocks until the application is exiting */
|
/* Blocks until the application is exiting */
|
||||||
rc = spdk_app_start(&opts, vhost_started, NULL, NULL);
|
rc = spdk_app_start(&opts, vhost_started, NULL);
|
||||||
|
|
||||||
spdk_app_fini();
|
spdk_app_fini();
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ main(int argc, char **argv)
|
|||||||
* hello_start() returns), or if an error occurs during
|
* hello_start() returns), or if an error occurs during
|
||||||
* spdk_app_start() before hello_start() runs.
|
* spdk_app_start() before hello_start() runs.
|
||||||
*/
|
*/
|
||||||
rc = spdk_app_start(&opts, hello_start, &hello_context, NULL);
|
rc = spdk_app_start(&opts, hello_start, &hello_context);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
SPDK_ERRLOG("ERROR starting application\n");
|
SPDK_ERRLOG("ERROR starting application\n");
|
||||||
}
|
}
|
||||||
|
@ -1561,7 +1561,7 @@ main(int argc, char **argv)
|
|||||||
opts.config_file = cli_context->config_file;
|
opts.config_file = cli_context->config_file;
|
||||||
|
|
||||||
cli_context->app_started = true;
|
cli_context->app_started = true;
|
||||||
rc = spdk_app_start(&opts, cli_start, cli_context, NULL);
|
rc = spdk_app_start(&opts, cli_start, cli_context);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
printf("ERROR!\n");
|
printf("ERROR!\n");
|
||||||
}
|
}
|
||||||
|
@ -477,7 +477,7 @@ main(int argc, char **argv)
|
|||||||
* hello_start() returns), or if an error occurs during
|
* hello_start() returns), or if an error occurs during
|
||||||
* spdk_app_start() before hello_start() runs.
|
* spdk_app_start() before hello_start() runs.
|
||||||
*/
|
*/
|
||||||
rc = spdk_app_start(&opts, hello_start, hello_context, NULL);
|
rc = spdk_app_start(&opts, hello_start, hello_context);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
SPDK_NOTICELOG("ERROR!\n");
|
SPDK_NOTICELOG("ERROR!\n");
|
||||||
} else {
|
} else {
|
||||||
|
@ -434,7 +434,7 @@ main(int argc, char **argv)
|
|||||||
hello_context.port = g_port;
|
hello_context.port = g_port;
|
||||||
hello_context.verbose = g_verbose;
|
hello_context.verbose = g_verbose;
|
||||||
|
|
||||||
rc = spdk_app_start(&opts, start_net_framework, &hello_context, NULL);
|
rc = spdk_app_start(&opts, start_net_framework, &hello_context);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
SPDK_ERRLOG("ERROR starting application\n");
|
SPDK_ERRLOG("ERROR starting application\n");
|
||||||
}
|
}
|
||||||
|
@ -150,12 +150,11 @@ void spdk_app_opts_init(struct spdk_app_opts *opts);
|
|||||||
* \param opts Initialization options used for this application.
|
* \param opts Initialization options used for this application.
|
||||||
* \param start_fn Event function that is called when the framework starts.
|
* \param start_fn Event function that is called when the framework starts.
|
||||||
* \param arg1 Argument passed to function start_fn.
|
* \param arg1 Argument passed to function start_fn.
|
||||||
* \param arg2 Argument passed to function start_fn.
|
|
||||||
*
|
*
|
||||||
* \return 0 on success or non-zero on failure.
|
* \return 0 on success or non-zero on failure.
|
||||||
*/
|
*/
|
||||||
int spdk_app_start(struct spdk_app_opts *opts, spdk_event_fn start_fn,
|
int spdk_app_start(struct spdk_app_opts *opts, spdk_event_fn start_fn,
|
||||||
void *arg1, void *arg2);
|
void *arg1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform final shutdown operations on an application using the event framework.
|
* Perform final shutdown operations on an application using the event framework.
|
||||||
|
@ -564,7 +564,7 @@ spdk_app_setup_trace(struct spdk_app_opts *opts)
|
|||||||
|
|
||||||
int
|
int
|
||||||
spdk_app_start(struct spdk_app_opts *opts, spdk_event_fn start_fn,
|
spdk_app_start(struct spdk_app_opts *opts, spdk_event_fn start_fn,
|
||||||
void *arg1, void *arg2)
|
void *arg1)
|
||||||
{
|
{
|
||||||
struct spdk_conf *config = NULL;
|
struct spdk_conf *config = NULL;
|
||||||
int rc;
|
int rc;
|
||||||
@ -655,7 +655,7 @@ spdk_app_start(struct spdk_app_opts *opts, spdk_event_fn start_fn,
|
|||||||
g_spdk_app.rc = 0;
|
g_spdk_app.rc = 0;
|
||||||
g_init_lcore = spdk_env_get_current_core();
|
g_init_lcore = spdk_env_get_current_core();
|
||||||
g_delay_subsystem_init = opts->delay_subsystem_init;
|
g_delay_subsystem_init = opts->delay_subsystem_init;
|
||||||
g_app_start_event = spdk_event_allocate(g_init_lcore, start_fn, arg1, arg2);
|
g_app_start_event = spdk_event_allocate(g_init_lcore, start_fn, arg1, NULL);
|
||||||
|
|
||||||
rpc_start_event = spdk_event_allocate(g_init_lcore, spdk_app_start_rpc,
|
rpc_start_event = spdk_event_allocate(g_init_lcore, spdk_app_start_rpc,
|
||||||
(void *)opts->rpc_addr, NULL);
|
(void *)opts->rpc_addr, NULL);
|
||||||
|
@ -667,7 +667,7 @@ initialize_spdk(void *arg)
|
|||||||
struct spdk_app_opts *opts = (struct spdk_app_opts *)arg;
|
struct spdk_app_opts *opts = (struct spdk_app_opts *)arg;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = spdk_app_start(opts, spdk_rocksdb_run, NULL, NULL);
|
rc = spdk_app_start(opts, spdk_rocksdb_run, NULL);
|
||||||
/*
|
/*
|
||||||
* TODO: Revisit for case of internal failure of
|
* TODO: Revisit for case of internal failure of
|
||||||
* spdk_app_start(), itself. At this time, it's known
|
* spdk_app_start(), itself. At this time, it's known
|
||||||
|
@ -104,7 +104,7 @@ main(int argc, char **argv)
|
|||||||
g_unaffinitize_thread = true;
|
g_unaffinitize_thread = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = spdk_app_start(&opts, bdev_svc_start, (void *)(intptr_t)opts.shm_id, NULL);
|
rc = spdk_app_start(&opts, bdev_svc_start, (void *)(intptr_t)opts.shm_id);
|
||||||
|
|
||||||
spdk_app_fini();
|
spdk_app_fini();
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
opts.shutdown_cb = stub_shutdown;
|
opts.shutdown_cb = stub_shutdown;
|
||||||
|
|
||||||
ch = spdk_app_start(&opts, stub_start, (void *)(intptr_t)opts.shm_id, NULL);
|
ch = spdk_app_start(&opts, stub_start, (void *)(intptr_t)opts.shm_id);
|
||||||
spdk_app_fini();
|
spdk_app_fini();
|
||||||
|
|
||||||
return ch;
|
return ch;
|
||||||
|
@ -967,7 +967,7 @@ main(int argc, char **argv)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = spdk_app_start(&opts, test_main, NULL, NULL);
|
rc = spdk_app_start(&opts, test_main, NULL);
|
||||||
spdk_app_fini();
|
spdk_app_fini();
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -1150,7 +1150,7 @@ main(int argc, char **argv)
|
|||||||
g_zcopy = false;
|
g_zcopy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = spdk_app_start(&opts, bdevperf_run, NULL, NULL);
|
rc = spdk_app_start(&opts, bdevperf_run, NULL);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
g_run_failed = true;
|
g_run_failed = true;
|
||||||
}
|
}
|
||||||
|
@ -340,7 +340,7 @@ int main(int argc, char **argv)
|
|||||||
g_fuse_argc = argc - 2;
|
g_fuse_argc = argc - 2;
|
||||||
g_fuse_argv = &argv[2];
|
g_fuse_argv = &argv[2];
|
||||||
|
|
||||||
rc = spdk_app_start(&opts, spdk_fuse_run, NULL, NULL);
|
rc = spdk_app_start(&opts, spdk_fuse_run, NULL);
|
||||||
spdk_app_fini();
|
spdk_app_fini();
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -142,7 +142,7 @@ int main(int argc, char **argv)
|
|||||||
exit(rc);
|
exit(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = spdk_app_start(&opts, spdk_mkfs_run, NULL, NULL);
|
rc = spdk_app_start(&opts, spdk_mkfs_run, NULL);
|
||||||
spdk_app_fini();
|
spdk_app_fini();
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -174,7 +174,7 @@ main(int argc, char **argv)
|
|||||||
printf("Running I/O for %d seconds...", g_time_in_sec);
|
printf("Running I/O for %d seconds...", g_time_in_sec);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
rc = spdk_app_start(&opts, event_perf_start, NULL, NULL);
|
rc = spdk_app_start(&opts, event_perf_start, NULL);
|
||||||
|
|
||||||
spdk_app_fini();
|
spdk_app_fini();
|
||||||
performance_dump(g_time_in_sec);
|
performance_dump(g_time_in_sec);
|
||||||
|
@ -136,7 +136,7 @@ main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = spdk_app_start(&opts, test_start, NULL, NULL);
|
rc = spdk_app_start(&opts, test_start, NULL);
|
||||||
|
|
||||||
spdk_app_fini();
|
spdk_app_fini();
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
opts.shutdown_cb = test_cleanup;
|
opts.shutdown_cb = test_cleanup;
|
||||||
|
|
||||||
rc = spdk_app_start(&opts, test_start, NULL, NULL);
|
rc = spdk_app_start(&opts, test_start, NULL);
|
||||||
|
|
||||||
spdk_app_fini();
|
spdk_app_fini();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user