mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
iscsi-target: Convert transport drivers to signal rdma_shutdown
Instead of special casing the handful of callers that check for iser-target rdma verbs specific shutdown, use a simple flag at iscsit_transport->rdma_shutdown so each driver can signal this. Also, update iscsi-target/tcp + cxgbit to rdma_shutdown = false. Cc: Varun Prakash <[email protected]> Cc: Hariprasad Shenai <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Sagi Grimberg <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
This commit is contained in:
parent
d4b3fa4b08
commit
bd027d856d
4 changed files with 7 additions and 6 deletions
|
|
@ -625,6 +625,7 @@ static enum target_prot_op cxgbit_get_sup_prot_ops(struct iscsi_conn *conn)
|
|||
static struct iscsit_transport cxgbit_transport = {
|
||||
.name = DRV_NAME,
|
||||
.transport_type = ISCSI_HW_OFFLOAD,
|
||||
.rdma_shutdown = false,
|
||||
.priv_size = sizeof(struct cxgbit_cmd),
|
||||
.owner = THIS_MODULE,
|
||||
.iscsit_setup_np = cxgbit_setup_np,
|
||||
|
|
|
|||
|
|
@ -670,6 +670,7 @@ static enum target_prot_op iscsit_get_sup_prot_ops(struct iscsi_conn *conn)
|
|||
static struct iscsit_transport iscsi_target_transport = {
|
||||
.name = "iSCSI/TCP",
|
||||
.transport_type = ISCSI_TCP,
|
||||
.rdma_shutdown = false,
|
||||
.owner = NULL,
|
||||
.iscsit_setup_np = iscsit_setup_np,
|
||||
.iscsit_accept_np = iscsit_accept_np,
|
||||
|
|
@ -4087,8 +4088,7 @@ int iscsit_close_connection(
|
|||
* this for iser since isert_rx_opcode() does not wait on logout failure,
|
||||
* and to avoid iscsi_conn pointer dereference in iser-target code.
|
||||
*/
|
||||
if ((conn->conn_transport->transport_type == ISCSI_TCP) ||
|
||||
(conn->conn_transport->transport_type == ISCSI_HW_OFFLOAD))
|
||||
if (!conn->conn_transport->rdma_shutdown)
|
||||
complete(&conn->conn_logout_comp);
|
||||
|
||||
if (!strcmp(current->comm, ISCSI_RX_THREAD_NAME)) {
|
||||
|
|
@ -4399,8 +4399,7 @@ static void iscsit_logout_post_handler_closesession(
|
|||
* always sleep waiting for RX/TX thread shutdown to complete
|
||||
* within iscsit_close_connection().
|
||||
*/
|
||||
if ((conn->conn_transport->transport_type == ISCSI_TCP) ||
|
||||
(conn->conn_transport->transport_type == ISCSI_HW_OFFLOAD))
|
||||
if (!conn->conn_transport->rdma_shutdown)
|
||||
sleep = cmpxchg(&conn->tx_thread_active, true, false);
|
||||
|
||||
atomic_set(&conn->conn_logout_remove, 0);
|
||||
|
|
@ -4417,8 +4416,7 @@ static void iscsit_logout_post_handler_samecid(
|
|||
{
|
||||
int sleep = 1;
|
||||
|
||||
if ((conn->conn_transport->transport_type == ISCSI_TCP) ||
|
||||
(conn->conn_transport->transport_type == ISCSI_HW_OFFLOAD))
|
||||
if (!conn->conn_transport->rdma_shutdown)
|
||||
sleep = cmpxchg(&conn->tx_thread_active, true, false);
|
||||
|
||||
atomic_set(&conn->conn_logout_remove, 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue