On 12/06/16 01:12, Wei Fang wrote:
> The scsi device is being setted to the SDEV_RUNNING state at the end of
> the scan work. When the remote port reappears, scsi_target_unblock()
> will be called, but the QUEUE_FLAG_STOPPED flag will not be cleared,
> since scsi_internal_device_unblock() ignores SCSI devices in SDEV_RUNNING
> state. It results in a permanent stop of the scsi device's request
> queue. Every requests sended to it will be blocked.

Hello Wei,

scsi_device_set_state() does not allow the transition from 
SDEV_CREATED_BLOCK to SDEV_RUNNING. If a SCSI device is blocked after it 
has been added to the __devices list and before scsi_add_lun() finishes 
then I think the scan code will change its state into SDEV_BLOCK. Are 
you sure what you described above is what happened?

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to