提交 6b5d6c44 编写于 作者: M Mike Christie 提交者: James Bottomley

[SCSI] cxgb3i, iser, iscsi_tcp: set target can queue

Set target can queue limit to the number of preallocated
session tasks we have.

This along with the cxgb3i can_queue patch will fix a throughput
problem where it could only queue one LU worth of data at a time.
Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 9a6510eb
...@@ -599,6 +599,7 @@ static struct scsi_host_template iscsi_iser_sht = { ...@@ -599,6 +599,7 @@ static struct scsi_host_template iscsi_iser_sht = {
.eh_abort_handler = iscsi_eh_abort, .eh_abort_handler = iscsi_eh_abort,
.eh_device_reset_handler= iscsi_eh_device_reset, .eh_device_reset_handler= iscsi_eh_device_reset,
.eh_target_reset_handler= iscsi_eh_target_reset, .eh_target_reset_handler= iscsi_eh_target_reset,
.target_alloc = iscsi_target_alloc,
.use_clustering = DISABLE_CLUSTERING, .use_clustering = DISABLE_CLUSTERING,
.proc_name = "iscsi_iser", .proc_name = "iscsi_iser",
.this_id = -1, .this_id = -1,
......
...@@ -883,6 +883,7 @@ static struct scsi_host_template cxgb3i_host_template = { ...@@ -883,6 +883,7 @@ static struct scsi_host_template cxgb3i_host_template = {
.eh_abort_handler = iscsi_eh_abort, .eh_abort_handler = iscsi_eh_abort,
.eh_device_reset_handler = iscsi_eh_device_reset, .eh_device_reset_handler = iscsi_eh_device_reset,
.eh_target_reset_handler = iscsi_eh_target_reset, .eh_target_reset_handler = iscsi_eh_target_reset,
.target_alloc = iscsi_target_alloc,
.use_clustering = DISABLE_CLUSTERING, .use_clustering = DISABLE_CLUSTERING,
.this_id = -1, .this_id = -1,
}; };
......
...@@ -851,6 +851,7 @@ static struct scsi_host_template iscsi_sw_tcp_sht = { ...@@ -851,6 +851,7 @@ static struct scsi_host_template iscsi_sw_tcp_sht = {
.use_clustering = DISABLE_CLUSTERING, .use_clustering = DISABLE_CLUSTERING,
.slave_alloc = iscsi_sw_tcp_slave_alloc, .slave_alloc = iscsi_sw_tcp_slave_alloc,
.slave_configure = iscsi_sw_tcp_slave_configure, .slave_configure = iscsi_sw_tcp_slave_configure,
.target_alloc = iscsi_target_alloc,
.proc_name = "iscsi_tcp", .proc_name = "iscsi_tcp",
.this_id = -1, .this_id = -1,
}; };
......
...@@ -1463,6 +1463,16 @@ int iscsi_change_queue_depth(struct scsi_device *sdev, int depth) ...@@ -1463,6 +1463,16 @@ int iscsi_change_queue_depth(struct scsi_device *sdev, int depth)
} }
EXPORT_SYMBOL_GPL(iscsi_change_queue_depth); EXPORT_SYMBOL_GPL(iscsi_change_queue_depth);
int iscsi_target_alloc(struct scsi_target *starget)
{
struct iscsi_cls_session *cls_session = starget_to_session(starget);
struct iscsi_session *session = cls_session->dd_data;
starget->can_queue = session->scsi_cmds_max;
return 0;
}
EXPORT_SYMBOL_GPL(iscsi_target_alloc);
void iscsi_session_recovery_timedout(struct iscsi_cls_session *cls_session) void iscsi_session_recovery_timedout(struct iscsi_cls_session *cls_session)
{ {
struct iscsi_session *session = cls_session->dd_data; struct iscsi_session *session = cls_session->dd_data;
......
...@@ -36,6 +36,7 @@ struct scsi_transport_template; ...@@ -36,6 +36,7 @@ struct scsi_transport_template;
struct scsi_host_template; struct scsi_host_template;
struct scsi_device; struct scsi_device;
struct Scsi_Host; struct Scsi_Host;
struct scsi_target;
struct scsi_cmnd; struct scsi_cmnd;
struct socket; struct socket;
struct iscsi_transport; struct iscsi_transport;
...@@ -350,6 +351,7 @@ extern struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, ...@@ -350,6 +351,7 @@ extern struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
bool xmit_can_sleep); bool xmit_can_sleep);
extern void iscsi_host_remove(struct Scsi_Host *shost); extern void iscsi_host_remove(struct Scsi_Host *shost);
extern void iscsi_host_free(struct Scsi_Host *shost); extern void iscsi_host_free(struct Scsi_Host *shost);
extern int iscsi_target_alloc(struct scsi_target *starget);
/* /*
* session management * session management
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册