event: Subsystem level write_config_json callback no longer asynchronous

Nothing actually needs this to be asynchronous. If something
comes up, we can make it asynchronous again.

Change-Id: Icde3af3f8f9efebe75b08471b4afcce3a70da541
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447114
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Ben Walker 2019-03-05 14:21:57 -07:00
parent 2d0aa1ad8f
commit eefe8806a2
8 changed files with 10 additions and 19 deletions

View File

@ -83,9 +83,8 @@ void spdk_vhost_fini(spdk_vhost_fini_cb fini_cb);
* Write vhost subsystem configuration into provided JSON context.
*
* \param w JSON write context
* \param done_ev call this event when done.
*/
void spdk_vhost_config_json(struct spdk_json_write_ctx *w, struct spdk_event *done_ev);
void spdk_vhost_config_json(struct spdk_json_write_ctx *w);
/**
* Deinit vhost application. This is called once by SPDK app layer.

View File

@ -64,9 +64,8 @@ struct spdk_subsystem {
* Write JSON configuration handler.
*
* \param w JSON write context
* \param done_ev Done event to be called when writing is done.
*/
void (*write_config_json)(struct spdk_json_write_ctx *w, struct spdk_event *done_ev);
void (*write_config_json)(struct spdk_json_write_ctx *w);
TAILQ_ENTRY(spdk_subsystem) tailq;
};

View File

@ -248,9 +248,10 @@ spdk_subsystem_config_json(struct spdk_json_write_ctx *w, struct spdk_subsystem
struct spdk_event *done_ev)
{
if (subsystem && subsystem->write_config_json) {
subsystem->write_config_json(w, done_ev);
subsystem->write_config_json(w);
} else {
spdk_json_write_null(w);
spdk_event_call(done_ev);
}
spdk_event_call(done_ev);
}

View File

@ -65,10 +65,9 @@ spdk_bdev_subsystem_finish(void)
}
static void
_spdk_bdev_subsystem_config_json(struct spdk_json_write_ctx *w, struct spdk_event *done_ev)
_spdk_bdev_subsystem_config_json(struct spdk_json_write_ctx *w)
{
spdk_bdev_subsystem_config_json(w);
spdk_event_call(done_ev);
}
static struct spdk_subsystem g_spdk_subsystem_bdev = {

View File

@ -62,11 +62,9 @@ spdk_iscsi_subsystem_fini(void)
}
static void
spdk_iscsi_subsystem_config_json(struct spdk_json_write_ctx *w,
struct spdk_event *done_ev)
spdk_iscsi_subsystem_config_json(struct spdk_json_write_ctx *w)
{
spdk_iscsi_config_json(w);
spdk_event_call(done_ev);
}
static struct spdk_subsystem g_spdk_subsystem_iscsi = {

View File

@ -55,11 +55,9 @@ spdk_nbd_subsystem_fini(void)
}
static void
spdk_nbd_subsystem_write_config_json(struct spdk_json_write_ctx *w,
struct spdk_event *done_ev)
spdk_nbd_subsystem_write_config_json(struct spdk_json_write_ctx *w)
{
spdk_nbd_write_config_json(w);
spdk_event_call(done_ev);
}
static struct spdk_subsystem g_spdk_subsystem_nbd = {

View File

@ -469,7 +469,7 @@ get_conn_sched_string(enum spdk_nvmf_connect_sched sched)
}
static void
spdk_nvmf_subsystem_write_config_json(struct spdk_json_write_ctx *w, struct spdk_event *done_ev)
spdk_nvmf_subsystem_write_config_json(struct spdk_json_write_ctx *w)
{
spdk_json_write_array_begin(w);
@ -485,8 +485,6 @@ spdk_nvmf_subsystem_write_config_json(struct spdk_json_write_ctx *w, struct spdk
spdk_nvmf_tgt_write_config_json(w, g_spdk_nvmf_tgt);
spdk_json_write_array_end(w);
spdk_event_call(done_ev);
}
static struct spdk_subsystem g_spdk_subsystem_nvmf = {

View File

@ -1492,7 +1492,7 @@ spdk_vhost_fini(spdk_vhost_fini_cb fini_cb)
}
void
spdk_vhost_config_json(struct spdk_json_write_ctx *w, struct spdk_event *done_ev)
spdk_vhost_config_json(struct spdk_json_write_ctx *w)
{
struct spdk_vhost_dev *vdev;
uint32_t delay_base_us;
@ -1523,7 +1523,6 @@ spdk_vhost_config_json(struct spdk_json_write_ctx *w, struct spdk_event *done_ev
spdk_vhost_unlock();
spdk_json_write_array_end(w);
spdk_event_call(done_ev);
}
SPDK_LOG_REGISTER_COMPONENT("vhost", SPDK_LOG_VHOST)