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:
Ben Walker 2019-02-28 14:42:07 -07:00 committed by Darek Stojaczyk
parent 88179a6554
commit 362879570a
21 changed files with 25 additions and 22 deletions

View File

@ -2,6 +2,10 @@
## v19.04: (Upcoming Release)
### thread
spdk_app_start() now only accepts a single context argument.
### nvme
Added asynchronous probe support. New APIs spdk_nvme_probe_async() and

View File

@ -109,7 +109,7 @@ main(int argc, char **argv)
opts.usr1_handler = spdk_sigusr1;
/* 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) {
SPDK_ERRLOG("Start iscsi target daemon: spdk_app_start() retn non-zero\n");
}

View File

@ -72,7 +72,7 @@ main(int argc, char **argv)
}
/* 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();
return rc;
}

View File

@ -122,7 +122,7 @@ main(int argc, char **argv)
return rc;
}
rc = spdk_app_start(&opts, spdk_tgt_started, NULL, NULL);
rc = spdk_app_start(&opts, spdk_tgt_started, NULL);
spdk_app_fini();
return rc;

View File

@ -103,7 +103,7 @@ main(int argc, char *argv[])
}
/* 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();

View File

@ -283,7 +283,7 @@ main(int argc, char **argv)
* hello_start() returns), or if an error occurs during
* 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) {
SPDK_ERRLOG("ERROR starting application\n");
}

View File

@ -1561,7 +1561,7 @@ main(int argc, char **argv)
opts.config_file = cli_context->config_file;
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) {
printf("ERROR!\n");
}

View File

@ -477,7 +477,7 @@ main(int argc, char **argv)
* hello_start() returns), or if an error occurs during
* 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) {
SPDK_NOTICELOG("ERROR!\n");
} else {

View File

@ -434,7 +434,7 @@ main(int argc, char **argv)
hello_context.port = g_port;
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) {
SPDK_ERRLOG("ERROR starting application\n");
}

View File

@ -150,12 +150,11 @@ void spdk_app_opts_init(struct spdk_app_opts *opts);
* \param opts Initialization options used for this application.
* \param start_fn Event function that is called when the framework starts.
* \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.
*/
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.

View File

@ -564,7 +564,7 @@ spdk_app_setup_trace(struct spdk_app_opts *opts)
int
spdk_app_start(struct spdk_app_opts *opts, spdk_event_fn start_fn,
void *arg1, void *arg2)
void *arg1)
{
struct spdk_conf *config = NULL;
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_init_lcore = spdk_env_get_current_core();
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,
(void *)opts->rpc_addr, NULL);

View File

@ -667,7 +667,7 @@ initialize_spdk(void *arg)
struct spdk_app_opts *opts = (struct spdk_app_opts *)arg;
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
* spdk_app_start(), itself. At this time, it's known

View File

@ -104,7 +104,7 @@ main(int argc, char **argv)
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();

View File

@ -162,7 +162,7 @@ main(int argc, char **argv)
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();
return ch;

View File

@ -967,7 +967,7 @@ main(int argc, char **argv)
return rc;
}
rc = spdk_app_start(&opts, test_main, NULL, NULL);
rc = spdk_app_start(&opts, test_main, NULL);
spdk_app_fini();
return rc;

View File

@ -1150,7 +1150,7 @@ main(int argc, char **argv)
g_zcopy = false;
}
rc = spdk_app_start(&opts, bdevperf_run, NULL, NULL);
rc = spdk_app_start(&opts, bdevperf_run, NULL);
if (rc) {
g_run_failed = true;
}

View File

@ -340,7 +340,7 @@ int main(int argc, char **argv)
g_fuse_argc = argc - 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();
return rc;

View File

@ -142,7 +142,7 @@ int main(int argc, char **argv)
exit(rc);
}
rc = spdk_app_start(&opts, spdk_mkfs_run, NULL, NULL);
rc = spdk_app_start(&opts, spdk_mkfs_run, NULL);
spdk_app_fini();
return rc;

View File

@ -174,7 +174,7 @@ main(int argc, char **argv)
printf("Running I/O for %d seconds...", g_time_in_sec);
fflush(stdout);
rc = spdk_app_start(&opts, event_perf_start, NULL, NULL);
rc = spdk_app_start(&opts, event_perf_start, NULL);
spdk_app_fini();
performance_dump(g_time_in_sec);

View File

@ -136,7 +136,7 @@ main(int argc, char **argv)
exit(1);
}
rc = spdk_app_start(&opts, test_start, NULL, NULL);
rc = spdk_app_start(&opts, test_start, NULL);
spdk_app_fini();

View File

@ -140,7 +140,7 @@ main(int argc, char **argv)
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();