diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2008-05-21 16:54:18 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-12 09:22:22 -0400 |
commit | 913e5bf435617aa529919a4f7567f849f9f35f9f (patch) | |
tree | db7357d78d7d6f20358d61bf88a8137ad044a5a5 /drivers/infiniband/ulp/iser/iscsi_iser.c | |
parent | 3cf7b233ffc45d4fc381221f74d24f10e692c4ea (diff) |
[SCSI] libiscsi, iser, tcp: remove recv_lock
The recv lock was defined so the iscsi layer could block
the recv path from processing IO during recovery. It
turns out iser just set a lock to that pointer which was pointless.
We now disconnect the transport connection before doing recovery
so we do not need the recv lock. For iscsi_tcp we still stop
the recv path incase older tools are being used.
This patch also has iscsi_itt_to_ctask user grab the session lock
and has the caller access the task with the lock or get a ref
to it in case the target is broken and sends a tmf success response
then sends data or a response for the command that was supposed to
be affected bty the tmf.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iscsi_iser.c')
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 08edbaf89223..c02eabd383a1 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c | |||
@@ -281,9 +281,6 @@ iscsi_iser_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | |||
281 | conn->max_recv_dlength = 128; | 281 | conn->max_recv_dlength = 128; |
282 | 282 | ||
283 | iser_conn = conn->dd_data; | 283 | iser_conn = conn->dd_data; |
284 | /* currently this is the only field which need to be initiated */ | ||
285 | rwlock_init(&iser_conn->lock); | ||
286 | |||
287 | conn->dd_data = iser_conn; | 284 | conn->dd_data = iser_conn; |
288 | iser_conn->iscsi_conn = conn; | 285 | iser_conn->iscsi_conn = conn; |
289 | 286 | ||
@@ -342,9 +339,6 @@ iscsi_iser_conn_bind(struct iscsi_cls_session *cls_session, | |||
342 | ib_conn->iser_conn = iser_conn; | 339 | ib_conn->iser_conn = iser_conn; |
343 | iser_conn->ib_conn = ib_conn; | 340 | iser_conn->ib_conn = ib_conn; |
344 | iser_conn_get(ib_conn); | 341 | iser_conn_get(ib_conn); |
345 | |||
346 | conn->recv_lock = &iser_conn->lock; | ||
347 | |||
348 | return 0; | 342 | return 0; |
349 | } | 343 | } |
350 | 344 | ||
@@ -355,12 +349,18 @@ iscsi_iser_conn_stop(struct iscsi_cls_conn *cls_conn, int flag) | |||
355 | struct iscsi_iser_conn *iser_conn = conn->dd_data; | 349 | struct iscsi_iser_conn *iser_conn = conn->dd_data; |
356 | struct iser_conn *ib_conn = iser_conn->ib_conn; | 350 | struct iser_conn *ib_conn = iser_conn->ib_conn; |
357 | 351 | ||
358 | iscsi_conn_stop(cls_conn, flag); | ||
359 | /* | 352 | /* |
360 | * There is no unbind event so the stop callback | 353 | * Userspace may have goofed up and not bound the connection or |
361 | * must release the ref from the bind. | 354 | * might have only partially setup the connection. |
362 | */ | 355 | */ |
363 | iser_conn_put(ib_conn); | 356 | if (ib_conn) { |
357 | iscsi_conn_stop(cls_conn, flag); | ||
358 | /* | ||
359 | * There is no unbind event so the stop callback | ||
360 | * must release the ref from the bind. | ||
361 | */ | ||
362 | iser_conn_put(ib_conn); | ||
363 | } | ||
364 | iser_conn->ib_conn = NULL; | 364 | iser_conn->ib_conn = NULL; |
365 | } | 365 | } |
366 | 366 | ||