isert-scst: Rename struct isert_connection into struct isert_conn

Minimize the diffs with upstream.

Signed-off-by: Chesnokov Gleb <Chesnokov.G@raidix.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9477 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2021-07-12 02:20:32 +00:00
parent 1a329a7a8c
commit 5af1ed474b
7 changed files with 112 additions and 112 deletions

View File

@@ -88,13 +88,13 @@ enum isert_wr_op {
};
struct isert_device;
struct isert_connection;
struct isert_conn;
struct isert_wr {
enum isert_wr_op wr_op;
struct isert_buf *buf;
struct isert_connection *conn;
struct isert_conn *conn;
struct isert_cmnd *pdu;
struct isert_device *isert_dev;
@@ -168,7 +168,7 @@ struct isert_cq {
#define ISERT_CONNECTION_CLOSE 5
#define ISERT_IN_PORTAL_LIST 6
struct isert_connection {
struct isert_conn {
struct iscsi_conn iscsi ____cacheline_aligned;
int repost_threshold ____cacheline_aligned;
@@ -295,24 +295,24 @@ void isert_portal_list_release_all(void);
struct isert_portal *isert_portal_start(struct sockaddr *sa, size_t addr_len);
/* iser connection */
int isert_post_recv(struct isert_connection *isert_conn,
int isert_post_recv(struct isert_conn *isert_conn,
struct isert_wr *first_wr, int num_wr);
int isert_post_send(struct isert_connection *isert_conn,
int isert_post_send(struct isert_conn *isert_conn,
struct isert_wr *first_wr, int num_wr);
int isert_alloc_conn_resources(struct isert_connection *isert_conn);
void isert_free_conn_resources(struct isert_connection *isert_conn);
void isert_conn_free(struct isert_connection *isert_conn);
void isert_conn_disconnect(struct isert_connection *isert_conn);
void isert_post_drain(struct isert_connection *isert_conn);
void isert_sched_conn_free(struct isert_connection *isert_conn);
int isert_alloc_conn_resources(struct isert_conn *isert_conn);
void isert_free_conn_resources(struct isert_conn *isert_conn);
void isert_conn_free(struct isert_conn *isert_conn);
void isert_conn_disconnect(struct isert_conn *isert_conn);
void isert_post_drain(struct isert_conn *isert_conn);
void isert_sched_conn_free(struct isert_conn *isert_conn);
static inline struct isert_connection *isert_conn_zalloc(void)
static inline struct isert_conn *isert_conn_zalloc(void)
{
return kmem_cache_zalloc(isert_conn_cache, GFP_KERNEL);
}
static inline void isert_conn_kfree(struct isert_connection *isert_conn)
static inline void isert_conn_kfree(struct isert_conn *isert_conn)
{
kmem_cache_free(isert_conn_cache, isert_conn);
}
@@ -322,12 +322,12 @@ int isert_buf_alloc_data_buf(struct ib_device *ib_dev,
struct isert_buf *isert_buf, size_t size,
enum dma_data_direction dma_dir);
void isert_wr_set_fields(struct isert_wr *wr,
struct isert_connection *isert_conn,
struct isert_conn *isert_conn,
struct isert_cmnd *pdu);
int isert_wr_init(struct isert_wr *wr,
enum isert_wr_op wr_op,
struct isert_buf *isert_buf,
struct isert_connection *isert_conn,
struct isert_conn *isert_conn,
struct isert_cmnd *pdu,
struct ib_sge *sge,
int sg_offset,
@@ -357,23 +357,23 @@ static inline void isert_pdu_kfree(struct isert_cmnd *cmnd)
kmem_cache_free(isert_cmnd_cache, cmnd);
}
struct isert_cmnd *isert_rx_pdu_alloc(struct isert_connection *isert_conn,
struct isert_cmnd *isert_rx_pdu_alloc(struct isert_conn *isert_conn,
size_t size);
struct isert_cmnd *isert_tx_pdu_alloc(struct isert_connection *isert_conn,
struct isert_cmnd *isert_tx_pdu_alloc(struct isert_conn *isert_conn,
size_t size);
void isert_tx_pdu_init(struct isert_cmnd *isert_pdu,
struct isert_connection *isert_conn);
int isert_pdu_send(struct isert_connection *isert_conn,
struct isert_conn *isert_conn);
int isert_pdu_send(struct isert_conn *isert_conn,
struct isert_cmnd *tx_pdu);
int isert_prepare_rdma(struct isert_cmnd *isert_pdu,
struct isert_connection *isert_conn,
struct isert_conn *isert_conn,
enum isert_wr_op op);
int isert_pdu_post_rdma_write(struct isert_connection *isert_conn,
int isert_pdu_post_rdma_write(struct isert_conn *isert_conn,
struct isert_cmnd *isert_cmd,
struct isert_cmnd *isert_rsp,
int wr_cnt);
int isert_pdu_post_rdma_read(struct isert_connection *isert_conn,
int isert_pdu_post_rdma_read(struct isert_conn *isert_conn,
struct isert_cmnd *isert_cmd,
int wr_cnt);

View File

@@ -197,7 +197,7 @@ void isert_buf_release(struct isert_buf *isert_buf)
}
void isert_wr_set_fields(struct isert_wr *wr,
struct isert_connection *isert_conn,
struct isert_conn *isert_conn,
struct isert_cmnd *pdu)
{
struct isert_device *isert_dev = isert_conn->isert_dev;
@@ -210,7 +210,7 @@ void isert_wr_set_fields(struct isert_wr *wr,
int isert_wr_init(struct isert_wr *wr,
enum isert_wr_op wr_op,
struct isert_buf *isert_buf,
struct isert_connection *isert_conn,
struct isert_conn *isert_conn,
struct isert_cmnd *pdu,
struct ib_sge *sge,
int sg_offset,

View File

@@ -63,8 +63,8 @@ int isert_get_peer_addr(struct iscsi_conn *iscsi_conn, struct sockaddr *sa,
size_t *addr_len)
{
int ret;
struct isert_connection *isert_conn = container_of(iscsi_conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_conn,
struct isert_conn, iscsi);
struct sockaddr *peer_sa = (struct sockaddr *)&isert_conn->peer_addr;
ret = isert_get_addr_size(peer_sa, addr_len);
@@ -80,8 +80,8 @@ int isert_get_target_addr(struct iscsi_conn *iscsi_conn, struct sockaddr *sa,
size_t *addr_len)
{
int ret;
struct isert_connection *isert_conn = container_of(iscsi_conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_conn,
struct isert_conn, iscsi);
struct sockaddr *self_sa = (struct sockaddr *)&isert_conn->self_addr;
ret = isert_get_addr_size(self_sa, addr_len);
@@ -106,8 +106,8 @@ int isert_portal_remove(struct isert_portal *portal)
void isert_free_connection(struct iscsi_conn *iscsi_conn)
{
struct isert_connection *isert_conn = container_of(iscsi_conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_conn,
struct isert_conn, iscsi);
isert_post_drain(isert_conn);
isert_conn_free(isert_conn);
@@ -115,8 +115,8 @@ void isert_free_connection(struct iscsi_conn *iscsi_conn)
struct iscsi_cmnd *isert_alloc_login_rsp_pdu(struct iscsi_conn *iscsi_conn)
{
struct isert_connection *isert_conn = container_of(iscsi_conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_conn,
struct isert_conn, iscsi);
struct isert_cmnd *isert_pdu = isert_conn->login_rsp_pdu;
isert_tx_pdu_init(isert_pdu, isert_conn);
@@ -126,8 +126,8 @@ struct iscsi_cmnd *isert_alloc_login_rsp_pdu(struct iscsi_conn *iscsi_conn)
static struct iscsi_cmnd *isert_alloc_scsi_pdu(struct iscsi_conn *iscsi_conn,
int fake)
{
struct isert_connection *isert_conn = container_of(iscsi_conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_conn,
struct isert_conn, iscsi);
struct isert_cmnd *isert_pdu;
again:
@@ -159,8 +159,8 @@ void isert_release_tx_pdu(struct iscsi_cmnd *iscsi_pdu)
{
struct isert_cmnd *isert_pdu = container_of(iscsi_pdu,
struct isert_cmnd, iscsi);
struct isert_connection *isert_conn = container_of(iscsi_pdu->conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_pdu->conn,
struct isert_conn, iscsi);
isert_tx_pdu_init_iscsi(isert_pdu);
@@ -180,8 +180,8 @@ void isert_release_rx_pdu(struct iscsi_cmnd *iscsi_pdu)
/* if last transition into FF (Fully Featured) state */
int isert_login_rsp_tx(struct iscsi_cmnd *login_rsp, int last, int discovery)
{
struct isert_connection *isert_conn = container_of(login_rsp->conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(login_rsp->conn,
struct isert_conn, iscsi);
int err;
if (last && !discovery) {
@@ -210,8 +210,8 @@ int isert_set_session_params(struct iscsi_conn *iscsi_conn,
struct iscsi_sess_params *sess_params,
struct iscsi_tgt_params *tgt_params)
{
struct isert_connection *isert_conn = container_of(iscsi_conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_conn,
struct isert_conn, iscsi);
isert_conn->queue_depth = tgt_params->queued_cmnds;
@@ -228,8 +228,8 @@ int isert_pdu_tx(struct iscsi_cmnd *iscsi_cmnd)
{
struct isert_cmnd *isert_cmnd = container_of(iscsi_cmnd,
struct isert_cmnd, iscsi);
struct isert_connection *isert_conn = container_of(iscsi_cmnd->conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_cmnd->conn,
struct isert_conn, iscsi);
int err;
isert_tx_pdu_convert_from_iscsi(isert_cmnd, iscsi_cmnd);
@@ -242,8 +242,8 @@ int isert_request_data_out(struct iscsi_cmnd *iscsi_cmnd)
{
struct isert_cmnd *isert_cmnd = container_of(iscsi_cmnd,
struct isert_cmnd, iscsi);
struct isert_connection *isert_conn = container_of(iscsi_cmnd->conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_cmnd->conn,
struct isert_conn, iscsi);
int ret;
ret = isert_prepare_rdma(isert_cmnd, isert_conn, ISER_WR_RDMA_READ);
@@ -260,8 +260,8 @@ int isert_send_data_in(struct iscsi_cmnd *iscsi_cmnd,
{
struct isert_cmnd *isert_cmnd = container_of(iscsi_cmnd,
struct isert_cmnd, iscsi);
struct isert_connection *isert_conn = container_of(iscsi_cmnd->conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_cmnd->conn,
struct isert_conn, iscsi);
struct isert_cmnd *isert_rsp = container_of(iscsi_rsp,
struct isert_cmnd, iscsi);
int ret;
@@ -278,8 +278,8 @@ int isert_send_data_in(struct iscsi_cmnd *iscsi_cmnd,
int isert_close_connection(struct iscsi_conn *iscsi_conn)
{
struct isert_connection *isert_conn = container_of(iscsi_conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_conn,
struct isert_conn, iscsi);
isert_conn_disconnect(isert_conn);
@@ -293,16 +293,16 @@ int isert_task_abort(struct iscsi_cmnd *cmnd)
void *isert_get_priv(struct iscsi_conn *iscsi_conn)
{
struct isert_connection *isert_conn = container_of(iscsi_conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_conn,
struct isert_conn, iscsi);
return isert_conn->priv_data;
}
void isert_set_priv(struct iscsi_conn *iscsi_conn, void *priv)
{
struct isert_connection *isert_conn = container_of(iscsi_conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(iscsi_conn,
struct isert_conn, iscsi);
isert_conn->priv_data = priv;
}

View File

@@ -152,7 +152,7 @@ int isert_global_init(void)
return -ENOMEM;
}
isert_conn_cache = KMEM_CACHE(isert_connection,
isert_conn_cache = KMEM_CACHE(isert_conn,
SCST_SLAB_FLAGS|SLAB_HWCACHE_ALIGN);
if (!isert_conn_cache) {
destroy_workqueue(isert_glob.conn_wq);

View File

@@ -43,7 +43,7 @@
#include "iser_datamover.h"
static inline int isert_pdu_rx_buf_init(struct isert_cmnd *isert_pdu,
struct isert_connection *isert_conn)
struct isert_conn *isert_conn)
{
struct isert_buf *isert_buf = &isert_pdu->buf;
@@ -53,7 +53,7 @@ static inline int isert_pdu_rx_buf_init(struct isert_cmnd *isert_pdu,
}
static inline int isert_pdu_tx_buf_init(struct isert_cmnd *isert_pdu,
struct isert_connection *isert_conn)
struct isert_conn *isert_conn)
{
struct isert_buf *isert_buf = &isert_pdu->buf;
@@ -78,7 +78,7 @@ static inline void isert_pdu_set_hdr_plain(struct isert_cmnd *isert_pdu)
* it should be parsed to setup isert_cmnd + iscsi_cmnd in full
*/
static int isert_rx_pdu_init(struct isert_cmnd *isert_pdu,
struct isert_connection *isert_conn)
struct isert_conn *isert_conn)
{
struct iscsi_cmnd *iscsi_cmnd = &isert_pdu->iscsi;
int err = isert_pdu_rx_buf_init(isert_pdu, isert_conn);
@@ -105,7 +105,7 @@ void isert_tx_pdu_init_iscsi(struct isert_cmnd *isert_pdu)
* of the iscsi pdu struct
*/
void isert_tx_pdu_init(struct isert_cmnd *isert_pdu,
struct isert_connection *isert_conn)
struct isert_conn *isert_conn)
{
struct iscsi_cmnd *iscsi_cmnd = &isert_pdu->iscsi;
struct isert_buf *isert_buf = &isert_pdu->buf;
@@ -142,7 +142,7 @@ void isert_tx_pdu_convert_from_iscsi(struct isert_cmnd *isert_cmnd,
return;
}
static inline int isert_pdu_prepare_send(struct isert_connection *isert_conn,
static inline int isert_pdu_prepare_send(struct isert_conn *isert_conn,
struct isert_cmnd *tx_pdu)
{
struct isert_device *isert_dev = isert_conn->isert_dev;
@@ -168,7 +168,7 @@ static inline int isert_pdu_prepare_send(struct isert_connection *isert_conn,
}
static int isert_alloc_for_rdma(struct isert_cmnd *pdu, int sge_cnt,
struct isert_connection *isert_conn)
struct isert_conn *isert_conn)
{
struct isert_wr *wr;
struct ib_sge *sg_pool;
@@ -234,7 +234,7 @@ static inline void isert_link_send_pdu_wrs(struct isert_cmnd *from_pdu,
}
int isert_prepare_rdma(struct isert_cmnd *isert_pdu,
struct isert_connection *isert_conn,
struct isert_conn *isert_conn,
enum isert_wr_op op)
{
struct isert_buf *isert_buf = &isert_pdu->rdma_buf;
@@ -323,7 +323,7 @@ void isert_pdu_free(struct isert_cmnd *pdu)
isert_pdu_kfree(pdu);
}
struct isert_cmnd *isert_rx_pdu_alloc(struct isert_connection *isert_conn,
struct isert_cmnd *isert_rx_pdu_alloc(struct isert_conn *isert_conn,
size_t size)
{
struct isert_cmnd *pdu = NULL;
@@ -371,7 +371,7 @@ out:
return pdu;
}
struct isert_cmnd *isert_tx_pdu_alloc(struct isert_connection *isert_conn,
struct isert_cmnd *isert_tx_pdu_alloc(struct isert_conn *isert_conn,
size_t size)
{
struct isert_cmnd *pdu = NULL;
@@ -437,7 +437,7 @@ static inline void isert_link_recv_pdu_wrs(struct isert_cmnd *from_pdu,
isert_link_recv_wrs(&from_pdu->wr[0], &to_pdu->wr[0]);
}
int isert_alloc_conn_resources(struct isert_connection *isert_conn)
int isert_alloc_conn_resources(struct isert_conn *isert_conn)
{
struct isert_cmnd *pdu, *prev_pdu = NULL, *first_pdu = NULL;
/* RFC states that minimum receive data size is 512 */
@@ -496,8 +496,8 @@ clean_pdus:
static int isert_reinit_rx_pdu(struct isert_cmnd *pdu)
{
struct isert_connection *isert_conn = container_of(pdu->iscsi.conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(pdu->iscsi.conn,
struct isert_conn, iscsi);
pdu->is_rstag_valid = 0;
pdu->is_wstag_valid = 0;
@@ -510,8 +510,8 @@ static int isert_reinit_rx_pdu(struct isert_cmnd *pdu)
int isert_rx_pdu_done(struct isert_cmnd *pdu)
{
int err;
struct isert_connection *isert_conn = container_of(pdu->iscsi.conn,
struct isert_connection, iscsi);
struct isert_conn *isert_conn = container_of(pdu->iscsi.conn,
struct isert_conn, iscsi);
TRACE_ENTRY();
@@ -539,7 +539,7 @@ out:
return err;
}
void isert_free_conn_resources(struct isert_connection *isert_conn)
void isert_free_conn_resources(struct isert_conn *isert_conn)
{
struct isert_cmnd *pdu;
@@ -577,7 +577,7 @@ void isert_free_conn_resources(struct isert_connection *isert_conn)
TRACE_EXIT();
}
int isert_pdu_send(struct isert_connection *isert_conn,
int isert_pdu_send(struct isert_conn *isert_conn,
struct isert_cmnd *tx_pdu)
{
int err;
@@ -607,7 +607,7 @@ int isert_pdu_send(struct isert_connection *isert_conn,
return err;
}
int isert_pdu_post_rdma_write(struct isert_connection *isert_conn,
int isert_pdu_post_rdma_write(struct isert_conn *isert_conn,
struct isert_cmnd *isert_cmd,
struct isert_cmnd *isert_rsp,
int wr_cnt)
@@ -634,7 +634,7 @@ int isert_pdu_post_rdma_write(struct isert_connection *isert_conn,
return err;
}
int isert_pdu_post_rdma_read(struct isert_connection *isert_conn,
int isert_pdu_post_rdma_read(struct isert_conn *isert_conn,
struct isert_cmnd *isert_cmd, int wr_cnt)
{
int err;

View File

@@ -67,7 +67,7 @@ static int isert_num_recv_posted_on_err(struct ib_recv_wr *first_ib_wr,
return num_posted;
}
int isert_post_recv(struct isert_connection *isert_conn,
int isert_post_recv(struct isert_conn *isert_conn,
struct isert_wr *first_wr,
int num_wr)
{
@@ -110,7 +110,7 @@ static int isert_num_send_posted_on_err(struct ib_send_wr *first_ib_wr,
return num_posted;
}
int isert_post_send(struct isert_connection *isert_conn,
int isert_post_send(struct isert_conn *isert_conn,
struct isert_wr *first_wr,
int num_wr)
{
@@ -145,7 +145,7 @@ int isert_post_send(struct isert_connection *isert_conn,
return err;
}
static void isert_post_drain_sq(struct isert_connection *isert_conn)
static void isert_post_drain_sq(struct isert_conn *isert_conn)
{
BAD_WR_MODIFIER struct ib_send_wr *bad_wr;
struct isert_wr *drain_wr_sq = &isert_conn->drain_wr_sq;
@@ -177,7 +177,7 @@ static void isert_post_drain_sq(struct isert_connection *isert_conn)
}
}
static void isert_post_drain_rq(struct isert_connection *isert_conn)
static void isert_post_drain_rq(struct isert_conn *isert_conn)
{
BAD_WR_MODIFIER struct ib_recv_wr *bad_wr;
struct isert_wr *drain_wr_rq = &isert_conn->drain_wr_rq;
@@ -197,7 +197,7 @@ static void isert_post_drain_rq(struct isert_connection *isert_conn)
}
}
void isert_post_drain(struct isert_connection *isert_conn)
void isert_post_drain(struct isert_conn *isert_conn)
{
if (!test_and_set_bit(ISERT_DRAIN_POSTED, &isert_conn->flags)) {
mutex_lock(&isert_conn->state_mutex);
@@ -208,7 +208,7 @@ void isert_post_drain(struct isert_connection *isert_conn)
}
}
void isert_conn_disconnect(struct isert_connection *isert_conn)
void isert_conn_disconnect(struct isert_conn *isert_conn)
{
int err;
@@ -468,7 +468,7 @@ static void isert_rdma_wr_completion_handler(struct isert_wr *wr)
static void isert_handle_wc(struct ib_wc *wc)
{
struct isert_wr *wr = _u64_to_ptr(wc->wr_id);
struct isert_connection *isert_conn;
struct isert_conn *isert_conn;
TRACE_ENTRY();
@@ -585,17 +585,17 @@ static void isert_discon_do_work(struct work_struct *work)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
struct isert_connection *isert_conn = ctx;
struct isert_conn *isert_conn = ctx;
#else
struct isert_connection *isert_conn =
container_of(work, struct isert_connection, discon_work);
struct isert_conn *isert_conn =
container_of(work, struct isert_conn, discon_work);
#endif
/* notify upper layer */
isert_connection_closed(&isert_conn->iscsi);
}
static void isert_sched_discon(struct isert_connection *isert_conn)
static void isert_sched_discon(struct isert_conn *isert_conn)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
INIT_WORK(&isert_conn->discon_work, isert_discon_do_work, isert_conn);
@@ -612,16 +612,16 @@ static void isert_conn_drained_do_work(struct work_struct *work)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
struct isert_connection *isert_conn = ctx;
struct isert_conn *isert_conn = ctx;
#else
struct isert_connection *isert_conn =
container_of(work, struct isert_connection, drain_work);
struct isert_conn *isert_conn =
container_of(work, struct isert_conn, drain_work);
#endif
isert_conn_free(isert_conn);
}
static void isert_sched_conn_drained(struct isert_connection *isert_conn)
static void isert_sched_conn_drained(struct isert_conn *isert_conn)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
INIT_WORK(&isert_conn->drain_work, isert_conn_drained_do_work,
@@ -639,10 +639,10 @@ static void isert_conn_closed_do_work(struct work_struct *work)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
struct isert_connection *isert_conn = ctx;
struct isert_conn *isert_conn = ctx;
#else
struct isert_connection *isert_conn =
container_of(work, struct isert_connection, close_work);
struct isert_conn *isert_conn =
container_of(work, struct isert_conn, close_work);
#endif
if (!test_bit(ISERT_CONNECTION_ABORTED, &isert_conn->flags))
@@ -651,7 +651,7 @@ static void isert_conn_closed_do_work(struct work_struct *work)
isert_conn_free(isert_conn);
}
static void isert_sched_conn_closed(struct isert_connection *isert_conn)
static void isert_sched_conn_closed(struct isert_conn *isert_conn)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
INIT_WORK(&isert_conn->close_work, isert_conn_closed_do_work,
@@ -669,16 +669,16 @@ static void isert_conn_free_do_work(struct work_struct *work)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
struct isert_connection *isert_conn = ctx;
struct isert_conn *isert_conn = ctx;
#else
struct isert_connection *isert_conn =
container_of(work, struct isert_connection, free_work);
struct isert_conn *isert_conn =
container_of(work, struct isert_conn, free_work);
#endif
isert_conn_free(isert_conn);
}
void isert_sched_conn_free(struct isert_connection *isert_conn)
void isert_sched_conn_free(struct isert_conn *isert_conn)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
INIT_WORK(&isert_conn->free_work, isert_conn_free_do_work,
@@ -693,7 +693,7 @@ static void isert_handle_wc_error(struct ib_wc *wc)
{
struct isert_wr *wr = _u64_to_ptr(wc->wr_id);
struct isert_cmnd *isert_pdu = wr->pdu;
struct isert_connection *isert_conn = wr->conn;
struct isert_conn *isert_conn = wr->conn;
struct isert_buf *isert_buf = wr->buf;
struct isert_device *isert_dev = wr->isert_dev;
struct ib_device *ib_dev = isert_dev->ib_dev;
@@ -887,7 +887,7 @@ static void isert_async_evt_handler(struct ib_event *async_ev, void *context)
struct ib_device *ib_dev = isert_dev->ib_dev;
char *dev_name = ib_dev->name;
enum ib_event_type ev_type = async_ev->event;
struct isert_connection *isert_conn;
struct isert_conn *isert_conn;
TRACE_ENTRY();
@@ -1206,7 +1206,7 @@ static int isert_get_cq_idx(struct isert_device *isert_dev)
return min_idx;
}
static int isert_conn_qp_create(struct isert_connection *isert_conn)
static int isert_conn_qp_create(struct isert_conn *isert_conn)
{
struct rdma_cm_id *cm_id = isert_conn->cm_id;
struct isert_device *isert_dev = isert_conn->isert_dev;
@@ -1266,10 +1266,10 @@ fail_create_qp:
goto out;
}
static struct isert_connection *isert_conn_create(struct rdma_cm_id *cm_id,
static struct isert_conn *isert_conn_create(struct rdma_cm_id *cm_id,
struct isert_device *isert_dev)
{
struct isert_connection *isert_conn;
struct isert_conn *isert_conn;
int err;
struct isert_cq *cq;
@@ -1373,8 +1373,8 @@ static void isert_deref_device(struct isert_device *isert_dev)
static void isert_kref_free(struct kref *kref)
{
struct isert_conn_dev *dev;
struct isert_connection *isert_conn =
container_of(kref, struct isert_connection, kref);
struct isert_conn *isert_conn =
container_of(kref, struct isert_conn, kref);
struct isert_device *isert_dev = isert_conn->isert_dev;
struct isert_cq *cq = isert_conn->qp->recv_cq->cq_context;
@@ -1415,7 +1415,7 @@ static void isert_kref_free(struct kref *kref)
TRACE_EXIT();
}
void isert_conn_free(struct isert_connection *isert_conn)
void isert_conn_free(struct isert_conn *isert_conn)
{
sBUG_ON(kref_read(&isert_conn->kref) == 0);
kref_put(&isert_conn->kref, isert_kref_free);
@@ -1424,14 +1424,14 @@ void isert_conn_free(struct isert_connection *isert_conn)
static int isert_cm_disconnected_handler(struct rdma_cm_id *cm_id,
struct rdma_cm_event *event)
{
struct isert_connection *isert_conn = cm_id->qp->qp_context;
struct isert_conn *isert_conn = cm_id->qp->qp_context;
if (!test_and_set_bit(ISERT_CONNECTION_CLOSE, &isert_conn->flags))
isert_sched_conn_closed(isert_conn);
return 0;
}
static void isert_immediate_conn_close(struct isert_connection *isert_conn)
static void isert_immediate_conn_close(struct isert_conn *isert_conn)
{
set_bit(ISERT_CONNECTION_ABORTED, &isert_conn->flags);
set_bit(ISERT_CONNECTION_CLOSE, &isert_conn->flags);
@@ -1453,7 +1453,7 @@ static int isert_cm_conn_req_handler(struct rdma_cm_id *cm_id,
struct isert_portal *portal = cm_id->context;
struct ib_device *ib_dev = cm_id->device;
struct isert_device *isert_dev;
struct isert_connection *isert_conn;
struct isert_conn *isert_conn;
struct rdma_conn_param *ini_conn_param;
struct rdma_conn_param tgt_conn_param;
struct isert_cm_hdr cm_hdr = { 0 };
@@ -1559,7 +1559,7 @@ fail_dev_create:
static int isert_cm_connect_handler(struct rdma_cm_id *cm_id,
struct rdma_cm_event *event)
{
struct isert_connection *isert_conn = cm_id->qp->qp_context;
struct isert_conn *isert_conn = cm_id->qp->qp_context;
int push_saved_pdu = 0;
int ret = 0;
@@ -1627,7 +1627,7 @@ static const char *rdma_event_msg(enum rdma_cm_event_type event)
}
#endif
static int isert_handle_failure(struct isert_connection *conn)
static int isert_handle_failure(struct isert_conn *conn)
{
isert_conn_disconnect(conn);
return 0;
@@ -1656,7 +1656,7 @@ static int isert_cm_evt_listener_handler(struct rdma_cm_id *cm_id,
static int isert_cm_disconnect_handler(struct rdma_cm_id *cm_id,
enum rdma_cm_event_type event)
{
struct isert_connection *isert_conn = cm_id->qp->qp_context;
struct isert_conn *isert_conn = cm_id->qp->qp_context;
isert_conn_disconnect(isert_conn);
@@ -1723,7 +1723,7 @@ static int isert_cm_evt_handler(struct rdma_cm_id *cm_id,
/* We can receive this instead of RDMA_CM_EVENT_ESTABLISHED */
case RDMA_CM_EVENT_UNREACHABLE:
{
struct isert_connection *isert_conn =
struct isert_conn *isert_conn =
cm_id->qp->qp_context;
mutex_lock(&isert_conn->state_mutex);
@@ -1879,7 +1879,7 @@ static void isert_portal_free(struct isert_portal *portal)
void isert_portal_release(struct isert_portal *portal)
{
struct isert_connection *conn;
struct isert_conn *conn;
PRINT_INFO("iser portal cm_id:%p releasing", portal->cm_id);

View File

@@ -486,8 +486,8 @@ void isert_connection_closed(struct iscsi_conn *iscsi_conn)
void isert_connection_abort(struct iscsi_conn *iscsi_conn)
{
struct isert_connection *isert_conn =
container_of(iscsi_conn, struct isert_connection, iscsi);
struct isert_conn *isert_conn =
container_of(iscsi_conn, struct isert_conn, iscsi);
TRACE_ENTRY();