From: Sagi Grimberg <[email protected]>
We no longer rely on iscsi connection teardown sequence,
so no need to give a grace period and continue cleanup if
it expired. Have iser_conn_release wait for full completion
before freeing iser_conn.
ib_completion:
Guaranteed to come when:
- Got DISCONNECTED/ADDR_CHANGE event or
- iSCSI called ep_disconnect/conn_stop
Guaranteed to finish when:
- Got TIMEWAIT_EXIT/DEVICE_REMOVAL event
- All Flush errors are consumed
- IB related resources are destroyed
stop_completion:
Guaranteed to come when:
- iSCSI calls conn_stop
Guaranteed to finish when:
- All inflight tasks were cleaned up
Signed-off-by: Sagi Grimberg <[email protected]>
Signed-off-by: Ariel Nahum <[email protected]>
Signed-off-by: Or Gerlitz <[email protected]>
---
drivers/infiniband/ulp/iser/iser_verbs.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c
b/drivers/infiniband/ulp/iser/iser_verbs.c
index 6170d06..6ce20fd 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -566,18 +566,13 @@ static int iser_conn_state_comp_exch(struct iser_conn
*iser_conn,
void iser_release_work(struct work_struct *work)
{
struct iser_conn *iser_conn;
- int rc;
iser_conn = container_of(work, struct iser_conn, release_work);
- /* wait for .conn_stop callback */
- rc = wait_for_completion_timeout(&iser_conn->stop_completion, 30 * HZ);
- WARN_ON(rc == 0);
-
- rc = wait_for_completion_timeout(&iser_conn->ib_completion, 30 * HZ);
- if (rc == 0)
- iser_warn("conn %p, IB cleanup didn't complete in 30 "
- "seconds, continue with release\n", iser_conn);
+ /* Wait for conn_stop to complete */
+ wait_for_completion(&iser_conn->stop_completion);
+ /* Wait for IB resouces cleanup to complete */
+ wait_for_completion(&iser_conn->ib_completion);
mutex_lock(&iser_conn->state_mutex);
iser_conn->state = ISER_CONN_DOWN;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html