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

Bart Van Assche
2022-10-19T21:11:13Z

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?

Bart.