/* 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.  */
static int scsi_lld_busy(struct request_queue *q)
/* 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.  */
static int scsi_lld_busy(struct request_queue *q)
{
	struct scsi_device *sdev = q->queuedata;
	struct Scsi_Host *shost;
	struct scsi_target *starget;
	if (!sdev)
		return 0;
	shost = sdev->host;
	starget = scsi_target(sdev);
	if (scsi_host_in_recovery(shost) || scsi_host_is_busy(shost) ||
	    scsi_target_is_busy(starget) || scsi_device_is_busy(sdev))
		return 1;
	return 0;
}