aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2006-07-24 16:47:15 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-07-28 12:47:40 -0400
commitb6c395ed0387c824ddf125d3b74b576a2575c149 (patch)
tree76ca5cd982063335088384622e5033401bbc5057 /include/scsi
parentd82967c70658a408ea6cae5dc989ba8b2c0999e1 (diff)
[SCSI] iscsi bugfixes: fix r2t handling
The iscsi tcp code can pluck multiple rt2s from the tasks's r2tqueue in the xmit code. This can result in the task being queued on the xmit queue but gettting completed at the same time. This patch fixes the above bug by making the fifo a list so we always remove the entry on the list del. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libiscsi.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index ba2760802ded..e71d6e96eca6 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -83,6 +83,12 @@ struct iscsi_mgmt_task {
83 struct list_head running; 83 struct list_head running;
84}; 84};
85 85
86enum {
87 ISCSI_TASK_COMPLETED,
88 ISCSI_TASK_PENDING,
89 ISCSI_TASK_RUNNING,
90};
91
86struct iscsi_cmd_task { 92struct iscsi_cmd_task {
87 /* 93 /*
88 * Becuae LLDs allocate their hdr differently, this is a pointer to 94 * Becuae LLDs allocate their hdr differently, this is a pointer to
@@ -101,6 +107,8 @@ struct iscsi_cmd_task {
101 struct iscsi_conn *conn; /* used connection */ 107 struct iscsi_conn *conn; /* used connection */
102 struct iscsi_mgmt_task *mtask; /* tmf mtask in progr */ 108 struct iscsi_mgmt_task *mtask; /* tmf mtask in progr */
103 109
110 /* state set/tested under session->lock */
111 int state;
104 struct list_head running; /* running cmd list */ 112 struct list_head running; /* running cmd list */
105 void *dd_data; /* driver/transport data */ 113 void *dd_data; /* driver/transport data */
106}; 114};
@@ -134,7 +142,7 @@ struct iscsi_conn {
134 struct kfifo *immqueue; /* immediate xmit queue */ 142 struct kfifo *immqueue; /* immediate xmit queue */
135 struct kfifo *mgmtqueue; /* mgmt (control) xmit queue */ 143 struct kfifo *mgmtqueue; /* mgmt (control) xmit queue */
136 struct list_head mgmt_run_list; /* list of control tasks */ 144 struct list_head mgmt_run_list; /* list of control tasks */
137 struct kfifo *xmitqueue; /* data-path cmd queue */ 145 struct list_head xmitqueue; /* data-path cmd queue */
138 struct list_head run_list; /* list of cmds in progress */ 146 struct list_head run_list; /* list of cmds in progress */
139 struct work_struct xmitwork; /* per-conn. xmit workqueue */ 147 struct work_struct xmitwork; /* per-conn. xmit workqueue */
140 /* 148 /*