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() Thanks, Bart.