lib/iscsi: Make two helper functions from private to public in iSCSI library

These change will be used in the next patch.

Change-Id: Ifdb4ccf20049b46e850122a4021cbbe7441e1270
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450736
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-04-10 17:01:43 +09:00 committed by Ben Walker
parent d72f73b26e
commit d09eff6a0f
3 changed files with 12 additions and 6 deletions

View File

@ -579,8 +579,8 @@ spdk_iscsi_conn_destruct(struct spdk_iscsi_conn *conn)
}
}
static int
iscsi_get_active_conns(struct spdk_iscsi_tgt_node *target)
int
spdk_iscsi_get_active_conns(struct spdk_iscsi_tgt_node *target)
{
struct spdk_iscsi_conn *conn;
int num = 0;
@ -626,7 +626,7 @@ iscsi_conn_check_shutdown(void *arg)
{
struct spdk_event *event;
if (iscsi_get_active_conns(NULL) != 0) {
if (spdk_iscsi_get_active_conns(NULL) != 0) {
return 1;
}
@ -770,8 +770,8 @@ iscsi_conn_stop(struct spdk_iscsi_conn *conn)
iscsi_poll_group_remove_conn(conn);
}
static void
iscsi_conns_start_exit(struct spdk_iscsi_tgt_node *target)
void
spdk_iscsi_conns_start_exit(struct spdk_iscsi_tgt_node *target)
{
struct spdk_iscsi_conn *conn;
int i;
@ -802,7 +802,7 @@ iscsi_conns_start_exit(struct spdk_iscsi_tgt_node *target)
void
spdk_shutdown_iscsi_conns(void)
{
iscsi_conns_start_exit(NULL);
spdk_iscsi_conns_start_exit(NULL);
g_shutdown_timer = spdk_poller_register(iscsi_conn_check_shutdown, NULL, 1000);
}

View File

@ -172,6 +172,8 @@ extern struct spdk_iscsi_conn *g_conns_array;
int spdk_initialize_iscsi_conns(void);
void spdk_shutdown_iscsi_conns(void);
void spdk_iscsi_conns_start_exit(struct spdk_iscsi_tgt_node *target);
int spdk_iscsi_get_active_conns(struct spdk_iscsi_tgt_node *target);
int spdk_iscsi_conn_construct(struct spdk_iscsi_portal *portal, struct spdk_sock *sock);
void spdk_iscsi_conn_destruct(struct spdk_iscsi_conn *conn);

View File

@ -175,6 +175,10 @@ DEFINE_STUB(spdk_scsi_dev_delete_port, int,
DEFINE_STUB_V(spdk_shutdown_iscsi_conns, (void));
DEFINE_STUB_V(spdk_iscsi_conns_start_exit, (struct spdk_iscsi_tgt_node *target));
DEFINE_STUB(spdk_iscsi_get_active_conns, int, (struct spdk_iscsi_tgt_node *target), 0);
void
spdk_iscsi_task_cpl(struct spdk_scsi_task *scsi_task)
{