[PATCH 1/2] nvmet-rdma: avoid circular locking dependency on install_queue()

Hannes Reinecke hare at suse.de
Fri Nov 3 01:53:05 PDT 2023


On 11/3/23 09:23, Christoph Hellwig wrote:
> On Thu, Nov 02, 2023 at 03:19:02PM +0100, Hannes Reinecke wrote:
>> nvmet_rdma_install_queue() is driven from the ->io_work workqueue
>> function, but will call flush_workqueue() which might trigger
>> ->release_work() which in itself calls flush_work on ->io_work.
>>
>> To avoid that move the check for any pending queue disconnects
>> to the 'install_queue()' callback. This replicates what the tcp
>> code is already doing, and also allows us to return a
>> 'controller busy' connect response until all disconnects
>> are completed.
> 
> So what are hosts going to do when they see NVME_SC_CONNECT_CTRL_BUSY?
> 
> I see no special casing for it in our host side code.

Retry? The DNR bit is not set, so the default action should be to retry.
And the idea is that this condition is a very short-lived one anyway.
No?

Cheers,

Hannes




More information about the Linux-nvme mailing list