summaryrefslogtreecommitdiffstats
path: root/include/scsi/libiscsi.h
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2006-07-24 15:47:15 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-07-28 11:47:40 -0500
commitb6c395ed0387c824ddf125d3b74b576a2575c149 (patch)
tree76ca5cd982063335088384622e5033401bbc5057 /include/scsi/libiscsi.h
parentd82967c70658a408ea6cae5dc989ba8b2c0999e1 (diff)
downloadlinux-b6c395ed0387c824ddf125d3b74b576a2575c149.tar.bz2
[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/libiscsi.h')
-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 {
struct list_head running;
};
+enum {
+ ISCSI_TASK_COMPLETED,
+ ISCSI_TASK_PENDING,
+ ISCSI_TASK_RUNNING,
+};
+
struct iscsi_cmd_task {
/*
* Becuae LLDs allocate their hdr differently, this is a pointer to
@@ -101,6 +107,8 @@ struct iscsi_cmd_task {
struct iscsi_conn *conn; /* used connection */
struct iscsi_mgmt_task *mtask; /* tmf mtask in progr */
+ /* state set/tested under session->lock */
+ int state;
struct list_head running; /* running cmd list */
void *dd_data; /* driver/transport data */
};
@@ -134,7 +142,7 @@ struct iscsi_conn {
struct kfifo *immqueue; /* immediate xmit queue */
struct kfifo *mgmtqueue; /* mgmt (control) xmit queue */
struct list_head mgmt_run_list; /* list of control tasks */
- struct kfifo *xmitqueue; /* data-path cmd queue */
+ struct list_head xmitqueue; /* data-path cmd queue */
struct list_head run_list; /* list of cmds in progress */
struct work_struct xmitwork; /* per-conn. xmit workqueue */
/*