IB/iser: Replace connection waitqueue with completion object
authorAriel Nahum <arieln@mellanox.com>
Thu, 31 Jul 2014 10:27:50 +0000 (13:27 +0300)
committerRoland Dreier <roland@purestorage.com>
Fri, 1 Aug 2014 22:10:05 +0000 (15:10 -0700)
commit9a6d3234a192d4a3a51df1042c13af13f996242a
treea5c1c408abffe9c89c5d94b5c8cff6ae18844713
parent504130c039f917aba8b145fe8ea99be95e662fca
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>
drivers/infiniband/ulp/iser/iscsi_iser.c
drivers/infiniband/ulp/iser/iscsi_iser.h
drivers/infiniband/ulp/iser/iser_verbs.c