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:
parent
2d0aa1ad8f
commit
eefe8806a2
@ -83,9 +83,8 @@ void spdk_vhost_fini(spdk_vhost_fini_cb fini_cb);
|
|||||||
* Write vhost subsystem configuration into provided JSON context.
|
* Write vhost subsystem configuration into provided JSON context.
|
||||||
*
|
*
|
||||||
* \param w JSON write 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.
|
* Deinit vhost application. This is called once by SPDK app layer.
|
||||||
|
@ -64,9 +64,8 @@ struct spdk_subsystem {
|
|||||||
* Write JSON configuration handler.
|
* Write JSON configuration handler.
|
||||||
*
|
*
|
||||||
* \param w JSON write context
|
* \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;
|
TAILQ_ENTRY(spdk_subsystem) tailq;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -248,9 +248,10 @@ spdk_subsystem_config_json(struct spdk_json_write_ctx *w, struct spdk_subsystem
|
|||||||
struct spdk_event *done_ev)
|
struct spdk_event *done_ev)
|
||||||
{
|
{
|
||||||
if (subsystem && subsystem->write_config_json) {
|
if (subsystem && subsystem->write_config_json) {
|
||||||
subsystem->write_config_json(w, done_ev);
|
subsystem->write_config_json(w);
|
||||||
} else {
|
} else {
|
||||||
spdk_json_write_null(w);
|
spdk_json_write_null(w);
|
||||||
spdk_event_call(done_ev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spdk_event_call(done_ev);
|
||||||
}
|
}
|
||||||
|
@ -65,10 +65,9 @@ spdk_bdev_subsystem_finish(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static 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_bdev_subsystem_config_json(w);
|
||||||
spdk_event_call(done_ev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct spdk_subsystem g_spdk_subsystem_bdev = {
|
static struct spdk_subsystem g_spdk_subsystem_bdev = {
|
||||||
|
@ -62,11 +62,9 @@ spdk_iscsi_subsystem_fini(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
spdk_iscsi_subsystem_config_json(struct spdk_json_write_ctx *w,
|
spdk_iscsi_subsystem_config_json(struct spdk_json_write_ctx *w)
|
||||||
struct spdk_event *done_ev)
|
|
||||||
{
|
{
|
||||||
spdk_iscsi_config_json(w);
|
spdk_iscsi_config_json(w);
|
||||||
spdk_event_call(done_ev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct spdk_subsystem g_spdk_subsystem_iscsi = {
|
static struct spdk_subsystem g_spdk_subsystem_iscsi = {
|
||||||
|
@ -55,11 +55,9 @@ spdk_nbd_subsystem_fini(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
spdk_nbd_subsystem_write_config_json(struct spdk_json_write_ctx *w,
|
spdk_nbd_subsystem_write_config_json(struct spdk_json_write_ctx *w)
|
||||||
struct spdk_event *done_ev)
|
|
||||||
{
|
{
|
||||||
spdk_nbd_write_config_json(w);
|
spdk_nbd_write_config_json(w);
|
||||||
spdk_event_call(done_ev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct spdk_subsystem g_spdk_subsystem_nbd = {
|
static struct spdk_subsystem g_spdk_subsystem_nbd = {
|
||||||
|
@ -469,7 +469,7 @@ get_conn_sched_string(enum spdk_nvmf_connect_sched sched)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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);
|
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_nvmf_tgt_write_config_json(w, g_spdk_nvmf_tgt);
|
||||||
spdk_json_write_array_end(w);
|
spdk_json_write_array_end(w);
|
||||||
|
|
||||||
spdk_event_call(done_ev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct spdk_subsystem g_spdk_subsystem_nvmf = {
|
static struct spdk_subsystem g_spdk_subsystem_nvmf = {
|
||||||
|
@ -1492,7 +1492,7 @@ spdk_vhost_fini(spdk_vhost_fini_cb fini_cb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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;
|
struct spdk_vhost_dev *vdev;
|
||||||
uint32_t delay_base_us;
|
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_vhost_unlock();
|
||||||
|
|
||||||
spdk_json_write_array_end(w);
|
spdk_json_write_array_end(w);
|
||||||
spdk_event_call(done_ev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SPDK_LOG_REGISTER_COMPONENT("vhost", SPDK_LOG_VHOST)
|
SPDK_LOG_REGISTER_COMPONENT("vhost", SPDK_LOG_VHOST)
|
||||||
|
Loading…
Reference in New Issue
Block a user