Re: [PATCH v4 03/10] scsi: core: Support failing requests while recovering

Mike Christie
2022-10-20T17:21:17Z

On 10/19/22 4:11 PM, Bart Van Assche wrote:
> On 10/19/22 12:52, Mike Christie wrote:
>> Will we always hit this check? For example, if we have hit the
>> device's queue depth limit so
>>
>> scsi_mq_get_budget -> scsi_dev_queue_ready
>>
>> is returning -1, will we not even call scsi_queue_rq? So because
>> we are in recovery and no commands are completing, we will be
>> stuck waiting for a token to be put back on the sdev->budget_map.
>>
>> Do you need a similar check in scsi_dev_queue_ready or should
>> the check go in there only or can we hit a race for the latter?
>
> Hi Mike,
>
> A later patch in this series uses the SCMD_FAIL_IF_RECOVERING flag in the suspend path of the UFS driver. The UFS suspend code waits for the SCSI error handler to finish before the UFS device is suspended. Does this answer your question?

The reply for patch 9 about no other commands should be running
at this time answers my question, so we should be ok.

Reviewed-by: Mike Christie <michael.christie@oracle.com>