diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-02-03 15:54:39 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-24 00:38:21 -0400 |
commit | d8bd97a03ce979b216df151e3b991023e6b72917 (patch) | |
tree | 10f84a53d540b963d7a260915e2ee492523959e0 /include | |
parent | af737f6739b80e4a9fc471fa0595740caf720714 (diff) |
iscsi/iser-target: Fix isert_conn->state hung shutdown issues
commit defd884845297fd5690594bfe89656b01f16d87e upstream.
This patch addresses a couple of different hug shutdown issues
related to wait_event() + isert_conn->state. First, it changes
isert_conn->conn_wait + isert_conn->conn_wait_comp_err from
waitqueues to completions, and sets ISER_CONN_TERMINATING from
within isert_disconnect_work().
Second, it splits isert_free_conn() into isert_wait_conn() that
is called earlier in iscsit_close_connection() to ensure that
all outstanding commands have completed before continuing.
Finally, it breaks isert_cq_comp_err() into seperate TX / RX
related code, and adds logic in isert_cq_rx_comp_err() to wait
for outstanding commands to complete before setting ISER_CONN_DOWN
and calling complete(&isert_conn->conn_wait_comp_err).
Acked-by: Sagi Grimberg <sagig@mellanox.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/target/iscsi/iscsi_transport.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index c5aade523863..4a5f00e2e6cd 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h | |||
@@ -11,6 +11,7 @@ struct iscsit_transport { | |||
11 | int (*iscsit_setup_np)(struct iscsi_np *, struct __kernel_sockaddr_storage *); | 11 | int (*iscsit_setup_np)(struct iscsi_np *, struct __kernel_sockaddr_storage *); |
12 | int (*iscsit_accept_np)(struct iscsi_np *, struct iscsi_conn *); | 12 | int (*iscsit_accept_np)(struct iscsi_np *, struct iscsi_conn *); |
13 | void (*iscsit_free_np)(struct iscsi_np *); | 13 | void (*iscsit_free_np)(struct iscsi_np *); |
14 | void (*iscsit_wait_conn)(struct iscsi_conn *); | ||
14 | void (*iscsit_free_conn)(struct iscsi_conn *); | 15 | void (*iscsit_free_conn)(struct iscsi_conn *); |
15 | struct iscsi_cmd *(*iscsit_alloc_cmd)(struct iscsi_conn *, gfp_t); | 16 | struct iscsi_cmd *(*iscsit_alloc_cmd)(struct iscsi_conn *, gfp_t); |
16 | int (*iscsit_get_login_rx)(struct iscsi_conn *, struct iscsi_login *); | 17 | int (*iscsit_get_login_rx)(struct iscsi_conn *, struct iscsi_login *); |