Skip to content

nvme-tcp: start error recovery after KATO

Hannes Reinecke linux-nvme 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nvme-tcp: Do not terminate commands when in RESETTINGdrivers/nvme/host/tcp.c+8 -05 replies
2/3nvme-tcp: make 'err_work' a delayed workdrivers/nvme/host/tcp.c+7 -60 replies
3/3nvme-tcp: delay error recovery until the next KATO intervaldrivers/nvme/host/core.c drivers/nvme/host/nvme.h drivers/nvme/host/tcp.c+13 -31 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] nvme-tcp: start error recovery after KATO

Hi all,

there have been some very insistent reports of data corruption with certain target implementations due to command retries. Problem here is that for TCP we're starting error recovery immediately after either a command timeout or a (local) link loss. That is contrary to the NVMe base spec, which states in section 3.9:

If a Keep Alive Timer expires:
a) the controller shall ...
and
b) the host assumes all outstanding commands are not completed and re-issues commands as appropriate.

IE we should retry commands only after KATO expired. With this patchset we will always wait until KATO expired until starting error recovery. This will cause a longer delay until failed commands are retried, but that's kinda the point of this patchset :-)

As usual, comments and reviews are welcome.

Hannes Reinecke (3):
nvme-tcp: Do not terminate commands when in RESETTING
nvme-tcp: make 'err_work' a delayed work
nvme-tcp: delay error recovery until the next KATO interval

 drivers/nvme/host/core.c |  3 ++-
 drivers/nvme/host/nvme.h |  1 +
 drivers/nvme/host/tcp.c  | 29 +++++++++++++++++++++++------
 3 files changed, 26 insertions(+), 7 deletions(-)
Signature · 1 line
2.35.3