Skip to content

nvme-fc: enhance transport error handling when create associations

Michael Liang linux-nvme 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2nvme-fc: return non-zero status code when fails to create associationdrivers/nvme/host/fc.c+15 -31 reply
2/2nvme-fc: fix race between error recovery and creating associationdrivers/nvme/host/fc.c+16 -52 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchCaleb SanderJames Smart
1/2R-b R-b
2/2R-b R-b

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-fc: enhance transport error handling when create associations

Currently when there is some transport error happens during creating nvme-fc association, nvme_fc_create_association() could return 0 status code which implies the association creation was done successfully while it's actually not. The consequence is the nvme controller could be stuck in connecting state infinitely. Also there is a potential race condition between transport io error recovery and the last ASSOC_FAILED check in nvme_fc_create_association(). We may end up ignoring a transport error during connecting creation.

Fix these two issues by:
1. Return non-zero status code(-EIO) when needed, so re-connecting or deleting controller will be triggered properly;
2. Protect accessing to nvme-fc controller ASSOC_FAILED flag and nvme controller state transition under nvme-fc controller's spin lock;

Michael Liang (2):
nvme-fc: return non-zero status code when fails to create association
nvme-fc: fix race between error recovery and creating association

 drivers/nvme/host/fc.c | 37 +++++++++++++++++++++++++++++--------
 1 file changed, 29 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1