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:
parent
d72f73b26e
commit
d09eff6a0f
@ -579,8 +579,8 @@ spdk_iscsi_conn_destruct(struct spdk_iscsi_conn *conn)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
int
|
||||||
iscsi_get_active_conns(struct spdk_iscsi_tgt_node *target)
|
spdk_iscsi_get_active_conns(struct spdk_iscsi_tgt_node *target)
|
||||||
{
|
{
|
||||||
struct spdk_iscsi_conn *conn;
|
struct spdk_iscsi_conn *conn;
|
||||||
int num = 0;
|
int num = 0;
|
||||||
@ -626,7 +626,7 @@ iscsi_conn_check_shutdown(void *arg)
|
|||||||
{
|
{
|
||||||
struct spdk_event *event;
|
struct spdk_event *event;
|
||||||
|
|
||||||
if (iscsi_get_active_conns(NULL) != 0) {
|
if (spdk_iscsi_get_active_conns(NULL) != 0) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -770,8 +770,8 @@ iscsi_conn_stop(struct spdk_iscsi_conn *conn)
|
|||||||
iscsi_poll_group_remove_conn(conn);
|
iscsi_poll_group_remove_conn(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
iscsi_conns_start_exit(struct spdk_iscsi_tgt_node *target)
|
spdk_iscsi_conns_start_exit(struct spdk_iscsi_tgt_node *target)
|
||||||
{
|
{
|
||||||
struct spdk_iscsi_conn *conn;
|
struct spdk_iscsi_conn *conn;
|
||||||
int i;
|
int i;
|
||||||
@ -802,7 +802,7 @@ iscsi_conns_start_exit(struct spdk_iscsi_tgt_node *target)
|
|||||||
void
|
void
|
||||||
spdk_shutdown_iscsi_conns(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);
|
g_shutdown_timer = spdk_poller_register(iscsi_conn_check_shutdown, NULL, 1000);
|
||||||
}
|
}
|
||||||
|
@ -172,6 +172,8 @@ extern struct spdk_iscsi_conn *g_conns_array;
|
|||||||
|
|
||||||
int spdk_initialize_iscsi_conns(void);
|
int spdk_initialize_iscsi_conns(void);
|
||||||
void spdk_shutdown_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);
|
int spdk_iscsi_conn_construct(struct spdk_iscsi_portal *portal, struct spdk_sock *sock);
|
||||||
void spdk_iscsi_conn_destruct(struct spdk_iscsi_conn *conn);
|
void spdk_iscsi_conn_destruct(struct spdk_iscsi_conn *conn);
|
||||||
|
@ -175,6 +175,10 @@ DEFINE_STUB(spdk_scsi_dev_delete_port, int,
|
|||||||
|
|
||||||
DEFINE_STUB_V(spdk_shutdown_iscsi_conns, (void));
|
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
|
void
|
||||||
spdk_iscsi_task_cpl(struct spdk_scsi_task *scsi_task)
|
spdk_iscsi_task_cpl(struct spdk_scsi_task *scsi_task)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user