linux/include/scsi
Mike Christie f0c0a376d0 [SCSI] Add helper code so transport classes/driver can control queueing (v3)
SCSI-ml manages the queueing limits for the device and host, but
does not do so at the target level. However something something similar
can come in userful when a driver is transitioning a transport object to
the the blocked state, becuase at that time we do not want to queue
io and we do not want the queuecommand to be called again.

The patch adds code similar to the exisiting SCSI_ML_*BUSY handlers.
You can now return SCSI_MLQUEUE_TARGET_BUSY when we hit
a transport level queueing issue like the hw cannot allocate some
resource at the iscsi session/connection level, or the target has temporarily
closed or shrunk the queueing window, or if we are transitioning
to the blocked state.

bnx2i, when they rework their firmware according to netdev
developers requests, will also need to be able to limit queueing at this
level. bnx2i will hook into libiscsi, but will allocate a scsi host per
netdevice/hba, so unlike pure software iscsi/iser which is allocating
a host per session, it cannot set the scsi_host->can_queue and return
SCSI_MLQUEUE_HOST_BUSY to reflect queueing limits on the transport.

The iscsi class/driver can also set a scsi_target->can_queue value which
reflects the max commands the driver/class can support. For iscsi this
reflects the number of commands we can support for each session due to
session/connection hw limits, driver limits, and to also reflect the
session/targets's queueing window.

Changes:
v1 - initial patch.
v2 - Fix scsi_run_queue handling of multiple blocked targets.
Previously we would break from the main loop if a device was added back on
the starved list. We now run over the list and check if any target is
blocked.
v3 - Rediff for scsi-misc.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-10-13 09:28:46 -04:00
..
iscsi_if.h [SCSI] iscsi class: Add session initiatorname and ifacename sysfs attrs. 2008-07-12 08:22:21 -05:00
iscsi_proto.h [SCSI] iscsi_tcp: Enable any size command 2008-07-12 08:22:23 -05:00
libiscsi.h [SCSI] libiscsi, iser, tcp: remove recv_lock 2008-07-12 08:22:22 -05:00
libsas.h include: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:16:54 -04:00
libsrp.h [SCSI] tgt: convert libsrp and ibmvstgt to use srp_transport 2007-10-12 14:37:57 -04:00
sas.h [SCSI] libsas: Convert sas_proto users to sas_protocol 2008-01-11 18:22:41 -06:00
sas_ata.h [SCSI] libsas: fix missing inlines in header file 2008-04-07 12:19:10 -05:00
scsi.h [SCSI] Add helper code so transport classes/driver can control queueing (v3) 2008-10-13 09:28:46 -04:00
scsi_cmnd.h block: unify request timeout handling 2008-10-09 08:56:13 +02:00
scsi_dbg.h [SCSI] Fix device not ready printk 2007-10-12 14:51:56 -04:00
scsi_device.h [SCSI] Add helper code so transport classes/driver can control queueing (v3) 2008-10-13 09:28:46 -04:00
scsi_devinfo.h Merge ../scsi-rc-fixes-2.6 2006-04-14 15:47:45 -05:00
scsi_dh.h [SCSI] scsi_dh: attach to hardware handler from dm-mpath 2008-07-26 15:14:53 -04:00
scsi_driver.h Revert "scsi: revert "[SCSI] Get rid of scsi_cmnd->done"" 2008-01-06 10:17:12 -08:00
scsi_eh.h [SCSI] scsi_eh_prep_cmnd should save scmd->underflow 2008-07-26 15:14:56 -04:00
scsi_host.h block: unify request timeout handling 2008-10-09 08:56:13 +02:00
scsi_ioctl.h [SCSI] unify SCSI_IOCTL_SEND_COMMAND implementations 2006-04-13 10:13:15 -05:00
scsi_netlink.h [SCSI] scsi_netlink: Add transport and LLD recieve and event support 2008-10-03 11:46:13 -05:00
scsi_netlink_fc.h [SCSI] SCSI & FC transport: extend event vendor id's to 64bits 2006-09-02 15:35:15 -05:00
scsi_tcq.h [PATCH] helper function for retrieving scsi_cmd given host based block layer tag 2006-10-04 19:32:09 +02:00
scsi_tgt.h [SCSI] tgt: add I_T nexus support 2007-10-12 14:37:50 -04:00
scsi_tgt_if.h [SCSI] tgt: add I_T nexus support 2007-10-12 14:37:50 -04:00
scsi_transport.h block: unify request timeout handling 2008-10-09 08:56:13 +02:00
scsi_transport_fc.h [SCSI] fc_transport: Add an API to allow an LLD to create vports 2008-10-03 11:46:15 -05:00
scsi_transport_iscsi.h driver core: remove KOBJ_NAME_LEN define 2008-07-21 21:54:52 -07:00
scsi_transport_sas.h SCSI: convert struct class_device to struct device 2008-04-19 19:10:33 -07:00
scsi_transport_spi.h [SCSI] spi transport class: export spi_dv_pending 2007-02-02 20:44:25 -06:00
scsi_transport_srp.h [SCSI] tgt: move tsk_mgmt_response callback to transport class 2007-10-12 14:38:01 -04:00
scsicam.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sg.h [SCSI] sg: Add target reset support 2008-07-12 08:22:32 -05:00
srp.h [SCSI] srp.h: Add I/O Class values 2006-06-17 20:37:38 -07:00