Re: NVMe induced NULL deref in bt_iter()

Ming Lei
2017-07-04T08:08:19Z

On Tue, Jul 04, 2017 at 10:56:23AM +0300, Sagi Grimberg wrote:
>
> > There are at least one case in which we have to use stop queues:
> >
> > - when QUEUE_BUSY(now it becomes BLK_STS_RESOURCE) happens, some drivers
> > need to stop queues for avoiding to hurt CPU, such as virtio-blk, ...
>
> Why isn't virtio_blk using blk_mq_delay_run_hw_queue like scsi does?

IMO it shouldn't be easy to figure out one perfect delay time, and it
should have been self-adaptive.

Also I think it might be possible to move this kind of stop action into
blk-mq core code, and not let drivers touch stop state. Finally we
may kill all stopping in drivers.

Thanks,
Ming