]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[SCSI] export busy state via q->lld_busy_fn()
authorKiyoshi Ueda <k-ueda@ct.jp.nec.com>
Sat, 4 Oct 2008 18:11:35 +0000 (14:11 -0400)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 23 Oct 2008 16:42:16 +0000 (11:42 -0500)
commit6c5121b78ba5c70a9990e2af6cb4d6bbffe0d4d8
treee64e5c0420f502e18a76a06f07434f631bf3870f
parent9d11251709f31d49c8167a619d4475fdf6cd7f73
[SCSI] export busy state via q->lld_busy_fn()

This patch implements q->lld_busy_fn() for scsi mid layer to export
its busy state for request stacking drivers.

For efficiency, no lock is taken to check the busy state of
shost/starget/sdev, since the returned value is not guaranteed and
may be changed after request stacking drivers call the function,
regardless of taking lock or not.

When scsi can't dispatch I/Os anymore and needs to kill I/Os
(e.g. !sdev), scsi needs to return 'not busy'.
Otherwise, request stacking drivers may hold requests forever.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/scsi_lib.c