Commit eefe8806 authored by Ben Walker's avatar Ben Walker
Browse files

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: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447114


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
parent 2d0aa1ad
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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.
+1 −2
Original line number Diff line number Diff line
@@ -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;
};

+3 −2
Original line number Diff line number Diff line
@@ -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);
}
+1 −2
Original line number Diff line number Diff line
@@ -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 = {
+1 −3
Original line number Diff line number Diff line
@@ -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 = {
Loading