aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2014-02-07 01:41:39 -0500
committerJames Bottomley <JBottomley@Parallels.com>2014-03-15 13:19:18 -0400
commit46a84c6516fa09bb8e4cc0c7998ccd4cb5e876a1 (patch)
tree93bf84a73cc9ca40cc54e4dc00247f2dd5f006cc
parent659743b02c411075b26601725947b21df0bb29c8 (diff)
[SCSI] libiscsi: remove unneeded queue work when max_cmdsn is increased
iscsi_queuecommand will only take in commands that can fit in the current window. So, if a command is on the cmdqueue then it can fit in the current window. If a command is on the mgmtqueue, then we are setting the immediate bit so they will also fit in the window. As a result, we never need to to do a iscsi_conn_queue_work when the maxCmdSn is increased. What should happen is that a command will complete the window will be increased, then the scsi layer will send us more commands by running the scsi_device queues. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/libiscsi.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 8738b989a801..5b8605ca42fa 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -110,16 +110,8 @@ static void __iscsi_update_cmdsn(struct iscsi_session *session,
110 session->exp_cmdsn = exp_cmdsn; 110 session->exp_cmdsn = exp_cmdsn;
111 111
112 if (max_cmdsn != session->max_cmdsn && 112 if (max_cmdsn != session->max_cmdsn &&
113 !iscsi_sna_lt(max_cmdsn, session->max_cmdsn)) { 113 !iscsi_sna_lt(max_cmdsn, session->max_cmdsn))
114 session->max_cmdsn = max_cmdsn; 114 session->max_cmdsn = max_cmdsn;
115 /*
116 * if the window closed with IO queued, then kick the
117 * xmit thread
118 */
119 if (!list_empty(&session->leadconn->cmdqueue) ||
120 !list_empty(&session->leadconn->mgmtqueue))
121 iscsi_conn_queue_work(session->leadconn);
122 }
123} 115}
124 116
125void iscsi_update_cmdsn(struct iscsi_session *session, struct iscsi_nopin *hdr) 117void iscsi_update_cmdsn(struct iscsi_session *session, struct iscsi_nopin *hdr)