[PATCH V3 4/6] nvme: paring quiesce/unquiesce

Ming Lei ming.lei at redhat.com
Tue Oct 12 08:17:38 PDT 2021


On Tue, Oct 12, 2021 at 05:07:41PM +0200, Christoph Hellwig wrote:
> On Tue, Oct 12, 2021 at 11:01:48PM +0800, Ming Lei wrote:
> > There are lots of unbalanced usage in nvme, such as
> > 
> > 1) nvme pci:
> > 
> > - nvme_dev_disable() can be called more than one times before starting
> > reset, so multiple nvme_stop_queues() vs. single nvme_start_queues().
> > 
> > 2) Forcibly unquiesce queues in nvme_kill_queues() even though queues
> > are never quiesced, and similar usage can be seen in tcp/fc/rdma too
> > 
> > Once the quiesce and unquiesce are run from difference context, it becomes
> > not easy to audit if the two is done in pair.
> 
> Yes, but I'm not sure a magic flag is really the solution here.
> I think we need to work on our state machine here so that this is less
> of a mess.

Frankly speaking, I am not sure you can clean the whole mess in short time.

At least the approach of using the flag is clean and correct, and it can
be reverted quite easily if you finally cleaned it.

Thanks,
Ming




More information about the Linux-nvme mailing list