Re: [PATCH] blk-mq: fix a hung issue when set device state to blocked and restore running

From: Ming Lei
Date: Wed Mar 20 2019 - 05:30:15 EST


On Wed, Mar 20, 2019 at 04:52:40PM +0800, zhengbin (A) wrote:
> Thanks for your quick reply, I will study BLK_STS_DEV_RESOURCE in detail
>
> > BLK_STS_DEV_RESOURCE means that the driver will rerun hw queue, so
> > maybe you need to investigate why it is returned from scsi driver first.
> because we set the device state to blocked,
> scsi_queue_rq-->prep_to_mq(return BLK_STS_RESOURCE)
> -->out_put_budget transfer BLK_STS_RESOURCE to BLK_STS_DEV_RESOURCE
> In this situtation, the request does not send to the driver.

Then the queue will be run when the scsi_device becomes un-blocked,
see scsi_internal_device_unblock_nowait().


Thanks,
Ming