From 43062f224590f99d6506200b76ec6ac944721121 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Thu, 8 Mar 2018 13:07:51 +0900 Subject: [PATCH] iscsi: Pass the callback to poll group initialization as an argument The next patch will move the location and change the callback of poll group initialization. Besides it is probable for JSON config file to change the callback of poll group initialization. Passing callback as argument increases visibility and flexibility of code. Change-Id: Ie4bfd2c60a112bb7c697110ef0efc30a2c098dc8 Signed-off-by: Shuhei Matsumoto Reviewed-on: https://review.gerrithub.io/403144 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Jim Harris --- lib/iscsi/iscsi_subsystem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/iscsi/iscsi_subsystem.c b/lib/iscsi/iscsi_subsystem.c index cde87cf16..bcca78420 100644 --- a/lib/iscsi/iscsi_subsystem.c +++ b/lib/iscsi/iscsi_subsystem.c @@ -900,7 +900,7 @@ iscsi_unregister_poll_group(void *ctx) } static void -spdk_initialize_iscsi_poll_group(void) +spdk_initialize_iscsi_poll_group(spdk_thread_fn cpl) { size_t g_num_poll_groups = spdk_env_get_last_core() + 1; @@ -912,7 +912,7 @@ spdk_initialize_iscsi_poll_group(void) } /* Send a message to each thread and create a poll group */ - spdk_for_each_thread(iscsi_create_poll_group, NULL, iscsi_create_poll_group_done); + spdk_for_each_thread(iscsi_create_poll_group, NULL, cpl); } void @@ -959,7 +959,7 @@ spdk_iscsi_init(spdk_iscsi_init_cb cb_fn, void *cb_arg) return; } - spdk_initialize_iscsi_poll_group(); + spdk_initialize_iscsi_poll_group(iscsi_create_poll_group_done); } void