mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
isert: faster release of isert_scst module
If there is a dead connection we don't want to wait 60 seconds for the connection timeout error. So when closing the portal we close now all the connections immediately without waiting for events to arrive. Signed-off-by: Israel Rukshin <israelr@mellanox.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6952 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1891,11 +1891,20 @@ void isert_portal_release(struct isert_portal *portal)
|
||||
isert_portal_list_remove(portal);
|
||||
|
||||
mutex_lock(&dev_list_mutex);
|
||||
list_for_each_entry(conn, &portal->conn_list, portal_node)
|
||||
list_for_each_entry(conn, &portal->conn_list, portal_node) {
|
||||
isert_conn_disconnect(conn);
|
||||
if (!test_and_set_bit(ISERT_CONNECTION_CLOSE, &conn->flags))
|
||||
isert_sched_conn_closed(conn);
|
||||
}
|
||||
portal->state = ISERT_PORTAL_INACTIVE;
|
||||
isert_portal_free(portal);
|
||||
mutex_unlock(&dev_list_mutex);
|
||||
|
||||
while (!list_empty(&portal->conn_list)) {
|
||||
msleep(100);
|
||||
}
|
||||
|
||||
PRINT_INFO("done releasing portal %p", portal);
|
||||
}
|
||||
|
||||
struct isert_portal *isert_portal_start(struct sockaddr *sa, size_t addr_len)
|
||||
|
||||
Reference in New Issue
Block a user