diff options
author | Ariel Nahum <arieln@mellanox.com> | 2014-07-31 13:27:50 +0300 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-08-01 15:10:05 -0700 |
commit | 9a6d3234a192d4a3a51df1042c13af13f996242a (patch) | |
tree | a5c1c408abffe9c89c5d94b5c8cff6ae18844713 /drivers/infiniband/ulp/iser/iscsi_iser.h | |
parent | 504130c039f917aba8b145fe8ea99be95e662fca (diff) | |
download | linux-9a6d3234a192d4a3a51df1042c13af13f996242a.tar.gz linux-9a6d3234a192d4a3a51df1042c13af13f996242a.tar.bz2 linux-9a6d3234a192d4a3a51df1042c13af13f996242a.zip |
IB/iser: Replace connection waitqueue with completion object
Instead of waiting for events and condition changes of the iser
connection state, we wait for explicit completion of connection
establishment and teardown.
Separate connection establishment wait object from the teardown object
to avoid a situation where racing connection establishment and
teardown may concurrently wakeup each other.
ep_poll will wait for up_completion invoked by
iser_connected_handler() and iser release worker will wait for
flush_completion before releasing the connection.
Bound the completion wait with a 30 seconds timeout for cases where
iscsid (the user space iscsi daemon) is too slow or gone.
Signed-off-by: Ariel Nahum <arieln@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iscsi_iser.h')
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h index c7efc5a91604..c877dad381cb 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.h +++ b/drivers/infiniband/ulp/iser/iscsi_iser.h @@ -326,7 +326,6 @@ struct iser_conn { struct iser_device *device; /* device context */ struct rdma_cm_id *cma_id; /* CMA ID */ struct ib_qp *qp; /* QP */ - wait_queue_head_t wait; /* waitq for conn/disconn */ unsigned qp_max_recv_dtos; /* num of rx buffers */ unsigned qp_max_recv_dtos_mask; /* above minus 1 */ unsigned min_posted_rx; /* qp_max_recv_dtos >> 2 */ @@ -336,6 +335,8 @@ struct iser_conn { struct work_struct release_work; struct completion stop_completion; struct mutex state_mutex; + struct completion flush_completion; + struct completion up_completion; struct list_head conn_list; /* entry in ig conn list */ char *login_buf; |