On 06/24/18 23:10, Sreekanth Reddy wrote:
Before calling scsi_internal_device_block_nowait() API; driver sets sas_device_priv_data->block flag as one. And in the scsih_qcmd() driver checks for this flag as shown below and return the commands with host busy status. } else if (sas_target_priv_data->tm_busy || sas_device_priv_data->block) return SCSI_MLQUEUE_DEVICE_BUSY;
That's exactly the kind of construct that should occur in the SCSI core or block layer core and not in a SCSI LLD. Additionally, as explained before, the construct you described above is racy.
Bart.