Skip to content

nvme: add reference counting for transport modules

Nilay Shroff linux-nvme 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2nvme: keep transport module referenced while head node is opendrivers/nvme/host/core.c drivers/nvme/host/multipath.c drivers/nvme/host/nvme.h+73 -212 replies
2/2nvme: add context annotation for nvme_ns_head::nr_openersdrivers/nvme/host/core.c drivers/nvme/host/nvme.h+5 -30 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchWen Xiong
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] nvme: add reference counting for transport modules

Hi,

This patchset adds reference counting for NVMe transport modules while the corresponding multipath head node is open. This prevents the underlying transport module from being unloaded while it is still in use by the multipath head node. Unloading a transport module while it is still in use can result in undefined behavior.

The second patch adds a Clang context annotation for the shared field used to track the number of active head node openers, allowing the Clang context analyzer to validate accesses to the field.

As usual, feedback and suggestions are welcome.

Thanks!

Nilay Shroff (2):
nvme: keep transport module referenced while head node is open
nvme: add context annotation for nvme_ns_head::nr_openers

 drivers/nvme/host/core.c      | 11 +++++++++--
 drivers/nvme/host/multipath.c | 37 +++++++++++++++++++++++++++++++++--
 drivers/nvme/host/nvme.h      | 33 +++++++++++++++++++++++++++++++
 3 files changed, 77 insertions(+), 4 deletions(-)
Signature · 1 line
2.53.0