diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2009-04-21 16:32:32 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-27 11:09:54 -0400 |
commit | 6b5d6c443a9b4fd71b633cef66b5db4de8a85787 (patch) | |
tree | 6b0ca6eaba58d51d3a0715ba9be40bf5449b40ed /drivers | |
parent | 9a6510eb3f030cedba32664498a610dc6d084d46 (diff) |
[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: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.c | 1 | ||||
-rw-r--r-- | drivers/scsi/cxgb3i/cxgb3i_iscsi.c | 1 | ||||
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 1 | ||||
-rw-r--r-- | drivers/scsi/libiscsi.c | 10 |
4 files changed, 13 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 13d7674b293d..75223f50de58 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c | |||
@@ -599,6 +599,7 @@ static struct scsi_host_template iscsi_iser_sht = { | |||
599 | .eh_abort_handler = iscsi_eh_abort, | 599 | .eh_abort_handler = iscsi_eh_abort, |
600 | .eh_device_reset_handler= iscsi_eh_device_reset, | 600 | .eh_device_reset_handler= iscsi_eh_device_reset, |
601 | .eh_target_reset_handler= iscsi_eh_target_reset, | 601 | .eh_target_reset_handler= iscsi_eh_target_reset, |
602 | .target_alloc = iscsi_target_alloc, | ||
602 | .use_clustering = DISABLE_CLUSTERING, | 603 | .use_clustering = DISABLE_CLUSTERING, |
603 | .proc_name = "iscsi_iser", | 604 | .proc_name = "iscsi_iser", |
604 | .this_id = -1, | 605 | .this_id = -1, |
diff --git a/drivers/scsi/cxgb3i/cxgb3i_iscsi.c b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c index fff8e4327644..b3ca3a05f0d9 100644 --- a/drivers/scsi/cxgb3i/cxgb3i_iscsi.c +++ b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c | |||
@@ -883,6 +883,7 @@ static struct scsi_host_template cxgb3i_host_template = { | |||
883 | .eh_abort_handler = iscsi_eh_abort, | 883 | .eh_abort_handler = iscsi_eh_abort, |
884 | .eh_device_reset_handler = iscsi_eh_device_reset, | 884 | .eh_device_reset_handler = iscsi_eh_device_reset, |
885 | .eh_target_reset_handler = iscsi_eh_target_reset, | 885 | .eh_target_reset_handler = iscsi_eh_target_reset, |
886 | .target_alloc = iscsi_target_alloc, | ||
886 | .use_clustering = DISABLE_CLUSTERING, | 887 | .use_clustering = DISABLE_CLUSTERING, |
887 | .this_id = -1, | 888 | .this_id = -1, |
888 | }; | 889 | }; |
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index f97fc7e9de79..b7c092d63bbe 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -851,6 +851,7 @@ static struct scsi_host_template iscsi_sw_tcp_sht = { | |||
851 | .use_clustering = DISABLE_CLUSTERING, | 851 | .use_clustering = DISABLE_CLUSTERING, |
852 | .slave_alloc = iscsi_sw_tcp_slave_alloc, | 852 | .slave_alloc = iscsi_sw_tcp_slave_alloc, |
853 | .slave_configure = iscsi_sw_tcp_slave_configure, | 853 | .slave_configure = iscsi_sw_tcp_slave_configure, |
854 | .target_alloc = iscsi_target_alloc, | ||
854 | .proc_name = "iscsi_tcp", | 855 | .proc_name = "iscsi_tcp", |
855 | .this_id = -1, | 856 | .this_id = -1, |
856 | }; | 857 | }; |
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 689628359169..e72b4ad47d35 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -1463,6 +1463,16 @@ int iscsi_change_queue_depth(struct scsi_device *sdev, int depth) | |||
1463 | } | 1463 | } |
1464 | EXPORT_SYMBOL_GPL(iscsi_change_queue_depth); | 1464 | EXPORT_SYMBOL_GPL(iscsi_change_queue_depth); |
1465 | 1465 | ||
1466 | int iscsi_target_alloc(struct scsi_target *starget) | ||
1467 | { | ||
1468 | struct iscsi_cls_session *cls_session = starget_to_session(starget); | ||
1469 | struct iscsi_session *session = cls_session->dd_data; | ||
1470 | |||
1471 | starget->can_queue = session->scsi_cmds_max; | ||
1472 | return 0; | ||
1473 | } | ||
1474 | EXPORT_SYMBOL_GPL(iscsi_target_alloc); | ||
1475 | |||
1466 | void iscsi_session_recovery_timedout(struct iscsi_cls_session *cls_session) | 1476 | void iscsi_session_recovery_timedout(struct iscsi_cls_session *cls_session) |
1467 | { | 1477 | { |
1468 | struct iscsi_session *session = cls_session->dd_data; | 1478 | struct iscsi_session *session = cls_session->dd_data; |