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 <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/403144 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
d999e6af7d
commit
43062f2245
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user