Commit 0873fe44 authored by Max Gurtovoy's avatar Max Gurtovoy Committed by Martin K. Petersen

scsi: target: iscsi: Rename iscsi_session to iscsit_session

The structure iscsi_session naming is used by the iSCSI initiator
driver. Rename the target session to iscsit_session to have more readable
code.

Link: https://lore.kernel.org/r/20220428092939.36768-3-mgurtovoy@nvidia.comReviewed-by: default avatarMike Christie <michael.christie@oracle.com>
Signed-off-by: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent be36d683
...@@ -2350,7 +2350,7 @@ iscsit_handle_text_cmd(struct iscsit_conn *conn, struct iscsit_cmd *cmd, ...@@ -2350,7 +2350,7 @@ iscsit_handle_text_cmd(struct iscsit_conn *conn, struct iscsit_cmd *cmd,
int iscsit_logout_closesession(struct iscsit_cmd *cmd, struct iscsit_conn *conn) int iscsit_logout_closesession(struct iscsit_cmd *cmd, struct iscsit_conn *conn)
{ {
struct iscsit_conn *conn_p; struct iscsit_conn *conn_p;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
pr_debug("Received logout request CLOSESESSION on CID: %hu" pr_debug("Received logout request CLOSESESSION on CID: %hu"
" for SID: %u.\n", conn->cid, conn->sess->sid); " for SID: %u.\n", conn->cid, conn->sess->sid);
...@@ -2380,7 +2380,7 @@ int iscsit_logout_closesession(struct iscsit_cmd *cmd, struct iscsit_conn *conn) ...@@ -2380,7 +2380,7 @@ int iscsit_logout_closesession(struct iscsit_cmd *cmd, struct iscsit_conn *conn)
int iscsit_logout_closeconnection(struct iscsit_cmd *cmd, struct iscsit_conn *conn) int iscsit_logout_closeconnection(struct iscsit_cmd *cmd, struct iscsit_conn *conn)
{ {
struct iscsit_conn *l_conn; struct iscsit_conn *l_conn;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
pr_debug("Received logout request CLOSECONNECTION for CID:" pr_debug("Received logout request CLOSECONNECTION for CID:"
" %hu on CID: %hu.\n", cmd->logout_cid, conn->cid); " %hu on CID: %hu.\n", cmd->logout_cid, conn->cid);
...@@ -2427,7 +2427,7 @@ int iscsit_logout_closeconnection(struct iscsit_cmd *cmd, struct iscsit_conn *co ...@@ -2427,7 +2427,7 @@ int iscsit_logout_closeconnection(struct iscsit_cmd *cmd, struct iscsit_conn *co
int iscsit_logout_removeconnforrecovery(struct iscsit_cmd *cmd, struct iscsit_conn *conn) int iscsit_logout_removeconnforrecovery(struct iscsit_cmd *cmd, struct iscsit_conn *conn)
{ {
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
pr_debug("Received explicit REMOVECONNFORRECOVERY logout for" pr_debug("Received explicit REMOVECONNFORRECOVERY logout for"
" CID: %hu on CID: %hu.\n", cmd->logout_cid, conn->cid); " CID: %hu on CID: %hu.\n", cmd->logout_cid, conn->cid);
...@@ -2901,7 +2901,7 @@ iscsit_build_logout_rsp(struct iscsit_cmd *cmd, struct iscsit_conn *conn, ...@@ -2901,7 +2901,7 @@ iscsit_build_logout_rsp(struct iscsit_cmd *cmd, struct iscsit_conn *conn,
{ {
struct iscsit_conn *logout_conn = NULL; struct iscsit_conn *logout_conn = NULL;
struct iscsi_conn_recovery *cr = NULL; struct iscsi_conn_recovery *cr = NULL;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
/* /*
* The actual shutting down of Sessions and/or Connections * The actual shutting down of Sessions and/or Connections
* for CLOSESESSION and CLOSECONNECTION Logout Requests * for CLOSESESSION and CLOSECONNECTION Logout Requests
...@@ -4145,7 +4145,7 @@ static void iscsit_release_commands_from_conn(struct iscsit_conn *conn) ...@@ -4145,7 +4145,7 @@ static void iscsit_release_commands_from_conn(struct iscsit_conn *conn)
{ {
LIST_HEAD(tmp_list); LIST_HEAD(tmp_list);
struct iscsit_cmd *cmd = NULL, *cmd_tmp = NULL; struct iscsit_cmd *cmd = NULL, *cmd_tmp = NULL;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
/* /*
* We expect this function to only ever be called from either RX or TX * We expect this function to only ever be called from either RX or TX
* thread context via iscsit_close_connection() once the other context * thread context via iscsit_close_connection() once the other context
...@@ -4201,7 +4201,7 @@ int iscsit_close_connection( ...@@ -4201,7 +4201,7 @@ int iscsit_close_connection(
struct iscsit_conn *conn) struct iscsit_conn *conn)
{ {
int conn_logout = (conn->conn_state == TARG_CONN_STATE_IN_LOGOUT); int conn_logout = (conn->conn_state == TARG_CONN_STATE_IN_LOGOUT);
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
pr_debug("Closing iSCSI connection CID %hu on SID:" pr_debug("Closing iSCSI connection CID %hu on SID:"
" %u\n", conn->cid, sess->sid); " %u\n", conn->cid, sess->sid);
...@@ -4438,7 +4438,7 @@ int iscsit_close_connection( ...@@ -4438,7 +4438,7 @@ int iscsit_close_connection(
* If the iSCSI Session for the iSCSI Initiator Node exists, * If the iSCSI Session for the iSCSI Initiator Node exists,
* forcefully shutdown the iSCSI NEXUS. * forcefully shutdown the iSCSI NEXUS.
*/ */
int iscsit_close_session(struct iscsi_session *sess, bool can_sleep) int iscsit_close_session(struct iscsit_session *sess, bool can_sleep)
{ {
struct iscsi_portal_group *tpg = sess->tpg; struct iscsi_portal_group *tpg = sess->tpg;
struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
...@@ -4508,7 +4508,7 @@ int iscsit_close_session(struct iscsi_session *sess, bool can_sleep) ...@@ -4508,7 +4508,7 @@ int iscsit_close_session(struct iscsi_session *sess, bool can_sleep)
static void iscsit_logout_post_handler_closesession( static void iscsit_logout_post_handler_closesession(
struct iscsit_conn *conn) struct iscsit_conn *conn)
{ {
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
int sleep = 1; int sleep = 1;
/* /*
* Traditional iscsi/tcp will invoke this logic from TX thread * Traditional iscsi/tcp will invoke this logic from TX thread
...@@ -4557,7 +4557,7 @@ static void iscsit_logout_post_handler_diffcid( ...@@ -4557,7 +4557,7 @@ static void iscsit_logout_post_handler_diffcid(
u16 cid) u16 cid)
{ {
struct iscsit_conn *l_conn; struct iscsit_conn *l_conn;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
bool conn_found = false; bool conn_found = false;
if (!sess) if (!sess)
...@@ -4649,7 +4649,7 @@ int iscsit_logout_post_handler( ...@@ -4649,7 +4649,7 @@ int iscsit_logout_post_handler(
} }
EXPORT_SYMBOL(iscsit_logout_post_handler); EXPORT_SYMBOL(iscsit_logout_post_handler);
void iscsit_fail_session(struct iscsi_session *sess) void iscsit_fail_session(struct iscsit_session *sess)
{ {
struct iscsit_conn *conn; struct iscsit_conn *conn;
...@@ -4665,7 +4665,7 @@ void iscsit_fail_session(struct iscsi_session *sess) ...@@ -4665,7 +4665,7 @@ void iscsit_fail_session(struct iscsi_session *sess)
} }
void iscsit_stop_session( void iscsit_stop_session(
struct iscsi_session *sess, struct iscsit_session *sess,
int session_sleep, int session_sleep,
int connection_sleep) int connection_sleep)
{ {
...@@ -4712,7 +4712,7 @@ void iscsit_stop_session( ...@@ -4712,7 +4712,7 @@ void iscsit_stop_session(
int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force) int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force)
{ {
struct iscsi_session *sess; struct iscsit_session *sess;
struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
struct se_session *se_sess, *se_sess_tmp; struct se_session *se_sess, *se_sess_tmp;
LIST_HEAD(free_list); LIST_HEAD(free_list);
...@@ -4726,7 +4726,7 @@ int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force) ...@@ -4726,7 +4726,7 @@ int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force)
list_for_each_entry_safe(se_sess, se_sess_tmp, &se_tpg->tpg_sess_list, list_for_each_entry_safe(se_sess, se_sess_tmp, &se_tpg->tpg_sess_list,
sess_list) { sess_list) {
sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; sess = (struct iscsit_session *)se_sess->fabric_sess_ptr;
spin_lock(&sess->conn_lock); spin_lock(&sess->conn_lock);
if (atomic_read(&sess->session_fall_back_to_erl0) || if (atomic_read(&sess->session_fall_back_to_erl0) ||
...@@ -4747,7 +4747,7 @@ int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force) ...@@ -4747,7 +4747,7 @@ int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force)
spin_unlock_bh(&se_tpg->session_lock); spin_unlock_bh(&se_tpg->session_lock);
list_for_each_entry_safe(se_sess, se_sess_tmp, &free_list, sess_list) { list_for_each_entry_safe(se_sess, se_sess_tmp, &free_list, sess_list) {
sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; sess = (struct iscsit_session *)se_sess->fabric_sess_ptr;
list_del_init(&se_sess->sess_list); list_del_init(&se_sess->sess_list);
iscsit_stop_session(sess, 1, 1); iscsit_stop_session(sess, 1, 1);
......
...@@ -9,7 +9,7 @@ struct iscsit_cmd; ...@@ -9,7 +9,7 @@ struct iscsit_cmd;
struct iscsit_conn; struct iscsit_conn;
struct iscsi_np; struct iscsi_np;
struct iscsi_portal_group; struct iscsi_portal_group;
struct iscsi_session; struct iscsit_session;
struct iscsi_tpg_np; struct iscsi_tpg_np;
struct kref; struct kref;
struct sockaddr_storage; struct sockaddr_storage;
...@@ -41,9 +41,9 @@ extern void iscsit_thread_get_cpumask(struct iscsit_conn *); ...@@ -41,9 +41,9 @@ extern void iscsit_thread_get_cpumask(struct iscsit_conn *);
extern int iscsi_target_tx_thread(void *); extern int iscsi_target_tx_thread(void *);
extern int iscsi_target_rx_thread(void *); extern int iscsi_target_rx_thread(void *);
extern int iscsit_close_connection(struct iscsit_conn *); extern int iscsit_close_connection(struct iscsit_conn *);
extern int iscsit_close_session(struct iscsi_session *, bool can_sleep); extern int iscsit_close_session(struct iscsit_session *, bool can_sleep);
extern void iscsit_fail_session(struct iscsi_session *); extern void iscsit_fail_session(struct iscsit_session *);
extern void iscsit_stop_session(struct iscsi_session *, int, int); extern void iscsit_stop_session(struct iscsit_session *, int, int);
extern int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *, int); extern int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *, int);
extern struct iscsit_global *iscsit_global; extern struct iscsit_global *iscsit_global;
......
...@@ -443,7 +443,7 @@ static ssize_t iscsi_nacl_param_##name##_show(struct config_item *item, \ ...@@ -443,7 +443,7 @@ static ssize_t iscsi_nacl_param_##name##_show(struct config_item *item, \
char *page) \ char *page) \
{ \ { \
struct se_node_acl *se_nacl = param_to_nacl(item); \ struct se_node_acl *se_nacl = param_to_nacl(item); \
struct iscsi_session *sess; \ struct iscsit_session *sess; \
struct se_session *se_sess; \ struct se_session *se_sess; \
ssize_t rb; \ ssize_t rb; \
\ \
...@@ -498,7 +498,7 @@ static struct configfs_attribute *lio_target_nacl_param_attrs[] = { ...@@ -498,7 +498,7 @@ static struct configfs_attribute *lio_target_nacl_param_attrs[] = {
static ssize_t lio_target_nacl_info_show(struct config_item *item, char *page) static ssize_t lio_target_nacl_info_show(struct config_item *item, char *page)
{ {
struct se_node_acl *se_nacl = acl_to_nacl(item); struct se_node_acl *se_nacl = acl_to_nacl(item);
struct iscsi_session *sess; struct iscsit_session *sess;
struct iscsit_conn *conn; struct iscsit_conn *conn;
struct se_session *se_sess; struct se_session *se_sess;
ssize_t rb = 0; ssize_t rb = 0;
...@@ -1347,7 +1347,7 @@ static int iscsi_get_cmd_state(struct se_cmd *se_cmd) ...@@ -1347,7 +1347,7 @@ static int iscsi_get_cmd_state(struct se_cmd *se_cmd)
static u32 lio_sess_get_index(struct se_session *se_sess) static u32 lio_sess_get_index(struct se_session *se_sess)
{ {
struct iscsi_session *sess = se_sess->fabric_sess_ptr; struct iscsit_session *sess = se_sess->fabric_sess_ptr;
return sess->session_index; return sess->session_index;
} }
...@@ -1357,7 +1357,7 @@ static u32 lio_sess_get_initiator_sid( ...@@ -1357,7 +1357,7 @@ static u32 lio_sess_get_initiator_sid(
unsigned char *buf, unsigned char *buf,
u32 size) u32 size)
{ {
struct iscsi_session *sess = se_sess->fabric_sess_ptr; struct iscsit_session *sess = se_sess->fabric_sess_ptr;
/* /*
* iSCSI Initiator Session Identifier from RFC-3720. * iSCSI Initiator Session Identifier from RFC-3720.
*/ */
...@@ -1468,11 +1468,11 @@ static int lio_tpg_check_prot_fabric_only( ...@@ -1468,11 +1468,11 @@ static int lio_tpg_check_prot_fabric_only(
/* /*
* This function calls iscsit_inc_session_usage_count() on the * This function calls iscsit_inc_session_usage_count() on the
* struct iscsi_session in question. * struct iscsit_session in question.
*/ */
static void lio_tpg_close_session(struct se_session *se_sess) static void lio_tpg_close_session(struct se_session *se_sess)
{ {
struct iscsi_session *sess = se_sess->fabric_sess_ptr; struct iscsit_session *sess = se_sess->fabric_sess_ptr;
struct se_portal_group *se_tpg = &sess->tpg->tpg_se_tpg; struct se_portal_group *se_tpg = &sess->tpg->tpg_se_tpg;
spin_lock_bh(&se_tpg->session_lock); spin_lock_bh(&se_tpg->session_lock);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "iscsi_target_tpg.h" #include "iscsi_target_tpg.h"
#include "iscsi_target_util.h" #include "iscsi_target_util.h"
void iscsit_determine_maxcmdsn(struct iscsi_session *sess) void iscsit_determine_maxcmdsn(struct iscsit_session *sess)
{ {
struct se_node_acl *se_nacl; struct se_node_acl *se_nacl;
...@@ -42,7 +42,7 @@ void iscsit_determine_maxcmdsn(struct iscsi_session *sess) ...@@ -42,7 +42,7 @@ void iscsit_determine_maxcmdsn(struct iscsi_session *sess)
atomic_add(se_nacl->queue_depth - 1, &sess->max_cmd_sn); atomic_add(se_nacl->queue_depth - 1, &sess->max_cmd_sn);
} }
void iscsit_increment_maxcmdsn(struct iscsit_cmd *cmd, struct iscsi_session *sess) void iscsit_increment_maxcmdsn(struct iscsit_cmd *cmd, struct iscsit_session *sess)
{ {
u32 max_cmd_sn; u32 max_cmd_sn;
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
#define ISCSI_TARGET_DEVICE_H #define ISCSI_TARGET_DEVICE_H
struct iscsit_cmd; struct iscsit_cmd;
struct iscsi_session; struct iscsit_session;
extern void iscsit_determine_maxcmdsn(struct iscsi_session *); extern void iscsit_determine_maxcmdsn(struct iscsit_session *);
extern void iscsit_increment_maxcmdsn(struct iscsit_cmd *, struct iscsi_session *); extern void iscsit_increment_maxcmdsn(struct iscsit_cmd *, struct iscsit_session *);
#endif /* ISCSI_TARGET_DEVICE_H */ #endif /* ISCSI_TARGET_DEVICE_H */
...@@ -743,7 +743,7 @@ int iscsit_check_post_dataout( ...@@ -743,7 +743,7 @@ int iscsit_check_post_dataout(
void iscsit_handle_time2retain_timeout(struct timer_list *t) void iscsit_handle_time2retain_timeout(struct timer_list *t)
{ {
struct iscsi_session *sess = from_timer(sess, t, time2retain_timer); struct iscsit_session *sess = from_timer(sess, t, time2retain_timer);
struct iscsi_portal_group *tpg = sess->tpg; struct iscsi_portal_group *tpg = sess->tpg;
struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
...@@ -768,7 +768,7 @@ void iscsit_handle_time2retain_timeout(struct timer_list *t) ...@@ -768,7 +768,7 @@ void iscsit_handle_time2retain_timeout(struct timer_list *t)
iscsit_close_session(sess, false); iscsit_close_session(sess, false);
} }
void iscsit_start_time2retain_handler(struct iscsi_session *sess) void iscsit_start_time2retain_handler(struct iscsit_session *sess)
{ {
int tpg_active; int tpg_active;
/* /*
...@@ -794,7 +794,7 @@ void iscsit_start_time2retain_handler(struct iscsi_session *sess) ...@@ -794,7 +794,7 @@ void iscsit_start_time2retain_handler(struct iscsi_session *sess)
jiffies + sess->sess_ops->DefaultTime2Retain * HZ); jiffies + sess->sess_ops->DefaultTime2Retain * HZ);
} }
int iscsit_stop_time2retain_timer(struct iscsi_session *sess) int iscsit_stop_time2retain_timer(struct iscsit_session *sess)
{ {
struct iscsi_portal_group *tpg = sess->tpg; struct iscsi_portal_group *tpg = sess->tpg;
struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
...@@ -880,7 +880,7 @@ void iscsit_cause_connection_reinstatement(struct iscsit_conn *conn, int sleep) ...@@ -880,7 +880,7 @@ void iscsit_cause_connection_reinstatement(struct iscsit_conn *conn, int sleep)
} }
EXPORT_SYMBOL(iscsit_cause_connection_reinstatement); EXPORT_SYMBOL(iscsit_cause_connection_reinstatement);
void iscsit_fall_back_to_erl0(struct iscsi_session *sess) void iscsit_fall_back_to_erl0(struct iscsit_session *sess)
{ {
pr_debug("Falling back to ErrorRecoveryLevel=0 for SID:" pr_debug("Falling back to ErrorRecoveryLevel=0 for SID:"
" %u\n", sess->sid); " %u\n", sess->sid);
...@@ -890,7 +890,7 @@ void iscsit_fall_back_to_erl0(struct iscsi_session *sess) ...@@ -890,7 +890,7 @@ void iscsit_fall_back_to_erl0(struct iscsi_session *sess)
static void iscsit_handle_connection_cleanup(struct iscsit_conn *conn) static void iscsit_handle_connection_cleanup(struct iscsit_conn *conn)
{ {
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
if ((sess->sess_ops->ErrorRecoveryLevel == 2) && if ((sess->sess_ops->ErrorRecoveryLevel == 2) &&
!atomic_read(&sess->session_reinstatement) && !atomic_read(&sess->session_reinstatement) &&
......
...@@ -6,17 +6,17 @@ ...@@ -6,17 +6,17 @@
struct iscsit_cmd; struct iscsit_cmd;
struct iscsit_conn; struct iscsit_conn;
struct iscsi_session; struct iscsit_session;
extern void iscsit_set_dataout_sequence_values(struct iscsit_cmd *); extern void iscsit_set_dataout_sequence_values(struct iscsit_cmd *);
extern int iscsit_check_pre_dataout(struct iscsit_cmd *, unsigned char *); extern int iscsit_check_pre_dataout(struct iscsit_cmd *, unsigned char *);
extern int iscsit_check_post_dataout(struct iscsit_cmd *, unsigned char *, u8); extern int iscsit_check_post_dataout(struct iscsit_cmd *, unsigned char *, u8);
extern void iscsit_start_time2retain_handler(struct iscsi_session *); extern void iscsit_start_time2retain_handler(struct iscsit_session *);
extern void iscsit_handle_time2retain_timeout(struct timer_list *t); extern void iscsit_handle_time2retain_timeout(struct timer_list *t);
extern int iscsit_stop_time2retain_timer(struct iscsi_session *); extern int iscsit_stop_time2retain_timer(struct iscsit_session *);
extern void iscsit_connection_reinstatement_rcfr(struct iscsit_conn *); extern void iscsit_connection_reinstatement_rcfr(struct iscsit_conn *);
extern void iscsit_cause_connection_reinstatement(struct iscsit_conn *, int); extern void iscsit_cause_connection_reinstatement(struct iscsit_conn *, int);
extern void iscsit_fall_back_to_erl0(struct iscsi_session *); extern void iscsit_fall_back_to_erl0(struct iscsit_session *);
extern void iscsit_take_action_for_connection_exit(struct iscsit_conn *, bool *); extern void iscsit_take_action_for_connection_exit(struct iscsit_conn *, bool *);
#endif /*** ISCSI_TARGET_ERL0_H ***/ #endif /*** ISCSI_TARGET_ERL0_H ***/
...@@ -767,7 +767,7 @@ static struct iscsi_ooo_cmdsn *iscsit_allocate_ooo_cmdsn(void) ...@@ -767,7 +767,7 @@ static struct iscsi_ooo_cmdsn *iscsit_allocate_ooo_cmdsn(void)
} }
static int iscsit_attach_ooo_cmdsn( static int iscsit_attach_ooo_cmdsn(
struct iscsi_session *sess, struct iscsit_session *sess,
struct iscsi_ooo_cmdsn *ooo_cmdsn) struct iscsi_ooo_cmdsn *ooo_cmdsn)
{ {
struct iscsi_ooo_cmdsn *ooo_tail, *ooo_tmp; struct iscsi_ooo_cmdsn *ooo_tail, *ooo_tmp;
...@@ -815,10 +815,10 @@ static int iscsit_attach_ooo_cmdsn( ...@@ -815,10 +815,10 @@ static int iscsit_attach_ooo_cmdsn(
/* /*
* Removes an struct iscsi_ooo_cmdsn from a session's list, * Removes an struct iscsi_ooo_cmdsn from a session's list,
* called with struct iscsi_session->cmdsn_mutex held. * called with struct iscsit_session->cmdsn_mutex held.
*/ */
void iscsit_remove_ooo_cmdsn( void iscsit_remove_ooo_cmdsn(
struct iscsi_session *sess, struct iscsit_session *sess,
struct iscsi_ooo_cmdsn *ooo_cmdsn) struct iscsi_ooo_cmdsn *ooo_cmdsn)
{ {
list_del(&ooo_cmdsn->ooo_list); list_del(&ooo_cmdsn->ooo_list);
...@@ -828,7 +828,7 @@ void iscsit_remove_ooo_cmdsn( ...@@ -828,7 +828,7 @@ void iscsit_remove_ooo_cmdsn(
void iscsit_clear_ooo_cmdsns_for_conn(struct iscsit_conn *conn) void iscsit_clear_ooo_cmdsns_for_conn(struct iscsit_conn *conn)
{ {
struct iscsi_ooo_cmdsn *ooo_cmdsn; struct iscsi_ooo_cmdsn *ooo_cmdsn;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
mutex_lock(&sess->cmdsn_mutex); mutex_lock(&sess->cmdsn_mutex);
list_for_each_entry(ooo_cmdsn, &sess->sess_ooo_cmdsn_list, ooo_list) { list_for_each_entry(ooo_cmdsn, &sess->sess_ooo_cmdsn_list, ooo_list) {
...@@ -840,7 +840,7 @@ void iscsit_clear_ooo_cmdsns_for_conn(struct iscsit_conn *conn) ...@@ -840,7 +840,7 @@ void iscsit_clear_ooo_cmdsns_for_conn(struct iscsit_conn *conn)
mutex_unlock(&sess->cmdsn_mutex); mutex_unlock(&sess->cmdsn_mutex);
} }
int iscsit_execute_ooo_cmdsns(struct iscsi_session *sess) int iscsit_execute_ooo_cmdsns(struct iscsit_session *sess)
{ {
int ooo_count = 0; int ooo_count = 0;
struct iscsit_cmd *cmd = NULL; struct iscsit_cmd *cmd = NULL;
...@@ -994,7 +994,7 @@ int iscsit_execute_cmd(struct iscsit_cmd *cmd, int ooo) ...@@ -994,7 +994,7 @@ int iscsit_execute_cmd(struct iscsit_cmd *cmd, int ooo)
return 0; return 0;
} }
void iscsit_free_all_ooo_cmdsns(struct iscsi_session *sess) void iscsit_free_all_ooo_cmdsns(struct iscsit_session *sess)
{ {
struct iscsi_ooo_cmdsn *ooo_cmdsn, *ooo_cmdsn_tmp; struct iscsi_ooo_cmdsn *ooo_cmdsn, *ooo_cmdsn_tmp;
...@@ -1009,7 +1009,7 @@ void iscsit_free_all_ooo_cmdsns(struct iscsi_session *sess) ...@@ -1009,7 +1009,7 @@ void iscsit_free_all_ooo_cmdsns(struct iscsi_session *sess)
} }
int iscsit_handle_ooo_cmdsn( int iscsit_handle_ooo_cmdsn(
struct iscsi_session *sess, struct iscsit_session *sess,
struct iscsit_cmd *cmd, struct iscsit_cmd *cmd,
u32 cmdsn) u32 cmdsn)
{ {
...@@ -1097,7 +1097,7 @@ void iscsit_handle_dataout_timeout(struct timer_list *t) ...@@ -1097,7 +1097,7 @@ void iscsit_handle_dataout_timeout(struct timer_list *t)
u32 r2t_length = 0, r2t_offset = 0; u32 r2t_length = 0, r2t_offset = 0;
struct iscsit_cmd *cmd = from_timer(cmd, t, dataout_timer); struct iscsit_cmd *cmd = from_timer(cmd, t, dataout_timer);
struct iscsit_conn *conn = cmd->conn; struct iscsit_conn *conn = cmd->conn;
struct iscsi_session *sess = NULL; struct iscsit_session *sess = NULL;
struct iscsi_node_attrib *na; struct iscsi_node_attrib *na;
iscsit_inc_conn_usage_count(conn); iscsit_inc_conn_usage_count(conn);
...@@ -1182,7 +1182,7 @@ void iscsit_handle_dataout_timeout(struct timer_list *t) ...@@ -1182,7 +1182,7 @@ void iscsit_handle_dataout_timeout(struct timer_list *t)
void iscsit_mod_dataout_timer(struct iscsit_cmd *cmd) void iscsit_mod_dataout_timer(struct iscsit_cmd *cmd)
{ {
struct iscsit_conn *conn = cmd->conn; struct iscsit_conn *conn = cmd->conn;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess); struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess);
spin_lock_bh(&cmd->dataout_timeout_lock); spin_lock_bh(&cmd->dataout_timeout_lock);
...@@ -1202,7 +1202,7 @@ void iscsit_start_dataout_timer( ...@@ -1202,7 +1202,7 @@ void iscsit_start_dataout_timer(
struct iscsit_cmd *cmd, struct iscsit_cmd *cmd,
struct iscsit_conn *conn) struct iscsit_conn *conn)
{ {
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess); struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess);
lockdep_assert_held(&cmd->dataout_timeout_lock); lockdep_assert_held(&cmd->dataout_timeout_lock);
......
...@@ -10,7 +10,7 @@ struct iscsit_conn; ...@@ -10,7 +10,7 @@ struct iscsit_conn;
struct iscsi_datain_req; struct iscsi_datain_req;
struct iscsi_ooo_cmdsn; struct iscsi_ooo_cmdsn;
struct iscsi_pdu; struct iscsi_pdu;
struct iscsi_session; struct iscsit_session;
extern int iscsit_dump_data_payload(struct iscsit_conn *, u32, int); extern int iscsit_dump_data_payload(struct iscsit_conn *, u32, int);
extern int iscsit_create_recovery_datain_values_datasequenceinorder_yes( extern int iscsit_create_recovery_datain_values_datasequenceinorder_yes(
...@@ -25,11 +25,11 @@ extern int iscsit_handle_data_ack(struct iscsit_conn *, u32, u32, u32); ...@@ -25,11 +25,11 @@ extern int iscsit_handle_data_ack(struct iscsit_conn *, u32, u32, u32);
extern int iscsit_dataout_datapduinorder_no_fbit(struct iscsit_cmd *, struct iscsi_pdu *); extern int iscsit_dataout_datapduinorder_no_fbit(struct iscsit_cmd *, struct iscsi_pdu *);
extern int iscsit_recover_dataout_sequence(struct iscsit_cmd *, u32, u32); extern int iscsit_recover_dataout_sequence(struct iscsit_cmd *, u32, u32);
extern void iscsit_clear_ooo_cmdsns_for_conn(struct iscsit_conn *); extern void iscsit_clear_ooo_cmdsns_for_conn(struct iscsit_conn *);
extern void iscsit_free_all_ooo_cmdsns(struct iscsi_session *); extern void iscsit_free_all_ooo_cmdsns(struct iscsit_session *);
extern int iscsit_execute_ooo_cmdsns(struct iscsi_session *); extern int iscsit_execute_ooo_cmdsns(struct iscsit_session *);
extern int iscsit_execute_cmd(struct iscsit_cmd *, int); extern int iscsit_execute_cmd(struct iscsit_cmd *, int);
extern int iscsit_handle_ooo_cmdsn(struct iscsi_session *, struct iscsit_cmd *, u32); extern int iscsit_handle_ooo_cmdsn(struct iscsit_session *, struct iscsit_cmd *, u32);
extern void iscsit_remove_ooo_cmdsn(struct iscsi_session *, struct iscsi_ooo_cmdsn *); extern void iscsit_remove_ooo_cmdsn(struct iscsit_session *, struct iscsi_ooo_cmdsn *);
extern void iscsit_handle_dataout_timeout(struct timer_list *t); extern void iscsit_handle_dataout_timeout(struct timer_list *t);
extern void iscsit_mod_dataout_timer(struct iscsit_cmd *); extern void iscsit_mod_dataout_timer(struct iscsit_cmd *);
extern void iscsit_start_dataout_timer(struct iscsit_cmd *, struct iscsit_conn *); extern void iscsit_start_dataout_timer(struct iscsit_cmd *, struct iscsit_conn *);
......
...@@ -74,7 +74,7 @@ void iscsit_create_conn_recovery_dataout_values( ...@@ -74,7 +74,7 @@ void iscsit_create_conn_recovery_dataout_values(
} }
static int iscsit_attach_active_connection_recovery_entry( static int iscsit_attach_active_connection_recovery_entry(
struct iscsi_session *sess, struct iscsit_session *sess,
struct iscsi_conn_recovery *cr) struct iscsi_conn_recovery *cr)
{ {
spin_lock(&sess->cr_a_lock); spin_lock(&sess->cr_a_lock);
...@@ -85,7 +85,7 @@ static int iscsit_attach_active_connection_recovery_entry( ...@@ -85,7 +85,7 @@ static int iscsit_attach_active_connection_recovery_entry(
} }
static int iscsit_attach_inactive_connection_recovery_entry( static int iscsit_attach_inactive_connection_recovery_entry(
struct iscsi_session *sess, struct iscsit_session *sess,
struct iscsi_conn_recovery *cr) struct iscsi_conn_recovery *cr)
{ {
spin_lock(&sess->cr_i_lock); spin_lock(&sess->cr_i_lock);
...@@ -100,7 +100,7 @@ static int iscsit_attach_inactive_connection_recovery_entry( ...@@ -100,7 +100,7 @@ static int iscsit_attach_inactive_connection_recovery_entry(
} }
struct iscsi_conn_recovery *iscsit_get_inactive_connection_recovery_entry( struct iscsi_conn_recovery *iscsit_get_inactive_connection_recovery_entry(
struct iscsi_session *sess, struct iscsit_session *sess,
u16 cid) u16 cid)
{ {
struct iscsi_conn_recovery *cr; struct iscsi_conn_recovery *cr;
...@@ -117,7 +117,7 @@ struct iscsi_conn_recovery *iscsit_get_inactive_connection_recovery_entry( ...@@ -117,7 +117,7 @@ struct iscsi_conn_recovery *iscsit_get_inactive_connection_recovery_entry(
return NULL; return NULL;
} }
void iscsit_free_connection_recovery_entries(struct iscsi_session *sess) void iscsit_free_connection_recovery_entries(struct iscsit_session *sess)
{ {
struct iscsit_cmd *cmd, *cmd_tmp; struct iscsit_cmd *cmd, *cmd_tmp;
struct iscsi_conn_recovery *cr, *cr_tmp; struct iscsi_conn_recovery *cr, *cr_tmp;
...@@ -169,7 +169,7 @@ void iscsit_free_connection_recovery_entries(struct iscsi_session *sess) ...@@ -169,7 +169,7 @@ void iscsit_free_connection_recovery_entries(struct iscsi_session *sess)
int iscsit_remove_active_connection_recovery_entry( int iscsit_remove_active_connection_recovery_entry(
struct iscsi_conn_recovery *cr, struct iscsi_conn_recovery *cr,
struct iscsi_session *sess) struct iscsit_session *sess)
{ {
spin_lock(&sess->cr_a_lock); spin_lock(&sess->cr_a_lock);
list_del(&cr->cr_list); list_del(&cr->cr_list);
...@@ -186,7 +186,7 @@ int iscsit_remove_active_connection_recovery_entry( ...@@ -186,7 +186,7 @@ int iscsit_remove_active_connection_recovery_entry(
static void iscsit_remove_inactive_connection_recovery_entry( static void iscsit_remove_inactive_connection_recovery_entry(
struct iscsi_conn_recovery *cr, struct iscsi_conn_recovery *cr,
struct iscsi_session *sess) struct iscsit_session *sess)
{ {
spin_lock(&sess->cr_i_lock); spin_lock(&sess->cr_i_lock);
list_del(&cr->cr_list); list_del(&cr->cr_list);
...@@ -198,7 +198,7 @@ static void iscsit_remove_inactive_connection_recovery_entry( ...@@ -198,7 +198,7 @@ static void iscsit_remove_inactive_connection_recovery_entry(
*/ */
int iscsit_remove_cmd_from_connection_recovery( int iscsit_remove_cmd_from_connection_recovery(
struct iscsit_cmd *cmd, struct iscsit_cmd *cmd,
struct iscsi_session *sess) struct iscsit_session *sess)
{ {
struct iscsi_conn_recovery *cr; struct iscsi_conn_recovery *cr;
...@@ -219,7 +219,7 @@ void iscsit_discard_cr_cmds_by_expstatsn( ...@@ -219,7 +219,7 @@ void iscsit_discard_cr_cmds_by_expstatsn(
{ {
u32 dropped_count = 0; u32 dropped_count = 0;
struct iscsit_cmd *cmd, *cmd_tmp; struct iscsit_cmd *cmd, *cmd_tmp;
struct iscsi_session *sess = cr->sess; struct iscsit_session *sess = cr->sess;
spin_lock(&cr->conn_recovery_cmd_lock); spin_lock(&cr->conn_recovery_cmd_lock);
list_for_each_entry_safe(cmd, cmd_tmp, list_for_each_entry_safe(cmd, cmd_tmp,
...@@ -268,7 +268,7 @@ int iscsit_discard_unacknowledged_ooo_cmdsns_for_conn(struct iscsit_conn *conn) ...@@ -268,7 +268,7 @@ int iscsit_discard_unacknowledged_ooo_cmdsns_for_conn(struct iscsit_conn *conn)
u32 dropped_count = 0; u32 dropped_count = 0;
struct iscsit_cmd *cmd, *cmd_tmp; struct iscsit_cmd *cmd, *cmd_tmp;
struct iscsi_ooo_cmdsn *ooo_cmdsn, *ooo_cmdsn_tmp; struct iscsi_ooo_cmdsn *ooo_cmdsn, *ooo_cmdsn_tmp;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
mutex_lock(&sess->cmdsn_mutex); mutex_lock(&sess->cmdsn_mutex);
list_for_each_entry_safe(ooo_cmdsn, ooo_cmdsn_tmp, list_for_each_entry_safe(ooo_cmdsn, ooo_cmdsn_tmp,
......
...@@ -7,17 +7,17 @@ ...@@ -7,17 +7,17 @@
struct iscsit_cmd; struct iscsit_cmd;
struct iscsit_conn; struct iscsit_conn;
struct iscsi_conn_recovery; struct iscsi_conn_recovery;
struct iscsi_session; struct iscsit_session;
extern void iscsit_create_conn_recovery_datain_values(struct iscsit_cmd *, __be32); extern void iscsit_create_conn_recovery_datain_values(struct iscsit_cmd *, __be32);
extern void iscsit_create_conn_recovery_dataout_values(struct iscsit_cmd *); extern void iscsit_create_conn_recovery_dataout_values(struct iscsit_cmd *);
extern struct iscsi_conn_recovery *iscsit_get_inactive_connection_recovery_entry( extern struct iscsi_conn_recovery *iscsit_get_inactive_connection_recovery_entry(
struct iscsi_session *, u16); struct iscsit_session *, u16);
extern void iscsit_free_connection_recovery_entries(struct iscsi_session *); extern void iscsit_free_connection_recovery_entries(struct iscsit_session *);
extern int iscsit_remove_active_connection_recovery_entry( extern int iscsit_remove_active_connection_recovery_entry(
struct iscsi_conn_recovery *, struct iscsi_session *); struct iscsi_conn_recovery *, struct iscsit_session *);
extern int iscsit_remove_cmd_from_connection_recovery(struct iscsit_cmd *, extern int iscsit_remove_cmd_from_connection_recovery(struct iscsit_cmd *,
struct iscsi_session *); struct iscsit_session *);
extern void iscsit_discard_cr_cmds_by_expstatsn(struct iscsi_conn_recovery *, u32); extern void iscsit_discard_cr_cmds_by_expstatsn(struct iscsi_conn_recovery *, u32);
extern int iscsit_discard_unacknowledged_ooo_cmdsns_for_conn(struct iscsit_conn *); extern int iscsit_discard_unacknowledged_ooo_cmdsns_for_conn(struct iscsit_conn *);
extern int iscsit_prepare_cmds_for_reallegiance(struct iscsit_conn *); extern int iscsit_prepare_cmds_for_reallegiance(struct iscsit_conn *);
......
...@@ -133,7 +133,7 @@ int iscsi_check_for_session_reinstatement(struct iscsit_conn *conn) ...@@ -133,7 +133,7 @@ int iscsi_check_for_session_reinstatement(struct iscsit_conn *conn)
int sessiontype; int sessiontype;
struct iscsi_param *initiatorname_param = NULL, *sessiontype_param = NULL; struct iscsi_param *initiatorname_param = NULL, *sessiontype_param = NULL;
struct iscsi_portal_group *tpg = conn->tpg; struct iscsi_portal_group *tpg = conn->tpg;
struct iscsi_session *sess = NULL, *sess_p = NULL; struct iscsit_session *sess = NULL, *sess_p = NULL;
struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
struct se_session *se_sess, *se_sess_tmp; struct se_session *se_sess, *se_sess_tmp;
...@@ -204,7 +204,7 @@ int iscsi_check_for_session_reinstatement(struct iscsit_conn *conn) ...@@ -204,7 +204,7 @@ int iscsi_check_for_session_reinstatement(struct iscsit_conn *conn)
} }
static int iscsi_login_set_conn_values( static int iscsi_login_set_conn_values(
struct iscsi_session *sess, struct iscsit_session *sess,
struct iscsit_conn *conn, struct iscsit_conn *conn,
__be16 cid) __be16 cid)
{ {
...@@ -256,11 +256,11 @@ static int iscsi_login_zero_tsih_s1( ...@@ -256,11 +256,11 @@ static int iscsi_login_zero_tsih_s1(
struct iscsit_conn *conn, struct iscsit_conn *conn,
unsigned char *buf) unsigned char *buf)
{ {
struct iscsi_session *sess = NULL; struct iscsit_session *sess = NULL;
struct iscsi_login_req *pdu = (struct iscsi_login_req *)buf; struct iscsi_login_req *pdu = (struct iscsi_login_req *)buf;
int ret; int ret;
sess = kzalloc(sizeof(struct iscsi_session), GFP_KERNEL); sess = kzalloc(sizeof(struct iscsit_session), GFP_KERNEL);
if (!sess) { if (!sess) {
iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR, iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
ISCSI_LOGIN_STATUS_NO_RESOURCES); ISCSI_LOGIN_STATUS_NO_RESOURCES);
...@@ -340,7 +340,7 @@ static int iscsi_login_zero_tsih_s2( ...@@ -340,7 +340,7 @@ static int iscsi_login_zero_tsih_s2(
struct iscsit_conn *conn) struct iscsit_conn *conn)
{ {
struct iscsi_node_attrib *na; struct iscsi_node_attrib *na;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
bool iser = false; bool iser = false;
sess->tpg = conn->tpg; sess->tpg = conn->tpg;
...@@ -474,7 +474,7 @@ static int iscsi_login_non_zero_tsih_s2( ...@@ -474,7 +474,7 @@ static int iscsi_login_non_zero_tsih_s2(
unsigned char *buf) unsigned char *buf)
{ {
struct iscsi_portal_group *tpg = conn->tpg; struct iscsi_portal_group *tpg = conn->tpg;
struct iscsi_session *sess = NULL, *sess_p = NULL; struct iscsit_session *sess = NULL, *sess_p = NULL;
struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
struct se_session *se_sess, *se_sess_tmp; struct se_session *se_sess, *se_sess_tmp;
struct iscsi_login_req *pdu = (struct iscsi_login_req *)buf; struct iscsi_login_req *pdu = (struct iscsi_login_req *)buf;
...@@ -484,7 +484,7 @@ static int iscsi_login_non_zero_tsih_s2( ...@@ -484,7 +484,7 @@ static int iscsi_login_non_zero_tsih_s2(
list_for_each_entry_safe(se_sess, se_sess_tmp, &se_tpg->tpg_sess_list, list_for_each_entry_safe(se_sess, se_sess_tmp, &se_tpg->tpg_sess_list,
sess_list) { sess_list) {
sess_p = (struct iscsi_session *)se_sess->fabric_sess_ptr; sess_p = (struct iscsit_session *)se_sess->fabric_sess_ptr;
if (atomic_read(&sess_p->session_fall_back_to_erl0) || if (atomic_read(&sess_p->session_fall_back_to_erl0) ||
atomic_read(&sess_p->session_logout) || atomic_read(&sess_p->session_logout) ||
atomic_read(&sess_p->session_close) || atomic_read(&sess_p->session_close) ||
...@@ -552,7 +552,7 @@ int iscsi_login_post_auth_non_zero_tsih( ...@@ -552,7 +552,7 @@ int iscsi_login_post_auth_non_zero_tsih(
{ {
struct iscsit_conn *conn_ptr = NULL; struct iscsit_conn *conn_ptr = NULL;
struct iscsi_conn_recovery *cr = NULL; struct iscsi_conn_recovery *cr = NULL;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
/* /*
* By following item 5 in the login table, if we have found * By following item 5 in the login table, if we have found
...@@ -614,7 +614,7 @@ int iscsi_login_post_auth_non_zero_tsih( ...@@ -614,7 +614,7 @@ int iscsi_login_post_auth_non_zero_tsih(
static void iscsi_post_login_start_timers(struct iscsit_conn *conn) static void iscsi_post_login_start_timers(struct iscsit_conn *conn)
{ {
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
/* /*
* FIXME: Unsolicited NopIN support for ISER * FIXME: Unsolicited NopIN support for ISER
*/ */
...@@ -677,7 +677,7 @@ void iscsi_post_login_handler( ...@@ -677,7 +677,7 @@ void iscsi_post_login_handler(
u8 zero_tsih) u8 zero_tsih)
{ {
int stop_timer = 0; int stop_timer = 0;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
struct se_session *se_sess = sess->se_sess; struct se_session *se_sess = sess->se_sess;
struct iscsi_portal_group *tpg = sess->tpg; struct iscsi_portal_group *tpg = sess->tpg;
struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
......
...@@ -102,7 +102,7 @@ static u32 iscsi_handle_authentication( ...@@ -102,7 +102,7 @@ static u32 iscsi_handle_authentication(
int *out_length, int *out_length,
unsigned char *authtype) unsigned char *authtype)
{ {
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
struct iscsi_node_auth *auth; struct iscsi_node_auth *auth;
struct iscsi_node_acl *iscsi_nacl; struct iscsi_node_acl *iscsi_nacl;
struct iscsi_portal_group *iscsi_tpg; struct iscsi_portal_group *iscsi_tpg;
...@@ -1059,7 +1059,7 @@ int iscsi_target_locate_portal( ...@@ -1059,7 +1059,7 @@ int iscsi_target_locate_portal(
{ {
char *i_buf = NULL, *s_buf = NULL, *t_buf = NULL; char *i_buf = NULL, *s_buf = NULL, *t_buf = NULL;
char *tmpbuf, *start = NULL, *end = NULL, *key, *value; char *tmpbuf, *start = NULL, *end = NULL, *key, *value;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
struct iscsi_tiqn *tiqn; struct iscsi_tiqn *tiqn;
struct iscsi_tpg_np *tpg_np = NULL; struct iscsi_tpg_np *tpg_np = NULL;
struct iscsi_login_req *login_req; struct iscsi_login_req *login_req;
...@@ -1232,7 +1232,7 @@ int iscsi_target_locate_portal( ...@@ -1232,7 +1232,7 @@ int iscsi_target_locate_portal(
/* /*
* conn->sess->node_acl will be set when the referenced * conn->sess->node_acl will be set when the referenced
* struct iscsi_session is located from received ISID+TSIH in * struct iscsit_session is located from received ISID+TSIH in
* iscsi_login_non_zero_tsih_s2(). * iscsi_login_non_zero_tsih_s2().
*/ */
if (!login->leading_connection) { if (!login->leading_connection) {
......
...@@ -96,7 +96,7 @@ int iscsit_na_nopin_timeout( ...@@ -96,7 +96,7 @@ int iscsit_na_nopin_timeout(
u32 nopin_timeout) u32 nopin_timeout)
{ {
struct iscsi_node_attrib *a = &acl->node_attrib; struct iscsi_node_attrib *a = &acl->node_attrib;
struct iscsi_session *sess; struct iscsit_session *sess;
struct iscsit_conn *conn; struct iscsit_conn *conn;
struct se_node_acl *se_nacl = &a->nacl->se_node_acl; struct se_node_acl *se_nacl = &a->nacl->se_node_acl;
struct se_session *se_sess; struct se_session *se_sess;
......
...@@ -493,7 +493,7 @@ int iscsit_build_pdu_and_seq_lists( ...@@ -493,7 +493,7 @@ int iscsit_build_pdu_and_seq_lists(
struct iscsi_pdu *pdu = NULL; struct iscsi_pdu *pdu = NULL;
struct iscsi_seq *seq = NULL; struct iscsi_seq *seq = NULL;
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
struct iscsi_node_attrib *na; struct iscsi_node_attrib *na;
/* /*
......
...@@ -599,7 +599,7 @@ static ssize_t iscsi_stat_sess_node_show(struct config_item *item, char *page) ...@@ -599,7 +599,7 @@ static ssize_t iscsi_stat_sess_node_show(struct config_item *item, char *page)
{ {
struct iscsi_node_acl *acl = iscsi_stat_nacl(item); struct iscsi_node_acl *acl = iscsi_stat_nacl(item);
struct se_node_acl *se_nacl = &acl->se_node_acl; struct se_node_acl *se_nacl = &acl->se_node_acl;
struct iscsi_session *sess; struct iscsit_session *sess;
struct se_session *se_sess; struct se_session *se_sess;
ssize_t ret = 0; ssize_t ret = 0;
...@@ -620,7 +620,7 @@ static ssize_t iscsi_stat_sess_indx_show(struct config_item *item, char *page) ...@@ -620,7 +620,7 @@ static ssize_t iscsi_stat_sess_indx_show(struct config_item *item, char *page)
{ {
struct iscsi_node_acl *acl = iscsi_stat_nacl(item); struct iscsi_node_acl *acl = iscsi_stat_nacl(item);
struct se_node_acl *se_nacl = &acl->se_node_acl; struct se_node_acl *se_nacl = &acl->se_node_acl;
struct iscsi_session *sess; struct iscsit_session *sess;
struct se_session *se_sess; struct se_session *se_sess;
ssize_t ret = 0; ssize_t ret = 0;
...@@ -642,7 +642,7 @@ static ssize_t iscsi_stat_sess_cmd_pdus_show(struct config_item *item, ...@@ -642,7 +642,7 @@ static ssize_t iscsi_stat_sess_cmd_pdus_show(struct config_item *item,
{ {
struct iscsi_node_acl *acl = iscsi_stat_nacl(item); struct iscsi_node_acl *acl = iscsi_stat_nacl(item);
struct se_node_acl *se_nacl = &acl->se_node_acl; struct se_node_acl *se_nacl = &acl->se_node_acl;
struct iscsi_session *sess; struct iscsit_session *sess;
struct se_session *se_sess; struct se_session *se_sess;
ssize_t ret = 0; ssize_t ret = 0;
...@@ -664,7 +664,7 @@ static ssize_t iscsi_stat_sess_rsp_pdus_show(struct config_item *item, ...@@ -664,7 +664,7 @@ static ssize_t iscsi_stat_sess_rsp_pdus_show(struct config_item *item,
{ {
struct iscsi_node_acl *acl = iscsi_stat_nacl(item); struct iscsi_node_acl *acl = iscsi_stat_nacl(item);
struct se_node_acl *se_nacl = &acl->se_node_acl; struct se_node_acl *se_nacl = &acl->se_node_acl;
struct iscsi_session *sess; struct iscsit_session *sess;
struct se_session *se_sess; struct se_session *se_sess;
ssize_t ret = 0; ssize_t ret = 0;
...@@ -686,7 +686,7 @@ static ssize_t iscsi_stat_sess_txdata_octs_show(struct config_item *item, ...@@ -686,7 +686,7 @@ static ssize_t iscsi_stat_sess_txdata_octs_show(struct config_item *item,
{ {
struct iscsi_node_acl *acl = iscsi_stat_nacl(item); struct iscsi_node_acl *acl = iscsi_stat_nacl(item);
struct se_node_acl *se_nacl = &acl->se_node_acl; struct se_node_acl *se_nacl = &acl->se_node_acl;
struct iscsi_session *sess; struct iscsit_session *sess;
struct se_session *se_sess; struct se_session *se_sess;
ssize_t ret = 0; ssize_t ret = 0;
...@@ -708,7 +708,7 @@ static ssize_t iscsi_stat_sess_rxdata_octs_show(struct config_item *item, ...@@ -708,7 +708,7 @@ static ssize_t iscsi_stat_sess_rxdata_octs_show(struct config_item *item,
{ {
struct iscsi_node_acl *acl = iscsi_stat_nacl(item); struct iscsi_node_acl *acl = iscsi_stat_nacl(item);
struct se_node_acl *se_nacl = &acl->se_node_acl; struct se_node_acl *se_nacl = &acl->se_node_acl;
struct iscsi_session *sess; struct iscsit_session *sess;
struct se_session *se_sess; struct se_session *se_sess;
ssize_t ret = 0; ssize_t ret = 0;
...@@ -730,7 +730,7 @@ static ssize_t iscsi_stat_sess_conn_digest_errors_show(struct config_item *item, ...@@ -730,7 +730,7 @@ static ssize_t iscsi_stat_sess_conn_digest_errors_show(struct config_item *item,
{ {
struct iscsi_node_acl *acl = iscsi_stat_nacl(item); struct iscsi_node_acl *acl = iscsi_stat_nacl(item);
struct se_node_acl *se_nacl = &acl->se_node_acl; struct se_node_acl *se_nacl = &acl->se_node_acl;
struct iscsi_session *sess; struct iscsit_session *sess;
struct se_session *se_sess; struct se_session *se_sess;
ssize_t ret = 0; ssize_t ret = 0;
...@@ -752,7 +752,7 @@ static ssize_t iscsi_stat_sess_conn_timeout_errors_show( ...@@ -752,7 +752,7 @@ static ssize_t iscsi_stat_sess_conn_timeout_errors_show(
{ {
struct iscsi_node_acl *acl = iscsi_stat_nacl(item); struct iscsi_node_acl *acl = iscsi_stat_nacl(item);
struct se_node_acl *se_nacl = &acl->se_node_acl; struct se_node_acl *se_nacl = &acl->se_node_acl;
struct iscsi_session *sess; struct iscsit_session *sess;
struct se_session *se_sess; struct se_session *se_sess;
ssize_t ret = 0; ssize_t ret = 0;
......
...@@ -67,7 +67,7 @@ int iscsit_tmr_task_warm_reset( ...@@ -67,7 +67,7 @@ int iscsit_tmr_task_warm_reset(
struct iscsi_tmr_req *tmr_req, struct iscsi_tmr_req *tmr_req,
unsigned char *buf) unsigned char *buf)
{ {
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess); struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess);
if (!na->tmr_warm_reset) { if (!na->tmr_warm_reset) {
...@@ -87,7 +87,7 @@ int iscsit_tmr_task_cold_reset( ...@@ -87,7 +87,7 @@ int iscsit_tmr_task_cold_reset(
struct iscsi_tmr_req *tmr_req, struct iscsi_tmr_req *tmr_req,
unsigned char *buf) unsigned char *buf)
{ {
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess); struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess);
if (!na->tmr_cold_reset) { if (!na->tmr_cold_reset) {
...@@ -177,7 +177,7 @@ u8 iscsit_tmr_task_reassign( ...@@ -177,7 +177,7 @@ u8 iscsit_tmr_task_reassign(
static void iscsit_task_reassign_remove_cmd( static void iscsit_task_reassign_remove_cmd(
struct iscsit_cmd *cmd, struct iscsit_cmd *cmd,
struct iscsi_conn_recovery *cr, struct iscsi_conn_recovery *cr,
struct iscsi_session *sess) struct iscsit_session *sess)
{ {
int ret; int ret;
......
...@@ -390,7 +390,7 @@ int iscsit_tpg_disable_portal_group(struct iscsi_portal_group *tpg, int force) ...@@ -390,7 +390,7 @@ int iscsit_tpg_disable_portal_group(struct iscsi_portal_group *tpg, int force)
} }
struct iscsi_node_attrib *iscsit_tpg_get_node_attrib( struct iscsi_node_attrib *iscsit_tpg_get_node_attrib(
struct iscsi_session *sess) struct iscsit_session *sess)
{ {
struct se_session *se_sess = sess->se_sess; struct se_session *se_sess = sess->se_sess;
struct se_node_acl *se_nacl = se_sess->se_node_acl; struct se_node_acl *se_nacl = se_sess->se_node_acl;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <linux/types.h> #include <linux/types.h>
struct iscsi_np; struct iscsi_np;
struct iscsi_session; struct iscsit_session;
struct iscsi_tiqn; struct iscsi_tiqn;
struct iscsi_tpg_np; struct iscsi_tpg_np;
struct se_node_acl; struct se_node_acl;
...@@ -28,7 +28,7 @@ extern struct iscsi_node_acl *iscsit_tpg_add_initiator_node_acl( ...@@ -28,7 +28,7 @@ extern struct iscsi_node_acl *iscsit_tpg_add_initiator_node_acl(
struct iscsi_portal_group *, const char *, u32); struct iscsi_portal_group *, const char *, u32);
extern void iscsit_tpg_del_initiator_node_acl(struct iscsi_portal_group *, extern void iscsit_tpg_del_initiator_node_acl(struct iscsi_portal_group *,
struct se_node_acl *); struct se_node_acl *);
extern struct iscsi_node_attrib *iscsit_tpg_get_node_attrib(struct iscsi_session *); extern struct iscsi_node_attrib *iscsit_tpg_get_node_attrib(struct iscsit_session *);
extern void iscsit_tpg_del_external_nps(struct iscsi_tpg_np *); extern void iscsit_tpg_del_external_nps(struct iscsi_tpg_np *);
extern struct iscsi_tpg_np *iscsit_tpg_locate_child_np(struct iscsi_tpg_np *, int); extern struct iscsi_tpg_np *iscsit_tpg_locate_child_np(struct iscsi_tpg_np *, int);
extern struct iscsi_tpg_np *iscsit_tpg_add_network_portal(struct iscsi_portal_group *, extern struct iscsi_tpg_np *iscsit_tpg_add_network_portal(struct iscsi_portal_group *,
......
...@@ -238,7 +238,7 @@ struct iscsi_r2t *iscsit_get_holder_for_r2tsn( ...@@ -238,7 +238,7 @@ struct iscsi_r2t *iscsit_get_holder_for_r2tsn(
return NULL; return NULL;
} }
static inline int iscsit_check_received_cmdsn(struct iscsi_session *sess, u32 cmdsn) static inline int iscsit_check_received_cmdsn(struct iscsit_session *sess, u32 cmdsn)
{ {
u32 max_cmdsn; u32 max_cmdsn;
int ret; int ret;
...@@ -446,7 +446,7 @@ struct iscsit_cmd *iscsit_find_cmd_from_ttt( ...@@ -446,7 +446,7 @@ struct iscsit_cmd *iscsit_find_cmd_from_ttt(
} }
int iscsit_find_cmd_for_recovery( int iscsit_find_cmd_for_recovery(
struct iscsi_session *sess, struct iscsit_session *sess,
struct iscsit_cmd **cmd_ptr, struct iscsit_cmd **cmd_ptr,
struct iscsi_conn_recovery **cr_ptr, struct iscsi_conn_recovery **cr_ptr,
itt_t init_task_tag) itt_t init_task_tag)
...@@ -696,7 +696,7 @@ void iscsit_free_queue_reqs_for_conn(struct iscsit_conn *conn) ...@@ -696,7 +696,7 @@ void iscsit_free_queue_reqs_for_conn(struct iscsit_conn *conn)
void iscsit_release_cmd(struct iscsit_cmd *cmd) void iscsit_release_cmd(struct iscsit_cmd *cmd)
{ {
struct iscsi_session *sess; struct iscsit_session *sess;
struct se_cmd *se_cmd = &cmd->se_cmd; struct se_cmd *se_cmd = &cmd->se_cmd;
WARN_ON(!list_empty(&cmd->i_conn_node)); WARN_ON(!list_empty(&cmd->i_conn_node));
...@@ -762,7 +762,7 @@ void iscsit_free_cmd(struct iscsit_cmd *cmd, bool shutdown) ...@@ -762,7 +762,7 @@ void iscsit_free_cmd(struct iscsit_cmd *cmd, bool shutdown)
} }
EXPORT_SYMBOL(iscsit_free_cmd); EXPORT_SYMBOL(iscsit_free_cmd);
bool iscsit_check_session_usage_count(struct iscsi_session *sess, bool iscsit_check_session_usage_count(struct iscsit_session *sess,
bool can_sleep) bool can_sleep)
{ {
spin_lock_bh(&sess->session_usage_lock); spin_lock_bh(&sess->session_usage_lock);
...@@ -780,7 +780,7 @@ bool iscsit_check_session_usage_count(struct iscsi_session *sess, ...@@ -780,7 +780,7 @@ bool iscsit_check_session_usage_count(struct iscsi_session *sess,
return false; return false;
} }
void iscsit_dec_session_usage_count(struct iscsi_session *sess) void iscsit_dec_session_usage_count(struct iscsit_session *sess)
{ {
spin_lock_bh(&sess->session_usage_lock); spin_lock_bh(&sess->session_usage_lock);
sess->session_usage_count--; sess->session_usage_count--;
...@@ -791,14 +791,14 @@ void iscsit_dec_session_usage_count(struct iscsi_session *sess) ...@@ -791,14 +791,14 @@ void iscsit_dec_session_usage_count(struct iscsi_session *sess)
spin_unlock_bh(&sess->session_usage_lock); spin_unlock_bh(&sess->session_usage_lock);
} }
void iscsit_inc_session_usage_count(struct iscsi_session *sess) void iscsit_inc_session_usage_count(struct iscsit_session *sess)
{ {
spin_lock_bh(&sess->session_usage_lock); spin_lock_bh(&sess->session_usage_lock);
sess->session_usage_count++; sess->session_usage_count++;
spin_unlock_bh(&sess->session_usage_lock); spin_unlock_bh(&sess->session_usage_lock);
} }
struct iscsit_conn *iscsit_get_conn_from_cid(struct iscsi_session *sess, u16 cid) struct iscsit_conn *iscsit_get_conn_from_cid(struct iscsit_session *sess, u16 cid)
{ {
struct iscsit_conn *conn; struct iscsit_conn *conn;
...@@ -816,7 +816,7 @@ struct iscsit_conn *iscsit_get_conn_from_cid(struct iscsi_session *sess, u16 cid ...@@ -816,7 +816,7 @@ struct iscsit_conn *iscsit_get_conn_from_cid(struct iscsi_session *sess, u16 cid
return NULL; return NULL;
} }
struct iscsit_conn *iscsit_get_conn_from_cid_rcfr(struct iscsi_session *sess, u16 cid) struct iscsit_conn *iscsit_get_conn_from_cid_rcfr(struct iscsit_session *sess, u16 cid)
{ {
struct iscsit_conn *conn; struct iscsit_conn *conn;
...@@ -896,7 +896,7 @@ static int iscsit_add_nopin(struct iscsit_conn *conn, int want_response) ...@@ -896,7 +896,7 @@ static int iscsit_add_nopin(struct iscsit_conn *conn, int want_response)
void iscsit_handle_nopin_response_timeout(struct timer_list *t) void iscsit_handle_nopin_response_timeout(struct timer_list *t)
{ {
struct iscsit_conn *conn = from_timer(conn, t, nopin_response_timer); struct iscsit_conn *conn = from_timer(conn, t, nopin_response_timer);
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
iscsit_inc_conn_usage_count(conn); iscsit_inc_conn_usage_count(conn);
...@@ -921,7 +921,7 @@ void iscsit_handle_nopin_response_timeout(struct timer_list *t) ...@@ -921,7 +921,7 @@ void iscsit_handle_nopin_response_timeout(struct timer_list *t)
void iscsit_mod_nopin_response_timer(struct iscsit_conn *conn) void iscsit_mod_nopin_response_timer(struct iscsit_conn *conn)
{ {
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess); struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess);
spin_lock_bh(&conn->nopin_timer_lock); spin_lock_bh(&conn->nopin_timer_lock);
...@@ -937,7 +937,7 @@ void iscsit_mod_nopin_response_timer(struct iscsit_conn *conn) ...@@ -937,7 +937,7 @@ void iscsit_mod_nopin_response_timer(struct iscsit_conn *conn)
void iscsit_start_nopin_response_timer(struct iscsit_conn *conn) void iscsit_start_nopin_response_timer(struct iscsit_conn *conn)
{ {
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess); struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess);
spin_lock_bh(&conn->nopin_timer_lock); spin_lock_bh(&conn->nopin_timer_lock);
...@@ -994,7 +994,7 @@ void iscsit_handle_nopin_timeout(struct timer_list *t) ...@@ -994,7 +994,7 @@ void iscsit_handle_nopin_timeout(struct timer_list *t)
void __iscsit_start_nopin_timer(struct iscsit_conn *conn) void __iscsit_start_nopin_timer(struct iscsit_conn *conn)
{ {
struct iscsi_session *sess = conn->sess; struct iscsit_session *sess = conn->sess;
struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess); struct iscsi_node_attrib *na = iscsit_tpg_get_node_attrib(sess);
lockdep_assert_held(&conn->nopin_timer_lock); lockdep_assert_held(&conn->nopin_timer_lock);
...@@ -1198,7 +1198,7 @@ int iscsit_tx_login_rsp(struct iscsit_conn *conn, u8 status_class, u8 status_det ...@@ -1198,7 +1198,7 @@ int iscsit_tx_login_rsp(struct iscsit_conn *conn, u8 status_class, u8 status_det
return conn->conn_transport->iscsit_put_login_tx(conn, login, 0); return conn->conn_transport->iscsit_put_login_tx(conn, login, 0);
} }
void iscsit_print_session_params(struct iscsi_session *sess) void iscsit_print_session_params(struct iscsit_session *sess)
{ {
struct iscsit_conn *conn; struct iscsit_conn *conn;
...@@ -1351,7 +1351,7 @@ struct iscsi_tiqn *iscsit_snmp_get_tiqn(struct iscsit_conn *conn) ...@@ -1351,7 +1351,7 @@ struct iscsi_tiqn *iscsit_snmp_get_tiqn(struct iscsit_conn *conn)
return tpg->tpg_tiqn; return tpg->tpg_tiqn;
} }
void iscsit_fill_cxn_timeout_err_stats(struct iscsi_session *sess) void iscsit_fill_cxn_timeout_err_stats(struct iscsit_session *sess)
{ {
struct iscsi_portal_group *tpg = sess->tpg; struct iscsi_portal_group *tpg = sess->tpg;
struct iscsi_tiqn *tiqn = tpg->tpg_tiqn; struct iscsi_tiqn *tiqn = tpg->tpg_tiqn;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
struct iscsit_cmd; struct iscsit_cmd;
struct iscsit_conn; struct iscsit_conn;
struct iscsi_conn_recovery; struct iscsi_conn_recovery;
struct iscsi_session; struct iscsit_session;
extern int iscsit_add_r2t_to_list(struct iscsit_cmd *, u32, u32, int, u32); extern int iscsit_add_r2t_to_list(struct iscsit_cmd *, u32, u32, int, u32);
extern struct iscsi_r2t *iscsit_get_r2t_for_eos(struct iscsit_cmd *, u32, u32); extern struct iscsi_r2t *iscsit_get_r2t_for_eos(struct iscsit_cmd *, u32, u32);
...@@ -28,7 +28,7 @@ extern int iscsit_check_unsolicited_dataout(struct iscsit_cmd *, unsigned char * ...@@ -28,7 +28,7 @@ extern int iscsit_check_unsolicited_dataout(struct iscsit_cmd *, unsigned char *
extern struct iscsit_cmd *iscsit_find_cmd_from_itt_or_dump(struct iscsit_conn *, extern struct iscsit_cmd *iscsit_find_cmd_from_itt_or_dump(struct iscsit_conn *,
itt_t, u32); itt_t, u32);
extern struct iscsit_cmd *iscsit_find_cmd_from_ttt(struct iscsit_conn *, u32); extern struct iscsit_cmd *iscsit_find_cmd_from_ttt(struct iscsit_conn *, u32);
extern int iscsit_find_cmd_for_recovery(struct iscsi_session *, struct iscsit_cmd **, extern int iscsit_find_cmd_for_recovery(struct iscsit_session *, struct iscsit_cmd **,
struct iscsi_conn_recovery **, itt_t); struct iscsi_conn_recovery **, itt_t);
extern void iscsit_add_cmd_to_immediate_queue(struct iscsit_cmd *, struct iscsit_conn *, u8); extern void iscsit_add_cmd_to_immediate_queue(struct iscsit_cmd *, struct iscsit_conn *, u8);
extern struct iscsi_queue_req *iscsit_get_cmd_from_immediate_queue(struct iscsit_conn *); extern struct iscsi_queue_req *iscsit_get_cmd_from_immediate_queue(struct iscsit_conn *);
...@@ -40,11 +40,11 @@ extern void iscsit_free_queue_reqs_for_conn(struct iscsit_conn *); ...@@ -40,11 +40,11 @@ extern void iscsit_free_queue_reqs_for_conn(struct iscsit_conn *);
extern void iscsit_release_cmd(struct iscsit_cmd *); extern void iscsit_release_cmd(struct iscsit_cmd *);
extern void __iscsit_free_cmd(struct iscsit_cmd *, bool); extern void __iscsit_free_cmd(struct iscsit_cmd *, bool);
extern void iscsit_free_cmd(struct iscsit_cmd *, bool); extern void iscsit_free_cmd(struct iscsit_cmd *, bool);
extern bool iscsit_check_session_usage_count(struct iscsi_session *sess, bool can_sleep); extern bool iscsit_check_session_usage_count(struct iscsit_session *sess, bool can_sleep);
extern void iscsit_dec_session_usage_count(struct iscsi_session *); extern void iscsit_dec_session_usage_count(struct iscsit_session *);
extern void iscsit_inc_session_usage_count(struct iscsi_session *); extern void iscsit_inc_session_usage_count(struct iscsit_session *);
extern struct iscsit_conn *iscsit_get_conn_from_cid(struct iscsi_session *, u16); extern struct iscsit_conn *iscsit_get_conn_from_cid(struct iscsit_session *, u16);
extern struct iscsit_conn *iscsit_get_conn_from_cid_rcfr(struct iscsi_session *, u16); extern struct iscsit_conn *iscsit_get_conn_from_cid_rcfr(struct iscsit_session *, u16);
extern void iscsit_check_conn_usage_count(struct iscsit_conn *); extern void iscsit_check_conn_usage_count(struct iscsit_conn *);
extern void iscsit_dec_conn_usage_count(struct iscsit_conn *); extern void iscsit_dec_conn_usage_count(struct iscsit_conn *);
extern void iscsit_inc_conn_usage_count(struct iscsit_conn *); extern void iscsit_inc_conn_usage_count(struct iscsit_conn *);
...@@ -59,7 +59,7 @@ extern void iscsit_stop_nopin_timer(struct iscsit_conn *); ...@@ -59,7 +59,7 @@ extern void iscsit_stop_nopin_timer(struct iscsit_conn *);
extern int iscsit_send_tx_data(struct iscsit_cmd *, struct iscsit_conn *, int); extern int iscsit_send_tx_data(struct iscsit_cmd *, struct iscsit_conn *, int);
extern int iscsit_fe_sendpage_sg(struct iscsit_cmd *, struct iscsit_conn *); extern int iscsit_fe_sendpage_sg(struct iscsit_cmd *, struct iscsit_conn *);
extern int iscsit_tx_login_rsp(struct iscsit_conn *, u8, u8); extern int iscsit_tx_login_rsp(struct iscsit_conn *, u8, u8);
extern void iscsit_print_session_params(struct iscsi_session *); extern void iscsit_print_session_params(struct iscsit_session *);
extern int iscsit_print_dev_to_proc(char *, char **, off_t, int); extern int iscsit_print_dev_to_proc(char *, char **, off_t, int);
extern int iscsit_print_sessions_to_proc(char *, char **, off_t, int); extern int iscsit_print_sessions_to_proc(char *, char **, off_t, int);
extern int iscsit_print_tpg_to_proc(char *, char **, off_t, int); extern int iscsit_print_tpg_to_proc(char *, char **, off_t, int);
...@@ -67,6 +67,6 @@ extern int rx_data(struct iscsit_conn *, struct kvec *, int, int); ...@@ -67,6 +67,6 @@ extern int rx_data(struct iscsit_conn *, struct kvec *, int, int);
extern int tx_data(struct iscsit_conn *, struct kvec *, int, int); extern int tx_data(struct iscsit_conn *, struct kvec *, int, int);
extern void iscsit_collect_login_stats(struct iscsit_conn *, u8, u8); extern void iscsit_collect_login_stats(struct iscsit_conn *, u8, u8);
extern struct iscsi_tiqn *iscsit_snmp_get_tiqn(struct iscsit_conn *); extern struct iscsi_tiqn *iscsit_snmp_get_tiqn(struct iscsit_conn *);
extern void iscsit_fill_cxn_timeout_err_stats(struct iscsi_session *); extern void iscsit_fill_cxn_timeout_err_stats(struct iscsit_session *);
#endif /*** ISCSI_TARGET_UTIL_H ***/ #endif /*** ISCSI_TARGET_UTIL_H ***/
...@@ -482,7 +482,7 @@ struct iscsit_cmd { ...@@ -482,7 +482,7 @@ struct iscsit_cmd {
/* Pointer to connection recovery entry */ /* Pointer to connection recovery entry */
struct iscsi_conn_recovery *cr; struct iscsi_conn_recovery *cr;
/* Session the command is part of, used for connection recovery */ /* Session the command is part of, used for connection recovery */
struct iscsi_session *sess; struct iscsit_session *sess;
/* list_head for connection list */ /* list_head for connection list */
struct list_head i_conn_node; struct list_head i_conn_node;
/* The TCM I/O descriptor that is accessed via container_of() */ /* The TCM I/O descriptor that is accessed via container_of() */
...@@ -598,7 +598,7 @@ struct iscsit_conn { ...@@ -598,7 +598,7 @@ struct iscsit_conn {
struct iscsi_portal_group *tpg; struct iscsi_portal_group *tpg;
struct iscsi_tpg_np *tpg_np; struct iscsi_tpg_np *tpg_np;
/* Pointer to parent session */ /* Pointer to parent session */
struct iscsi_session *sess; struct iscsit_session *sess;
int bitmap_id; int bitmap_id;
int rx_thread_active; int rx_thread_active;
struct task_struct *rx_thread; struct task_struct *rx_thread;
...@@ -618,11 +618,11 @@ struct iscsi_conn_recovery { ...@@ -618,11 +618,11 @@ struct iscsi_conn_recovery {
struct list_head conn_recovery_cmd_list; struct list_head conn_recovery_cmd_list;
spinlock_t conn_recovery_cmd_lock; spinlock_t conn_recovery_cmd_lock;
struct timer_list time2retain_timer; struct timer_list time2retain_timer;
struct iscsi_session *sess; struct iscsit_session *sess;
struct list_head cr_list; struct list_head cr_list;
} ____cacheline_aligned; } ____cacheline_aligned;
struct iscsi_session { struct iscsit_session {
u8 initiator_vendor; u8 initiator_vendor;
u8 isid[6]; u8 isid[6];
enum iscsi_timer_flags_table time2retain_timer_flags; enum iscsi_timer_flags_table time2retain_timer_flags;
...@@ -885,7 +885,7 @@ struct iscsit_global { ...@@ -885,7 +885,7 @@ struct iscsit_global {
struct iscsi_portal_group *discovery_tpg; struct iscsi_portal_group *discovery_tpg;
}; };
static inline u32 session_get_next_ttt(struct iscsi_session *session) static inline u32 session_get_next_ttt(struct iscsit_session *session)
{ {
u32 ttt; u32 ttt;
......
...@@ -105,7 +105,7 @@ extern int iscsit_response_queue(struct iscsit_conn *, struct iscsit_cmd *, int) ...@@ -105,7 +105,7 @@ extern int iscsit_response_queue(struct iscsit_conn *, struct iscsit_cmd *, int)
/* /*
* From iscsi_target_device.c * From iscsi_target_device.c
*/ */
extern void iscsit_increment_maxcmdsn(struct iscsit_cmd *, struct iscsi_session *); extern void iscsit_increment_maxcmdsn(struct iscsit_cmd *, struct iscsit_session *);
/* /*
* From iscsi_target_erl0.c * From iscsi_target_erl0.c
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment