public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/2] nvmet: avoid circular locking warning
@ 2023-11-01 10:32 Hannes Reinecke
  2023-11-01 10:32 ` [PATCH 1/2] nvmet-rdma: avoid circular locking dependency on install_queue() Hannes Reinecke
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Hannes Reinecke @ 2023-11-01 10:32 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

nvmet-rdma and nvmet-tcp trigger a circular locking warning when
tearing down; reason is a call to 'flush_workqueue' when creating
a new controller which tries to cover for the fact that old controller
instances might be in the process of tearing down.
However, this is pure speculation as we don't know (and don't check)
if there really _are_ controllers in shutdown.
And even if there were, that should be short-lived, and would have been
resolved by connecting just a tad later.
So this patch returns 'controller busy' if we really find ourselves in this
situation, allowing the caller to reconnect later.

Hannes Reinecke (2):
  nvmet-rdma: avoid circular locking dependency on install_queue()
  nvmet-tcp: avoid circular locking dependency on install_queue()

 drivers/nvme/target/rdma.c | 14 ++++++++++++--
 drivers/nvme/target/tcp.c  | 14 ++++++++++++--
 2 files changed, 24 insertions(+), 4 deletions(-)

-- 
2.35.3



^ permalink raw reply	[flat|nested] 20+ messages in thread
* [PATCHv2 0/2] nvmet: avoid circular locking warning
@ 2023-11-02 14:19 Hannes Reinecke
  2023-11-02 14:19 ` [PATCH 1/2] nvmet-rdma: avoid circular locking dependency on install_queue() Hannes Reinecke
  0 siblings, 1 reply; 20+ messages in thread
From: Hannes Reinecke @ 2023-11-02 14:19 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

nvmet-rdma and nvmet-tcp trigger a circular locking warning when
tearing down; reason is a call to 'flush_workqueue' when creating
a new controller which tries to cover for the fact that old controller
instances might be in the process of tearing down.
However, this is pure speculation as we don't know (and don't check)
if there really _are_ controllers in shutdown.
And even if there were, that should be short-lived, and would have been
resolved by connecting just a tad later.
So this patch returns 'controller busy' if we really find ourselves in this
situation, allowing the caller to reconnect later.

Changes to the original version:
- Update the rdma patch to implement 'install_queue()'
- Include suggestions from Jens Axboe

Hannes Reinecke (2):
  nvmet-rdma: avoid circular locking dependency on install_queue()
  nvmet-tcp: avoid circular locking dependency on install_queue()

 drivers/nvme/target/rdma.c | 24 +++++++++++++++++++-----
 drivers/nvme/target/tcp.c  | 13 +++++++++++--
 2 files changed, 30 insertions(+), 7 deletions(-)

-- 
2.35.3



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2023-12-07 12:17 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01 10:32 [PATCH 0/2] nvmet: avoid circular locking warning Hannes Reinecke
2023-11-01 10:32 ` [PATCH 1/2] nvmet-rdma: avoid circular locking dependency on install_queue() Hannes Reinecke
2023-11-01 16:21   ` Jens Axboe
2023-11-01 17:28     ` Hannes Reinecke
2023-11-01 10:32 ` [PATCH 2/2] nvmet-tcp: " Hannes Reinecke
2023-11-01 12:40 ` [PATCH 0/2] nvmet: avoid circular locking warning Shinichiro Kawasaki
  -- strict thread matches above, loose matches on Subject: below --
2023-11-02 14:19 [PATCHv2 " Hannes Reinecke
2023-11-02 14:19 ` [PATCH 1/2] nvmet-rdma: avoid circular locking dependency on install_queue() Hannes Reinecke
2023-11-03  8:23   ` Christoph Hellwig
2023-11-03  8:53     ` Hannes Reinecke
2023-11-03  9:19       ` Christoph Hellwig
2023-11-03 11:58         ` Hannes Reinecke
2023-11-03 14:05           ` Christoph Hellwig
2023-11-20 13:48             ` Sagi Grimberg
2023-12-04 10:19               ` Sagi Grimberg
2023-12-04 11:49                 ` Hannes Reinecke
2023-12-04 11:57                   ` Sagi Grimberg
2023-12-04 12:31                     ` Hannes Reinecke
2023-12-04 12:46                       ` Sagi Grimberg
2023-12-07  5:54                         ` Shinichiro Kawasaki
2023-12-07 12:17                           ` Sagi Grimberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox