aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-05-21 16:54:18 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-12 09:22:22 -0400
commit913e5bf435617aa529919a4f7567f849f9f35f9f (patch)
treedb7357d78d7d6f20358d61bf88a8137ad044a5a5 /include
parent3cf7b233ffc45d4fc381221f74d24f10e692c4ea (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 'include')
-rw-r--r--include/scsi/libiscsi.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 5bf0187e7520..5e75bb7f311c 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -139,11 +139,6 @@ struct iscsi_conn {
139 void *dd_data; /* iscsi_transport data */ 139 void *dd_data; /* iscsi_transport data */
140 struct iscsi_session *session; /* parent session */ 140 struct iscsi_session *session; /* parent session */
141 /* 141 /*
142 * LLDs should set this lock. It protects the transport recv
143 * code
144 */
145 rwlock_t *recv_lock;
146 /*
147 * conn_stop() flag: stop to recover, stop to terminate 142 * conn_stop() flag: stop to recover, stop to terminate
148 */ 143 */
149 int stop_stage; 144 int stop_stage;
@@ -374,10 +369,13 @@ extern int iscsi_conn_send_pdu(struct iscsi_cls_conn *, struct iscsi_hdr *,
374 char *, uint32_t); 369 char *, uint32_t);
375extern int iscsi_complete_pdu(struct iscsi_conn *, struct iscsi_hdr *, 370extern int iscsi_complete_pdu(struct iscsi_conn *, struct iscsi_hdr *,
376 char *, int); 371 char *, int);
372extern int __iscsi_complete_pdu(struct iscsi_conn *, struct iscsi_hdr *,
373 char *, int);
377extern int iscsi_verify_itt(struct iscsi_conn *, itt_t); 374extern int iscsi_verify_itt(struct iscsi_conn *, itt_t);
378extern struct iscsi_task *iscsi_itt_to_ctask(struct iscsi_conn *, itt_t); 375extern struct iscsi_task *iscsi_itt_to_ctask(struct iscsi_conn *, itt_t);
379extern void iscsi_requeue_task(struct iscsi_task *task); 376extern void iscsi_requeue_task(struct iscsi_task *task);
380extern void iscsi_put_task(struct iscsi_task *task); 377extern void iscsi_put_task(struct iscsi_task *task);
378extern void __iscsi_get_task(struct iscsi_task *task);
381 379
382/* 380/*
383 * generic helpers 381 * generic helpers