[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7fdb796f-9301-4898-b038-cc4f546192e2@bytedance.com>
Date: Tue, 14 Nov 2023 23:05:15 +0800
From: Chengming Zhou <zhouchengming@...edance.com>
To: Bart Van Assche <bvanassche@....org>,
syzbot <syzbot+fcc47ba2476570cbbeb0@...kaller.appspotmail.com>,
axboe@...nel.dk, chaitanyak@...dia.com, eadavis@...com,
hch@...radead.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, ming.lei@...hat.com,
syzkaller-bugs@...glegroups.com
Subject: Re: [External] Re: [syzbot] [block?] WARNING in blk_mq_start_request
On 2023/11/14 07:57, Bart Van Assche wrote:
> On 11/13/23 07:05, Chengming Zhou wrote:
>> Ok, I reviewed the code of virtio_queue_rqs(), found the main difference
>> is that request won't fail after blk_mq_start_request().
>>
>> But in null_blk case, the request will fail after blk_mq_start_request(),
>> return BLK_STS_RESOURCE or BLK_STS_DEV_RESOURCE. If we return these rqs
>> back to the block layer core, they will be queued individually once again.
>> So caused the warning.
>
> I think it is safe to move the blk_mq_start_request() call under the if-block
> that decides whether or not to requeue a request in null_queue_rq()
>
Right! And null_handle_throttled() in null_handle_cmd() may also return the
BLK_STS_DEV_RESOURCE, it's also needed to put in null_queue_rq() and before
the blk_mq_start_request().
Then request must return BLK_STS_OK after blk_mq_start_request().
Thanks!
Powered by blists - more mailing lists