diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2014-10-01 07:02:02 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-10-09 03:06:06 -0400 |
commit | c107a6c0cf1ab883ea87ca50136f4fc5204a4b82 (patch) | |
tree | f86ffda64d488b89aa89b5423d45923aded137b8 | |
parent | c47a3c9ed5be167f49a6fd3f696dac03536282eb (diff) |
IB/iser: Don't bound release_work completions timeouts
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 <sagig@mellanox.com>
Signed-off-by: Ariel Nahum <arieln@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r-- | 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 6170d06a8acc..6ce20fd9abac 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, | |||
566 | void iser_release_work(struct work_struct *work) | 566 | void iser_release_work(struct work_struct *work) |
567 | { | 567 | { |
568 | struct iser_conn *iser_conn; | 568 | struct iser_conn *iser_conn; |
569 | int rc; | ||
570 | 569 | ||
571 | iser_conn = container_of(work, struct iser_conn, release_work); | 570 | iser_conn = container_of(work, struct iser_conn, release_work); |
572 | 571 | ||
573 | /* wait for .conn_stop callback */ | 572 | /* Wait for conn_stop to complete */ |
574 | rc = wait_for_completion_timeout(&iser_conn->stop_completion, 30 * HZ); | 573 | wait_for_completion(&iser_conn->stop_completion); |
575 | WARN_ON(rc == 0); | 574 | /* Wait for IB resouces cleanup to complete */ |
576 | 575 | wait_for_completion(&iser_conn->ib_completion); | |
577 | rc = wait_for_completion_timeout(&iser_conn->ib_completion, 30 * HZ); | ||
578 | if (rc == 0) | ||
579 | iser_warn("conn %p, IB cleanup didn't complete in 30 " | ||
580 | "seconds, continue with release\n", iser_conn); | ||
581 | 576 | ||
582 | mutex_lock(&iser_conn->state_mutex); | 577 | mutex_lock(&iser_conn->state_mutex); |
583 | iser_conn->state = ISER_CONN_DOWN; | 578 | iser_conn->state = ISER_CONN_DOWN; |