diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2009-11-11 17:34:36 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-12-04 13:01:39 -0500 |
commit | 1796e72291b2b6aafaec5954e666d0b5a95da935 (patch) | |
tree | 41432a598971de113b213ff39736b436a97113cc /drivers/scsi | |
parent | b20d038dff877566694181578c49c31616d622cd (diff) |
[SCSI] libiscsi: hook into ramp up/down handling
It is rare to get a queue full with iscsi, because targets seem to
just reduce the iscsi cmd window. However, there is at least
one iscsi target that will throw a queue full when overloaded.
This hooks the iscsi code in to the ramp up/down code, so we
can handle it.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libiscsi.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 07ec997c5d4f..b7689f3d05f5 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -1739,10 +1739,19 @@ EXPORT_SYMBOL_GPL(iscsi_queuecommand); | |||
1739 | 1739 | ||
1740 | int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, int reason) | 1740 | int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, int reason) |
1741 | { | 1741 | { |
1742 | if (reason != SCSI_QDEPTH_DEFAULT) | 1742 | switch (reason) { |
1743 | case SCSI_QDEPTH_DEFAULT: | ||
1744 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); | ||
1745 | break; | ||
1746 | case SCSI_QDEPTH_QFULL: | ||
1747 | scsi_track_queue_full(sdev, depth); | ||
1748 | break; | ||
1749 | case SCSI_QDEPTH_RAMP_UP: | ||
1750 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); | ||
1751 | break; | ||
1752 | default: | ||
1743 | return -EOPNOTSUPP; | 1753 | return -EOPNOTSUPP; |
1744 | 1754 | } | |
1745 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); | ||
1746 | return sdev->queue_depth; | 1755 | return sdev->queue_depth; |
1747 | } | 1756 | } |
1748 | EXPORT_SYMBOL_GPL(iscsi_change_queue_depth); | 1757 | EXPORT_SYMBOL_GPL(iscsi_change_queue_depth); |