lkml.org 
[lkml]   [2019]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] blk-mq: fix a hung issue when set device state to blocked and restore running
On Wed, Mar 20, 2019 at 04:02:01PM +0800, zhengbin wrote:
> When I use dd test a SCSI device which use blk-mq in the following steps:
> 1.echo "blocked" >/sys/block/sda/device/state
> 2.dd if=/dev/sda of=/mnt/t.log bs=1M count=10
> 3.echo "running" >/sys/block/sda/device/state
> dd should finish this work after step 3, unfortunately, still hung.
>
> After step2, the key code process is like this:
> blk_mq_dispatch_rq_list-->scsi_queue_rq-->prep_to_mq
> -->if ret is BLK_STS_RESOURCE, delay run hw queue
>
> prep_to_mq will return BLK_STS_RESOURCE, and scsi_queue_rq will transter
> it to BLK_STS_DEV_RESOURCE. In this situtation, we should delay run hw

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.

BTW, I'd suggest you read the big comment on BLK_STS_DEV_RESOURCE first.

Thanks,
Ming

\
 
 \ /
  Last update: 2019-03-20 09:12    [W:0.054 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site