diff --git a/include/spdk/vhost.h b/include/spdk/vhost.h index f0e8fba58..201f6bced 100644 --- a/include/spdk/vhost.h +++ b/include/spdk/vhost.h @@ -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. diff --git a/include/spdk_internal/event.h b/include/spdk_internal/event.h index 875076426..39c42e2eb 100644 --- a/include/spdk_internal/event.h +++ b/include/spdk_internal/event.h @@ -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; }; diff --git a/lib/event/subsystem.c b/lib/event/subsystem.c index 7665890cd..c33a9b2e2 100644 --- a/lib/event/subsystem.c +++ b/lib/event/subsystem.c @@ -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); } diff --git a/lib/event/subsystems/bdev/bdev.c b/lib/event/subsystems/bdev/bdev.c index 5999d612a..cafa4554a 100644 --- a/lib/event/subsystems/bdev/bdev.c +++ b/lib/event/subsystems/bdev/bdev.c @@ -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 = { diff --git a/lib/event/subsystems/iscsi/iscsi.c b/lib/event/subsystems/iscsi/iscsi.c index 72750398e..6275ec5f8 100644 --- a/lib/event/subsystems/iscsi/iscsi.c +++ b/lib/event/subsystems/iscsi/iscsi.c @@ -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 = { diff --git a/lib/event/subsystems/nbd/nbd.c b/lib/event/subsystems/nbd/nbd.c index a943eb82f..e244c92e8 100644 --- a/lib/event/subsystems/nbd/nbd.c +++ b/lib/event/subsystems/nbd/nbd.c @@ -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 = { diff --git a/lib/event/subsystems/nvmf/nvmf_tgt.c b/lib/event/subsystems/nvmf/nvmf_tgt.c index b157bb98a..7435a479f 100644 --- a/lib/event/subsystems/nvmf/nvmf_tgt.c +++ b/lib/event/subsystems/nvmf/nvmf_tgt.c @@ -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 = { diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c index 73a992f53..b772df5f3 100644 --- a/lib/vhost/vhost.c +++ b/lib/vhost/vhost.c @@ -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)